tijl.dev-core/web/views/partials/menu.html

108 lines
5.4 KiB
HTML
Raw Normal View History

2024-08-21 11:33:33 +02:00
<nav hx-boost="true" class="flex fixed mx-auto w-full lg:w-[80%] xl:w-[75%]">
2024-08-19 22:32:43 +02:00
<div class="mt-4 mx-4 rounded-2xl shadow-2xl bg-base-300 navbar">
<div class="flex-1">
<a href="/" class="btn btn-ghost font-mono text-xl">tijl.dev</a>
</div>
<div class="flex-none">
<details class="dropdown dropdown-bottom dropdown-end">
<summary class="btn btn-ghost btn-square">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24"
stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round"
d="M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z" />
</svg>
</summary>
<ul class="mt-3 z-[1] menu dropdown-content bg-base-300 rounded-box w-52 p-3 shadow-xl gap-1">
2024-08-20 13:35:49 +02:00
<li>
<a class='flex gap-4 {{if eq .Path "/"}}active{{end}}' href="/">
2024-08-19 22:32:43 +02:00
<span class="w-5 text-center">
2024-08-20 11:49:05 +02:00
{{icon "home" }}
2024-08-19 22:32:43 +02:00
</span>
2024-08-20 18:25:59 +02:00
<span class="text-base">{{.T.home}}</span>
2024-08-20 13:35:49 +02:00
</a>
</li>
<li>
<a class='flex gap-4 {{if eq .Path "/blog"}}active{{end}}' href="/blog">
<span class=" w-5 text-center">
2024-08-20 11:49:05 +02:00
{{icon "blog"}}
2024-08-19 22:32:43 +02:00
</span>
2024-08-20 18:25:59 +02:00
<span class="text-base">{{.T.blog}}</span>
2024-08-20 13:35:49 +02:00
</a>
</li>
<li>
<a class='flex gap-4 {{if eq .Path "/projects"}}active{{end}}' href="/projects">
<span class="w-5 text-center">
{{icon "projects"}}
</span>
2024-08-20 18:25:59 +02:00
<span class="text-base">{{.T.projects}}</span>
2024-08-20 13:35:49 +02:00
</a>
</li>
<li>
<a class='flex gap-4 {{if eq .Path "/about"}}active{{end}}' href="/about">
<span class="w-5 text-center">
{{icon "about"}}
</span>
2024-08-20 18:25:59 +02:00
<span class="text-base">{{.T.about}}</span>
2024-08-20 13:35:49 +02:00
</a>
</li>
2024-08-22 12:57:38 +02:00
<!--
2024-08-20 18:25:59 +02:00
<li class="flex-none">
2024-08-19 22:32:43 +02:00
<details class="dropdown">
<summary><a class="flex gap-4">
<span class="w-5 text-center">
2024-08-20 11:49:05 +02:00
{{icon "language"}}
2024-08-19 22:32:43 +02:00
</span>
2024-08-20 18:25:59 +02:00
<span class="text-base">{{.T.language}}</span>
2024-08-19 22:32:43 +02:00
</a>
</summary>
<ul class="menu dropdown-content z-[12] bg-base-200 rounded-box w-48 p-3 shadow-xl gap-1">
2024-08-20 13:35:49 +02:00
<li>
2024-08-20 18:25:59 +02:00
<a class='flex gap-4 {{if eq .Language "en"}}active{{end}}'
href="/settings?lang=en&redirect={{.Path}}">
2024-08-19 22:32:43 +02:00
<span class="w-5 h-5 text-center">
🇬🇧
</span>
<span class="text-base">
2024-08-20 18:25:59 +02:00
{{.T.english}}
2024-08-19 22:32:43 +02:00
</span>
2024-08-20 13:35:49 +02:00
</a>
</li>
<li>
2024-08-20 18:25:59 +02:00
<a class='flex gap-4 {{if eq .Language "nl"}}active{{end}}'
href="/settings?lang=nl&redirect={{.Path}}">
2024-08-19 22:32:43 +02:00
<span class="w-5 h-5 text-center">
🇳🇱
</span>
<span class="text-base">
2024-08-20 18:25:59 +02:00
{{.T.dutch}}
2024-08-19 22:32:43 +02:00
</span>
2024-08-20 13:35:49 +02:00
</a>
</li>
2024-08-19 22:32:43 +02:00
</ul>
</details>
</li>
2024-08-22 12:57:38 +02:00
-->
2024-08-21 17:54:36 +02:00
<li>
{{if .SignedIn}}
2024-08-22 12:57:38 +02:00
<a class='flex gap-4 {{if eq .Path "/account"}}active{{end}}' href="/account">
2024-08-21 17:54:36 +02:00
<span class="w-5 text-center">
{{icon "login"}}
</span>
<span class="text-base">{{.T.account}}</span>
</a>
{{else}}
<a class="active flex gap-4" hx-boost="false" href="/login">
2024-08-19 22:32:43 +02:00
<span class="w-5 text-center">
2024-08-20 11:49:05 +02:00
{{icon "login"}}
2024-08-19 22:32:43 +02:00
</span>
2024-08-20 18:25:59 +02:00
<span class="text-base">{{.T.login}}</span>
2024-08-19 22:32:43 +02:00
</a>
2024-08-21 17:54:36 +02:00
{{end}}
2024-08-19 22:32:43 +02:00
</li>
</ul>
</details>
</div>
</div>
</nav>