small fixes

This commit is contained in:
teldra 2022-03-27 03:17:45 +02:00
parent fd3cc76793
commit 02c3257022

View File

@ -1,5 +1,19 @@
{{ $s := .Site.Params }} {{ $s := .Site.Params }}
<section class="sidebar_inner"> <section class="sidebar_inner">
{{ 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 }}
<div id="nav-posts"> <div id="nav-posts">
{{- $posts := where .Site.RegularPages "Type" "in" $s.mainSections }} {{- $posts := where .Site.RegularPages "Type" "in" $s.mainSections }}
{{- $featured := default 8 $s.numberOfFeaturedPosts }} {{- $featured := default 8 $s.numberOfFeaturedPosts }}
@ -19,20 +33,6 @@
</div> </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 }}