bunteshaus.de/themes/buha/layouts/partials/structure/submenu.html
2022-04-04 19:19:22 +02:00

37 lines
2.7 KiB
HTML

<div>
<details>
<summary style="list-style: none; text-align: right;">Menü ☰</summary>
<p>
<li style="list-style: none; text-align: right;"><a href="{{ "/news" | relLangURL}}"><b>{{ "news" | T }}</b></a></li>
{{ range $taxonomyname, $taxonomy := .Site.Taxonomies.categories }}
{{ $orig := $taxonomyname }}
{{ if ne (i18n $taxonomyname) "" }}
{{ $taxonomyname = i18n $taxonomyname }}
{{ else }}
{{ $taxonomyname = $taxonomyname | humanize }}
{{ end }}
<li style="list-style: none; text-align: right;"><a href="{{ "categories/" | relLangURL}}{{ $orig | urlize }}">{{ $taxonomyname }}</a></li>
{{ end }}
<li style="list-style: none; text-align: right; margin-top: 1rem;"><a href="{{ "/events" | relLangURL}}"><b>{{ "events" | T }}</b></a></li>
{{ range $taxonomyname, $taxonomy := .Site.Taxonomies.events }}
{{ $orig := $taxonomyname }}
{{ if ne (i18n $taxonomyname) "" }}
{{ $taxonomyname = i18n $taxonomyname }}
{{ else }}
{{ $taxonomyname = $taxonomyname | humanize }}
{{ end }}
<li style="list-style: none; text-align: right;"><a href="{{ "categories/" | relLangURL}}{{ $orig | urlize }}">{{ $taxonomyname }}</a></li>
{{ end }}
{{ if .IsHome }}
<div class="footer_color" style="margin-top: 1rem; text-align: right;"><b>Languages</b></div>
{{ range $.Site.Home.AllTranslations }}
{{ if ne .Lang $.Lang }}
<li style="list-style: none; text-align: right;"><a href="{{- .Permalink -}}" class="underline">{{- i18n .Lang -}}</a></li>
{{ end }}
{{ end }}
{{ end }}
</p>
</details>
</div>