bunteshaus.de/themes/buha/layouts/contact/list.html
2022-06-22 18:15:37 +02:00

41 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 "content" }}
{{ $text := "solo" }}
{{ $content := .Content }}
<article>
<section>
<div class="articleinner">
<div class="articletext {{ $text }}">
{{ partial "snippets/contact" (dict "context" .) }}
{{ $content }}
{{ if .Resources.ByType "image" }}
{{ range .Resources.ByType "image" }}
{{ $picname := . }}
{{ if not (or (in $content $picname.Name ) (hasPrefix $picname.Name "banner") )}}
<div class="article-image">
<a href="{{- $picname.Permalink -}}" class="no_underline">
<img loading="lazy"
src="{{ .Permalink }}"
alt="{{ . }}"
{{ with .Title}} title="{{ . }}"{{ end }}
width={{ $picname.Width }}
height="{{ $picname.Height }}" />
</a>
</div>
{{ end }}
{{ end }}
{{ end }}
</div>
</div>
</section>
</article>
{{ end }}