From 97a633952b483c8604a975afe33e9576ed4118df Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Mon, 1 Jan 2024 23:24:54 +0100 Subject: [PATCH] initial implementation --- content/schulchronik/2004.md | 2 +- layouts/schulchronik/single.html | 90 ++++++++++++++++++++++++++------ 2 files changed, 75 insertions(+), 17 deletions(-) diff --git a/content/schulchronik/2004.md b/content/schulchronik/2004.md index 8a724387..78c8b1a4 100644 --- a/content/schulchronik/2004.md +++ b/content/schulchronik/2004.md @@ -13,7 +13,7 @@ pretext: > Nur der Cantorpreis wurde hauptsächlich für andere Leistungen vergeben. Der Preisträger dieses Jahres ist sehr engagiert und initiierte im November 2003 als Schülersprecher den Schülerstreik. Marcus Syring hat diesen Preis auf jeden Fall verdient und schließt sich mit seiner außergewöhnlichen Arbeit für die Schule als neunter Preisträger in die Reihe großer Cantorianer an. topics: - title: Franziska Flegel bei der internationalen Olympiade für - Nachwuchswissenschaftler + Nachwuchs­wissenschaftler content: | {{< image src="/media/schulchronik/2004/franziska-flegel.webp" >}} - title: Wettbewerbserfolge diff --git a/layouts/schulchronik/single.html b/layouts/schulchronik/single.html index 397f67a6..ce940efd 100644 --- a/layouts/schulchronik/single.html +++ b/layouts/schulchronik/single.html @@ -32,6 +32,7 @@ {{ end }} + {{ end }} {{ range .Params.topics }} {{ partial "modal" . }} @@ -39,21 +40,78 @@ {{ if and .Params.pretext (ne .Params.pretext "\n\n\n") }} {{ partial "modal" (dict "title" .Title "content" .Params.pretext) }} {{ end }} -
- {{ $topics := slice }} - {{ if .Params.pretext }} - {{ $topics = $topics | append (dict "Title" .Params.Title "Size" (int 200) "ID" (md5 .Title)) }} - {{ else }} - {{ $topics = $topics | append (dict "Title" .Params.Title "Size" (int 200)) }} - {{ end }} - {{ range .Params.topics }} - {{ if .superhaufen.enable }} - {{ $topics = $topics | append (dict "Title" .title "Size" 30 "ID" (.superhaufen.link | urlize) "Superhaufen" true ) }} - {{ else }} - {{ $topics = $topics | append (dict "Title" .title "Size" 30 "ID" (md5 .title)) }} + + +
+
{{ .Title }}
+ {{ $topics := slice }} + {{ range .Params.topics }} + {{ $topics = $topics | append (dict "titleLength" (len .title) "topic" .) }} {{ end }} - {{ end }} - + {{ .Content }}