forked from Bunteshaus/bunteshaus.de
38 lines
1.6 KiB
HTML
38 lines
1.6 KiB
HTML
{{ 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 }}
|
|
|
|
{{ define "intro" }}
|
|
{{ if ne .Content "" }}
|
|
{{ partial "snippets/content" (dict "content" .Content) }}
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
{{ define "content" }}
|
|
{{- $pages := where .Site.RegularPages "Permalink" "!=" .Permalink -}}
|
|
{{- $pages = where $pages ".Params.recurrent" "=" true -}}
|
|
{{ partial "snippets/gen_list" (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" true) }}
|
|
{{ end }}
|
|
|
|
{{ define "sidebar" }}
|
|
{{ if gt .Site.Taxonomies.events 0 }}
|
|
<aside class="sidebar">
|
|
<h3 class="align_menu">{{ if i18n "categories" }}{{ i18n "categories" }}{{ else }}{{ "Categories" }}{{ end }}</h3>
|
|
<div class="align_menu"><a href="{{ "recurrent/" | relLangURL}}">{{ i18n "recurrent" }}</a></div>
|
|
{{ range $taxonomyname, $taxonomy := .Site.Taxonomies.events }}
|
|
{{ $orig := $taxonomyname }}
|
|
{{ if ne (i18n $taxonomyname) "" }}
|
|
{{ $taxonomyname = i18n $taxonomyname }}
|
|
{{ else }}
|
|
{{ $taxonomyname = $taxonomyname | humanize }}
|
|
{{ end }}
|
|
<div class="align_menu"><a href="{{ "events/" | relLangURL}}{{ $orig | urlize }}">{{ $taxonomyname }}</a></div>
|
|
{{ end }}
|
|
</aside>
|
|
{{ end }}
|
|
{{ end }}
|