small fixes

This commit is contained in:
teldra 2022-04-08 14:12:20 +02:00
parent af42e4acd4
commit 52da0b8919
4 changed files with 43 additions and 24 deletions

View File

@ -3,6 +3,7 @@ title: "Gedenken an Arkan"
date: 2022-04-05T09:31:00+02:00
when: "Donnerstag, 07.04.2022, 18:00 Uhr, Celler Triftpark"
contact: "ArkanGedenken@riseup.net"
featured: true
---
Am 7. April jährt sich der Todestag des êzîdischen Jugendlichen Arkan Hussein Khalaf zum zweiten Mal. Wir, die Initiative "In Gedenken an Arkan“, in der sich unterschiedliche Gruppen und Einzelpersonen aus Celle organisieren, rufen zur Beteiligung am Gedenken auf.

View File

@ -2,7 +2,6 @@
title: "Zeitungsprojekt Revista"
date: "1993-09-04T19:00:00+02:00"
lastmod: "2022-04-04T19:00:00+02:00"
featured: true
about: true
---
Was ist Revista? Revista ist spanisch und heißt Zeitung, und genau das sind wir, eine Zeitung. Die revista ist ein relativ neues Projekt, die erste Ausgabe erschien um Oktober 1999.

View File

@ -8,7 +8,7 @@
{{ $s := .Site.Params }}
{{- $posts := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" $s.searchSections }}
{{- $featured := where (where $posts ".Params.featured" "=" true) "Type" "in" $s.searchSections }}
{{ $featured = where $featured (.Lastmod.AddDate 0 0 14) "gt" now }}
{{ $featured = where $featured ".Params.Lastmod" "gt" (now.AddDate 0 0 -14) }}
{{- $paginator := .Paginate $posts -}}
{{ if eq $paginator.PageNumber 1 }}
{{ if ne .Content "" }}

View File

@ -1,25 +1,44 @@
{{ if and (or .paginator .pages) .amount }}
{{ $amount := .amount }}
{{ $pages := "" }}
{{ if .pages }}
{{ $pages = .pages.ByLastmod.Reverse }}
{{ else if .paginator }}
{{ $pages = .paginator.Pages.ByLastmod.Reverse }}
{{ end }}
{{- range first $amount $pages -}}
{{ if .Title }}
<article class="articlebgcol1 borderrad25">
<a href="{{- .Permalink -}}">
<div id="articletitle">
<h2>{{- .Title -}}</h2>
</div>
</a>
<a href="{{- .Permalink -}}">
<div id="articlecontent">
{{ partial "contentlayouts/article.html" (dict "context" . "type" "list") }}
</div>
</a>
</article>
{{ if or .paginator .pages }}
{{ if .amount }}
{{ $amount := .amount }}
{{ $pages := "" }}
{{ $max_age := int .max_age }}
{{ $featured := .featured }}
{{ if .pages }}
{{ $pages = .pages.ByLastmod.Reverse }}
{{ else if .paginator }}
{{ $pages = .paginator.Pages.ByLastmod.Reverse }}
{{ end }}
{{- range first $amount $pages -}}
{{ $true := true }}
{{ if $featured }}
{{ if le (.Lastmod.AddDate 0 0 $max_age) now }}
{{ $true = false }}
{{ end }}
{{ else }}
{{ if $max_age }}
{{ if and (lt (.Lastmod.AddDate 0 0 $max_age) now) (eq .Params.featured true) }}
{{ $true = false }}
{{ end }}
{{ end }}
{{ end }}
{{ if eq $true true }}
{{ if .Title }}
<article class="articlebgcol1 borderrad25">
<a href="{{- .Permalink -}}">
<div id="articletitle">
<h2>{{- .Title -}}</h2>
</div>
</a>
<a href="{{- .Permalink -}}">
<div id="articlecontent">
{{ partial "contentlayouts/article.html" (dict "context" . "type" "list") }}
</div>
</a>
</article>
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}