bunteshaus.de/themes/buha/layouts/_default/single.html

93 lines
4.1 KiB
HTML
Raw Normal View History

2022-04-05 20:58:02 +02:00
{{ define "title" }}
2022-04-09 21:34:04 +02:00
<h1>{{ if (i18n .Title (dict "Count" 0))}}{{ i18n .Title (dict "Count" 0) }}{{ else }}{{ .Title }}{{ end }}</h1>
2022-04-05 20:58:02 +02:00
{{ end }}
2022-04-05 17:50:09 +02:00
2022-04-09 21:34:04 +02:00
{{ define "content" }}
2022-04-10 00:53:31 +02:00
{{ $partial_before := "" }}
2022-04-10 11:00:14 +02:00
{{ $partial := "layout/article" }}
2022-04-10 00:53:31 +02:00
{{ $pic := "true" }}
{{ if eq .Params.tool "generator" }}
2022-04-10 11:00:14 +02:00
{{ $partial = "layout/generator" }}
2022-04-10 00:53:31 +02:00
{{ else if eq .Params.tool "nottranslated" }}
2022-04-10 11:00:14 +02:00
{{ $partial = "layout/nottranslated" }}
2022-04-28 14:53:58 +02:00
{{ else if or (eq .Layout "contact") (eq .Layout "imprint") }}
{{ $partial_before = "snippets/contact" }}
{{ $partial = printf "layout/%s" .Layout }}
{{ else if eq .Layout "archive" }}
{{ $partial = printf "layout/%s" .Layout }}
2022-04-10 00:53:31 +02:00
{{ end }}
2022-04-11 18:16:40 +02:00
<article>
2022-04-10 10:35:48 +02:00
{{ partial $partial (dict "context" . "pic" $pic "content" .Content "partial_before" $partial_before "type" "article") }}
2022-04-11 18:16:40 +02:00
</article>
2022-04-04 01:13:42 +02:00
{{ end }}
2022-05-09 21:37:34 +02:00
{{ define "sidebar" }}
{{ if ne .Type "tools" }}
<aside class="sidebar">
{{ if .Params.categories }}
<h3 class="align_menu">{{ if i18n "categories" }}{{ i18n "categories" }}{{ else }}{{ "Categories" }}{{ end }}</h3>
{{ range .Params.categories }}
<div class="align_menu"><a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}">{{ . }}</a></div>
{{ end }}
{{ end }}
{{ if .Params.events }}
<h3 class="align_menu">{{ if i18n "categories" }}{{ i18n "categories" }}{{ else }}{{ "Categories" }}{{ end }}</h3>
{{ range .Params.events }}
<div class="align_menu"><a href="{{ "/events/" | relLangURL }}{{ . | urlize }}">{{ . }}</a></div>
{{ end }}
{{ end }}
{{ if .Params.tags }}
<h3 class="align_menu"><a href="{{ "/tags/" | relLangURL }}">{{ if i18n "tags" }}{{ i18n "tags" }}{{ else }}{{ "Tags" }}{{ end }}</a></h3>
{{ range .Params.tags }}
<div class="align_menu"><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a></div>
{{ end }}
{{ end }}
</aside>
{{ end }}
{{ end }}
{{ define "pagefooter" }}
{{ if and (eq .Kind "page") (or (eq .Section "news") (eq .Section "events") (eq .Section "about")) }}
<div class="article_footer">
{{ with .Params.foundations }}
<b>Träger der Veranstaltung:</b>
<div class="article_footer_foundations1">
{{ range . }}
{{ $l := . }}
{{ $url := "" }}
{{ if isset site.Params.foundations $l }}
{{ $url = index site.Params.foundations $l }}
{{ end }}
{{- $res_im := resources.GetMatch (printf "/images/foundations/%s*" $l ) -}}
{{ if $res_im }}
<div class="article_footer_item1">
{{ if $url }}<a href="{{ $url | safeHTML }}">{{ end }}<img src="{{- $res_im.Permalink -}}" class="borderrad4px article_footer_item1" /> {{ if $url }}</a>{{ end }}
</div>
{{ else }}
<div class="article_footer_item1">
assets/images/foundations/{{- $l -}} .* missing
</div>
{{ end }}
{{ end }}
</div>
{{ end }}
<div class="article_footer_foundations2">
<div class="article_footer_item2">
<b>{{ if i18n "created" }}{{ i18n "created" }}{{ else }}{{ "Created" }}{{ end }}</b>
{{ .Date | time.Format ":date_full" }}
</div>
{{ if ne .Date .Lastmod }}
<div class="article_footer_item2">
<b>{{ if i18n "lastmod" }}{{ i18n "lastmod" }}{{ else }}{{ "Last modification" }}{{ end }}</b>
{{ .Lastmod | time.Format ":date_full" }}
</div>
{{ end }}
</div>
</div>
{{ end }}
{{ end }}