bunteshaus.de/themes/buha/layouts/news/list.html

38 lines
1.5 KiB
HTML
Raw Normal View History

2022-06-22 18:15:37 +02:00
{{ define "banner" }}
{{ $image := "" }}
{{ if .Resources.GetMatch "banner*" }}
{{ $image = .Resources.GetMatch "banner*" }}
{{ end }}
{{ partial "snippets/banner_new" (dict "context" . "image" $image "title" .Title "section" .Section) }}
{{ end }}
2022-06-17 17:45:53 +02:00
{{ define "intro" }}
{{ if ne .Content "" }}
{{ partial "snippets/content" (dict "content" .Content) }}
{{ end }}
{{ end }}
{{ define "content" }}
2022-06-22 16:09:01 +02:00
{{- $pages := where .Site.RegularPages "Section" "in" .Site.Params.searchSections -}}
2022-07-08 15:01:10 +02:00
{{- $pages := $pages.ByLastmod.Reverse -}}
2022-06-22 18:15:37 +02:00
{{ if eq .Kind "term" }}
2022-07-08 15:01:10 +02:00
{{- $pages = .Data.Pages.ByLastmod -}}
2022-06-22 18:15:37 +02:00
{{ end }}
2022-06-22 16:34:55 +02:00
{{ partial "snippets/gen_list" (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" true) }}
2022-06-17 17:45:53 +02:00
{{ end }}
{{ define "sidebar" }}
2022-06-22 15:26:58 +02:00
<aside class="sidebar">
<h3 class="align_menu">{{ if i18n "categories" }}{{ i18n "categories" }}{{ else }}{{ "Categories" }}{{ end }}</h3>
{{ range $taxonomyname, $taxonomy := .Site.Taxonomies.news }}
{{ $orig := $taxonomyname }}
{{ if ne (i18n $taxonomyname) "" }}
{{ $taxonomyname = i18n $taxonomyname }}
{{ else }}
{{ $taxonomyname = $taxonomyname | humanize }}
2022-06-17 17:45:53 +02:00
{{ end }}
2022-06-22 16:09:01 +02:00
<div class="align_menu"><a href="{{ "news/" | relLangURL}}{{ $orig | urlize }}">{{ $taxonomyname }}</a></div>
2022-06-22 15:26:58 +02:00
{{ end }}
</aside>
2022-06-17 17:45:53 +02:00
{{ end }}