added function "pinnable articles"
Website / Website veröffentlichen (push) Successful in 7s

This commit is contained in:
fte committed 2026-11-19 19:36:28 +01:00
1 parent 2a498515c7
commit 60891c90b0
4 files changed
+12 -4

No files matched your search

+3 -1
View File
@@ -16,8 +16,10 @@
<hr style="border-color:white">
<br>
<section class="mb-4 text-lg">
<h4 id="date" class="flex flex-row items-center"><span class="icon-access_time text-2xl mr-2"></span>
{{ if not .Params.pinned }}
<h4 id="date" class="flex flex-row items-center"><span class="icon-access_time text-2xl mr-2"></span>
{{ .Date.Format "02.01.2006" }} </h4>
{{ end }}
{{ if .Params.author }}
<h4 class="flex flex-row items-center"><span class="icon-person text-2xl mr-2"></span>{{.Params.author}}
</h4>
+6 -1
View File
@@ -1,4 +1,9 @@
{{ range first 5 (where site.RegularPages.ByDate.Reverse "Type" "in" site.Params.mainSections )}}
{{ $pinned := where site.RegularPages "Params.pinned" true }}
{{ range $pinned }}
<a href="{{ .Permalink }}">{{ partial "summary.html" . }}</a>
{{ end }}
{{ range first 4 (where site.RegularPages.ByDate.Reverse "Type" "in" site.Params.mainSections )}}
<a href="{{ .Permalink }}">{{ partial "summary.html" . }}</a>
{{ end }}
@@ -23,7 +23,9 @@
<div class="text-green-custom font-bold text-xl mb-2">{{ .Title }}</div>
<p class="text-white-custom text-base pb-5">{{ substr .Summary 0 130 | plainify | htmlUnescape }}...</p>
<p class="text-sm text-lightgray-custom items-center">
{{ if not .Params.pinned }}
<time>{{ .Date.Format "02.01.2006" }}</time>
{{ end }}
</p>
</div>
</div>