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

40 lines
1.1 KiB
HTML
Raw 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 "tagsspot" }}
{{ if not (eq (len .Site.Taxonomies.tagsspot) 0) }}
<div class="tags">
<h4 class="text-center">{{ i18n "tags" }}</h4>
<small>
{{ $current_path := .RelPermalink}}
{{ range $name, $item := .Site.Taxonomies.tagsspot }}
{{ $pagepath := $name | urlize | lower | printf "%s%s" "/tagsspot/"}}
{{ $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" "blogspot").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>