speedtech-website/layouts/partials/widgets/ibissidebar.html

40 lines
1.1 KiB
HTML
Raw Permalink Normal View History

2024-10-04 11:58:15 +02:00
<section class="col-sm-3 text-center blogsidebar" style="border-left: 1px solid #ddd">
{{ 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-12 article" style="text-align: center">
{{ partial "widgets/article.html" . }}
</div>
{{ end }}
</div>
{{ end }}
</section>