bunteshaus.de/themes/buha/layouts/partials/sidebar.html

44 lines
1.6 KiB
HTML

<aside class="right-sidebar">
{{ $s := .Site.Params }}
<section class="sidebar_inner">
<div id="nav-posts">
{{- $posts := where .Site.RegularPages "Type" "in" $s.mainSections }}
{{- $featured := default 8 $s.numberOfFeaturedPosts }}
{{- with first $featured (where $posts "Params.featured" true)}}
<h3 class="mt-4">{{ T "featured_posts" }}</h3>
{{- range . }}
<a href="{{ .Permalink }}" class="nav-link" title="{{ .Title }}">{{ .Title }}</a>
{{- end }}
{{- end }}
{{ if or (or (eq .Section "events") (eq .Params.recurrent true)) (.IsHome) }}
<h3 class="mt-4">{{ T "recurrent" }}</h3>
{{- $posts := where .Site.RegularPages "Params.recurrent" true }}
{{ range $posts }}
<a href="{{ .Permalink }}" class="nav-link" title="{{ .Title }}">{{ .Title }}</a>
{{ end }}
{{ end }}
</div>
<!-- {{ if .IsSection }}
{{ $true := false }}
{{ range $taxonomyname, $taxonomy := where .Site.Taxonomies.categories ".Page.Section" .Section }}
{{ if ne $taxonomyname nil }}
{{ $true = true }}
{{ end }}
{{ end }}
{{ if $true }}
<h3 class="mt-4 taxonomy" id="categories-section">{{ T "categories" }}</h3>
{{ range $taxonomyname, $taxonomy := where .Site.Taxonomies.categories ".Page.Section" .Section }}
<li style="list-style: none;"><a href="{{ "categories/" | relLangURL}}{{ $taxonomyname | urlize }}">{{ $taxonomyname | humanize }}</a></li>
{{ end }}
{{ end }}
{{ end }} -->
</section>
</aside>