small fixes

This commit is contained in:
teldra 2022-04-04 13:00:33 +02:00
parent 7bde25e5d9
commit 64326ee377
2 changed files with 3 additions and 2 deletions

View File

@ -5,5 +5,5 @@ when: "13.4.1983"
price: "free"
covid: ""
register: ""
eventcategories: ["Party"]
events: ["Party"]
---

View File

@ -9,6 +9,7 @@
{{ $s := .Site.Params }}
{{ $meta := false }}
{{- $posts := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" $s.searchSections }}
{{- $featured := where (where (where $posts "Type" "in" .Site.RegularPages) ".Params.featured" "=" true) "Type" "in" $s.searchSections }}
{{- $paginator := slice -}}
{{- $paginator = .Paginate $posts.ByDate.Reverse -}}
<!-- <a href="/featured"><h2>{{ "featured" | T }}</h2></a> -->
@ -18,7 +19,7 @@
{{ .Content }}
</article>
{{ end }}
{{ range first 3 (where (where .Site.RegularPages "Type" "in" site.Params.searchSections) ".Params.featured" "=" true) }}
{{ range first 3 $featured.ByLastmod }}
{{ $article_age := sub now.Unix (int .Date.Unix) }}
{{ if lt $article_age "1209600" }}
{{ partial "structure/list_article.html" . }}