bunteshaus.de/themes/buha/layouts/newsletter/list.html
2022-06-17 17:45:53 +02:00

33 lines
865 B
HTML

{{ define "content" }}
<article>
{{- if .Description -}}
<p>{{ .Description }}</p>
{{ end }}
{{ $content := .Content }}
{{ if or .Content (.Resources.ByType "image")}}
<div class="article_content">
{{- if .Content -}}
{{- $content -}}
{{ end }}
{{ if .Resources.ByType "image" }}
{{ range .Resources.ByType "image" }}
{{ $picname := . }}
{{ if not (or (in $content $picname ) (hasPrefix $picname "banner") )}}
<a href="{{- $picname.Permalink -}}" class="article_image no_underline">
<img loading="lazy"
src="{{ .Permalink }}"
alt="{{ . }}"
{{ with .Title}} title="{{ . }}"{{ end }}
width={{ $picname.Width }}
height="{{ $picname.Height }}" /><br>
</a>
{{ end }}
{{ end }}
{{ end }}
</div>
{{ end }}
</article>
{{ end }}