From 2b5708d40218b72cfb71caf3a5f32dc1f7a9273d Mon Sep 17 00:00:00 2001 From: teldra Date: Fri, 8 Apr 2022 15:02:22 +0200 Subject: [PATCH] small fixes --- config.toml | 7 ++++--- content/links/rheinmetall.md | 1 - docs/todo.de | 1 - themes/buha/layouts/index.html | 3 ++- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config.toml b/config.toml index b5677c7..8e48b21 100644 --- a/config.toml +++ b/config.toml @@ -45,9 +45,10 @@ featured = 'featured' mainMenu = ['about'] searchSections = ['news'] - - placeholder_image = "/images/l.jpg" - + + # how long stays a featrued article on frontpage as featured (in weeks) + featured_expire = "1" + # data for your imprint and contact page [params.imprintdata] tel = "(+) 49 5141 907 927" diff --git a/content/links/rheinmetall.md b/content/links/rheinmetall.md index 998d94b..06658ee 100644 --- a/content/links/rheinmetall.md +++ b/content/links/rheinmetall.md @@ -2,4 +2,3 @@ title: "Aktionstage, Camp & Demonstration “Rheinmetall entwaffnen” in Unterlüß" link: "https://rheinmetallentwaffnen.noblogs.org/" --- -Sind freunde, also kriegen die nen Link! diff --git a/docs/todo.de b/docs/todo.de index 45bcbe7..2abde5a 100644 --- a/docs/todo.de +++ b/docs/todo.de @@ -3,7 +3,6 @@ todo buha.de - eintritt "gegen spende" - covid regel verfeinern - diskutieren, ob jede aenderung via rss raus soll (lastmod vs einmalig) -- translations: english default - generator form: aus mc ein checkbox machen und kategorien und/oder eventkategorien soloauswaehlbar machen. - sollte kein bild gefunden werden, wird ein standard bild verwendet. (diskutabel, hat vor und nachteile. man kann aber auch ein pool bereitstellen, je nach kategorie? im generator auswaehlen?) - diskutieren, in welcher reihenfolge artikel angezeigt werden sollen. diff --git a/themes/buha/layouts/index.html b/themes/buha/layouts/index.html index 26dc37b..7832150 100644 --- a/themes/buha/layouts/index.html +++ b/themes/buha/layouts/index.html @@ -6,7 +6,8 @@ {{ define "main" }} {{- $all := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" .Site.Params.searchSections }} - {{ $featured := where (where (where $all ".Params.featured" "=" true) "Type" "in" .Site.Params.searchSections) ".Params.Lastmod" "gt" (now.AddDate 0 0 -14) }} + {{ $days := int (mul (mul (int .Site.Params.featured_expire) 7) -1) }} + {{ $featured := where (where (where $all ".Params.featured" "=" true) "Type" "in" .Site.Params.searchSections) ".Params.Lastmod" "gt" (now.AddDate 0 0 $days) }} {{ $featured = $all | intersect $featured }} {{ $posts := $all | complement $featured }} {{- $paginator := .Paginate $posts -}}