small fixes

This commit is contained in:
teldra 2022-06-22 18:24:04 +02:00
parent 0a4f32193c
commit 257ed5aa14
2 changed files with 0 additions and 92 deletions

View File

@ -1,90 +0,0 @@
{{ define "content" }}
{{ if .Layout }}
{{ $partial := printf "layout/%s" .Layout }}
<article>
{{ partial $partial (dict "context" . "content" .Content) }}
</article>
{{ end }}
{{ end }}
{{ define "sidebar" }}
{{ if ne .Type "tools" }}
<aside class="sidebar">
{{ if or .Params.categories .Params.events }}
<h3 class="align_menu">{{ if i18n "categories" }}{{ i18n "categories" }}{{ else }}{{ "Categories" }}{{ end }}</h3>
{{ end }}
{{ if .Params.categories }}
{{ range .Params.categories }}
<div class="align_menu"><a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}">{{ . }}</a></div>
{{ end }}
{{ end }}
{{ if .Params.events }}
{{ 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 }}
{{ $related := .Site.RegularPages.RelatedIndices . "tags" | first 5 }}
{{ if $related }}
<h3 class="align_menu">Related</h3>
{{ range $related }}
<div class="align_menu"><a href="{{ .Permalink }}">{{ .Title }}</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 }}
<div class="bold">Träger der Veranstaltung:</div>
<div class="foundations_items">
{{ 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="foundations_item">
{{ if $url }}<a href="{{ $url | safeHTML }}">{{ end }}<img src="{{- $res_im.Permalink -}}" class="borderrad4px article_footer_item1" /> {{ if $url }}</a>{{ end }}
</div>
{{ else }}
{{ if eq hugo.Environment "development" }}
<div class="foundations_item">
assets/images/foundations/{{- $l -}} .* missing
</div>
{{ else }}
picture missing.
{{ end }}
{{ end }}
{{ end }}
</div>
{{ end }}
<div class="mod_times">
<div class="mod_times_item">
<div class="bold">{{ if i18n "created" }}{{ i18n "created" }}{{ else }}{{ "Created" }}{{ end }}: </div>
<div>{{ .Date | time.Format ":date_full" }}</div>
</div>
{{ if ne .Date .Lastmod }}
<div class="mod_times_item">
<div class="bold">{{ if i18n "lastmod" }}{{ i18n "lastmod" }}{{ else }}{{ "Last modification" }}{{ end }}: </div>
<div>{{ .Lastmod | time.Format ":date_full" }}</div>
</div>
{{ end }}
</div>
</div>
{{ end }}
{{ end }}

View File

@ -118,8 +118,6 @@
{{ 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="foundations_item">