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

119 lines
6.0 KiB
HTML
Raw Normal View History

2024-09-05 20:42:17 +02:00
<nav hx-boost="true" class="flex fixed mx-auto w-full md:w-[80%] lg:w-[75%] z-[102]">
<div class="mt-4 mx-4 rounded-2xl shadow-xl bg-base-100 border-base-300 border-[2px] navbar z-[103]">
2024-08-19 22:32:43 +02:00
<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>
2024-09-05 00:06:08 +02:00
<ul
2024-09-07 17:19:22 +02:00
class="menu dropdown-content bg-base-100 border-2 border-base-300 rounded-t-none rounded-box w-52 p-3 shadow-xl gap-1 mt-2">
2024-08-20 13:35:49 +02:00
<li>
2024-09-05 20:42:17 +02:00
<a class='hover:bg-base-300 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>
2024-09-05 20:42:17 +02:00
<a class='hover:bg-base-300 flex gap-4 {{if eq .Path "/blog"}}active{{end}}' href="/blog">
2024-08-20 13:35:49 +02:00
<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>
2024-09-05 20:42:17 +02:00
<a class='hover:bg-base-300 flex gap-4 {{if eq .Path "/projects"}}active{{end}}'
href="/projects">
2024-08-20 13:35:49 +02:00
<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>
2024-08-22 23:11:23 +02:00
{{if .SignedIn}}
<li>
2024-09-05 20:42:17 +02:00
<a class='hover:bg-base-300 flex gap-4 {{if eq .Path "/services"}}active{{end}}'
href="/services">
2024-08-22 23:11:23 +02:00
<span class="w-5 text-center">
{{icon "services"}}
</span>
<span class="text-base">{{.T.services}}</span>
</a>
</li>
{{end}}
2024-08-20 13:35:49 +02:00
<li>
2024-09-05 20:42:17 +02:00
<a class='hover:bg-base-300 flex gap-4 {{if eq .Path "/about"}}active{{end}}' href="/about">
2024-08-20 13:35:49 +02:00
<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-09-05 20:42:17 +02:00
<li>
<details>
<summary class="hover:bg-base-300">
<button class="flex gap-4">
2024-08-19 22:32:43 +02:00
<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-09-01 13:15:56 +02:00
</button>
2024-08-19 22:32:43 +02:00
</summary>
2024-09-05 20:42:17 +02:00
<ul>
2024-08-20 13:35:49 +02:00
<li>
2024-09-05 20:42:17 +02:00
<a class='mt-1 gap-4 hover:bg-base-300 flex {{if eq .Language "en"}}active{{end}}'
2024-08-20 18:25:59 +02:00
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-09-05 20:42:17 +02:00
<a class='mt-1 gap-4 hover:bg-base-300 flex {{if eq .Language "nl"}}active{{end}}'
2024-08-20 18:25:59 +02:00
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>
2024-08-19 22:32:43 +02:00
</ul>
</details>
</li>
2024-08-21 17:54:36 +02:00
<li>
{{if .SignedIn}}
2024-09-05 20:42:17 +02:00
<a class='hover:bg-base-300 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}}
2024-08-22 18:04:08 +02:00
<a hx-boost="false" class="active flex gap-4" href="/auth?redirect={{.Path}}">
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>