forked from Bunteshaus/bunteshaus.de
34 lines
1.3 KiB
HTML
34 lines
1.3 KiB
HTML
|
{{ define "intro" }}
|
||
|
{{ if ne .Content "" }}
|
||
|
{{ partial "snippets/content" (dict "content" .Content) }}
|
||
|
{{ end }}
|
||
|
{{ end }}
|
||
|
|
||
|
|
||
|
{{ define "content" }}
|
||
|
{{- $paginator := "" -}}
|
||
|
{{- $partial := "gen_list" -}}
|
||
|
{{- $paginate := true -}}
|
||
|
{{- $pages := .Data.Pages -}}
|
||
|
|
||
|
{{ $partial = string (printf "news/%s" $partial) }}
|
||
|
{{ partial $partial (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" $paginate) }}
|
||
|
{{ end }}
|
||
|
|
||
|
{{ define "sidebar" }}
|
||
|
{{ if gt .Site.Taxonomies.categories 0 }}
|
||
|
<aside class="sidebar">
|
||
|
<h3 class="align_menu">{{ if i18n "categories" }}{{ i18n "categories" }}{{ else }}{{ "Categories" }}{{ end }}</h3>
|
||
|
{{ range $taxonomyname, $taxonomy := .Site.Taxonomies.categories }}
|
||
|
{{ $orig := $taxonomyname }}
|
||
|
{{ if ne (i18n $taxonomyname) "" }}
|
||
|
{{ $taxonomyname = i18n $taxonomyname }}
|
||
|
{{ else }}
|
||
|
{{ $taxonomyname = $taxonomyname | humanize }}
|
||
|
{{ end }}
|
||
|
<div class="align_menu"><a href="{{ "categories/" | relLangURL}}{{ $orig | urlize }}">{{ $taxonomyname }}</a></div>
|
||
|
{{ end }}
|
||
|
</aside>
|
||
|
{{ end }}
|
||
|
{{ end }}
|