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

41 lines
1.8 KiB
HTML

{{ $s := .Site.Params }}
<section class="sidebar_inner">
{{ if gt .Site.Taxonomies.categories 0 }}
<a href="{{ "/news" | relLangURL}}"><h3>{{ T "news" }}</h3></a>
{{ 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;"><a href="{{ "categories/" | relLangURL}}{{ $orig | urlize }}">{{ $taxonomyname }}</a></li>
{{ end }}
{{ end }}
{{ if gt .Site.Taxonomies.events 0 }}
<a href="{{ "/events" | relLangURL}}"><h3>{{ T "events" }}</h3></a>
{{ 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;"><a href="{{ "events/" | relLangURL}}{{ $orig | urlize }}">{{ $taxonomyname }}</a></li>
{{ end }}
{{ end }}
{{ if .IsHome }}
<h4>{{ "Languages" }}</h3>
{{ range .Translations }}
{{ if ne .Lang $.Lang }}
<li style="list-style: none;"><a href="{{- .Permalink -}}">{{- i18n .Lang -}}</a></li>
{{ end }}
{{ end }}
{{ end }}
{{ $t := where .Site.Taxonomies.categories ".Page.Section" "events" }}
{{ range $t }}
<li><a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a></li>
{{ end }}
</section>