bunteshaus.de/themes/buha/layouts/_default.old/single.html
2022-04-09 21:34:22 +02:00

47 lines
1.2 KiB
HTML

{{ define "title" }}
{{ $name := .Title }}
{{ if lower $name | i18n }}
{{ $name = lower $name | i18n }}
{{ end }}
<h1>{{ $name }}</h1>
{{ end }}
{{ define "main" }}
{{ partial "debug" (dict "context" . "caller" "single.html" )}}
<article>
{{ if eq .Type "tools" }}
<article>
{{ $tool := printf "misc/%s" .Params.tool }}
{{ partial $tool . }}
</article>
{{ else }}
<article>
{{ partial "contentlayouts/article.html" (dict "context" . "type" "article") }}
</article>
{{ end }}
{{ end }}
{{ define "pagefooter" }}
{{ if and (ne .Section "misc") (eq .Type "tools") }}
<div id="article_footer">
<div style="flex-grow: 1; flex-direction: column;">
<b>{{ if i18n "created" }}{{ i18n "created" }}{{ else }}{{ "Created" }}{{ end }}</b><br>
{{ .Date | time.Format ":date_full" }}
</div>
{{ if ne .Date .Lastmod }}
<div style="flex-grow: 1; flex-direction: column;">
<b>{{ if i18n "lastmod" }}{{ i18n "lastmod" }}{{ else }}{{ "Last modification" }}{{ end }}</b><br>
{{ .Lastmod | time.Format ":date_full" }}
</div>
{{ end }}
</div>
{{ end }}
{{ end }}
{{ define "sidebar" }}
{{ if ne .Type "tools" }}
{{- partial "contentlayouts/menu.html" . }}
{{ end }}
{{ end }}