speedtech-website/layouts/partials/widgets/ibissidebar.html
2025-05-16 11:06:06 +02:00

40 lines
No EOL
1.1 KiB
HTML

<section class="col s12 m3 l3 text-center blogsidebar">
{{ if isset .Site.Taxonomies "tagsibis" }}
{{ if not (eq (len .Site.Taxonomies.tagsibis) 0) }}
<div class="tags">
<h4 class="text-center">{{ i18n "tags" }}</h4>
<small>
{{ $current_path := .RelPermalink}}
{{ range $name, $item := .Site.Taxonomies.tagsibis }}
{{ $pagepath := $name | urlize | lower | printf "%s%s" "/tagsibis/"}}
{{ $p := $.Site.GetPage $pagepath}}
{{ $path := $p.RelPermalink }}
{{ if eq $current_path $path }}
{{ $p.Title }}
{{ else }}
<a href="{{ $path }}">{{ $p.Title }}</a>
{{ end }}
{{ end }}
</small>
</div>
{{ end }}
{{ end }}
{{ $projects := first 4 ((where .Site.RegularPages "Type" "blogibis").ByParam "LastmodDate") }}
{{ with $projects }}
<div class="row articles" >
<h4 class="text-center">{{ i18n "latest_articles" }}</h4>
{{ range . }}
<div class="col l12 article" style="text-align: center">
{{ partial "widgets/article.html" . }}
</div>
{{ end }}
</div>
{{ end }}
</section>