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
+11 -3

No files matched your search

@@ -1,9 +1,8 @@
+++ +++
author = "Fabian Ecke"
title = "Noch Technik für Ihre Party gesucht?" title = "Noch Technik für Ihre Party gesucht?"
date = "2026-09-20"
description = "Verleih für Privatfeiern" description = "Verleih für Privatfeiern"
image = "thumb.webp" image = "thumb.webp"
pinned = true
tags = ["rental"] tags = ["rental"]
+++ +++
+2
View File
@@ -16,8 +16,10 @@
<hr style="border-color:white"> <hr style="border-color:white">
<br> <br>
<section class="mb-4 text-lg"> <section class="mb-4 text-lg">
{{ if not .Params.pinned }}
<h4 id="date" class="flex flex-row items-center"><span class="icon-access_time text-2xl mr-2"></span> <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> {{ .Date.Format "02.01.2006" }} </h4>
{{ end }}
{{ if .Params.author }} {{ if .Params.author }}
<h4 class="flex flex-row items-center"><span class="icon-person text-2xl mr-2"></span>{{.Params.author}} <h4 class="flex flex-row items-center"><span class="icon-person text-2xl mr-2"></span>{{.Params.author}}
</h4> </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> <a href="{{ .Permalink }}">{{ partial "summary.html" . }}</a>
{{ end }} {{ end }}
@@ -23,7 +23,9 @@
<div class="text-green-custom font-bold text-xl mb-2">{{ .Title }}</div> <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-white-custom text-base pb-5">{{ substr .Summary 0 130 | plainify | htmlUnescape }}...</p>
<p class="text-sm text-lightgray-custom items-center"> <p class="text-sm text-lightgray-custom items-center">
{{ if not .Params.pinned }}
<time>{{ .Date.Format "02.01.2006" }}</time> <time>{{ .Date.Format "02.01.2006" }}</time>
{{ end }}
</p> </p>
</div> </div>
</div> </div>