This repository has been archived on 2022-12-03. You can view files and clone it, but cannot push or open issues or pull requests.
public-web/layouts/partials/menu.html

29 lines
1.3 KiB
HTML
Raw Normal View History

2022-10-21 13:45:22 +02:00
<nav
2022-10-24 03:43:56 +02:00
class="bg-gray-100 dark:bg-gray-800 lg:bg-transparent dark:lg:bg-transparent fixed lg:static inset-0 z-10 overflow-y-auto transition-transform lg:container lg:mx-auto px-6 pt-12 pb-12 lg:pt-0 lg:pb-2"
2022-10-21 13:45:22 +02:00
x-bind:class="menuOpen ? 'translate-x-0' : 'translate-x-full lg:translate-x-0'">
2022-10-21 11:06:50 +02:00
<h2 class="sr-only">{{ i18n "menu_title" }}</h2>
2022-10-21 13:45:22 +02:00
<button class="button block mb-6 lg:hidden absolute top-4 right-6" x-on:click="menuOpen = false">
2022-10-24 03:43:56 +02:00
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="32" height="32"><path fill="none" d="M0 0h24v24H0z"/><path fill="currentColor" d="M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"/></svg>
2022-10-21 13:45:22 +02:00
</button>
<ul class="flex gap-x-6 gap-y-4 flex-col lg:flex-row">
2022-10-21 11:06:50 +02:00
{{ range site.Menus.main }}
{{ $isActive := false }} {{/* TODO fix */}}
<li>
<a
href="{{ .URL | relLangURL }}"
class="font-bold link {{ if $isActive }}link--active{{ end }}"
{{ if $isActive }}
aria-current="page"
{{ end }}
2022-10-27 14:45:42 +02:00
{{ with .Params.target }}
target="{{ . }}"
{{ end }}
2022-10-21 11:06:50 +02:00
>{{ .Name }}</a>
</li>
{{ end }}
</ul>
2022-10-30 21:24:17 +01:00
<span class="lg:hidden self-start -ml-2 mt-4">
{{ partial "language-selector.html" . }}
</span>
2022-10-20 19:39:49 +02:00
</nav>