www.kontakt-bamberg.de/layouts/_default/single.html

16 lines
485 B
HTML
Raw Normal View History

2023-03-11 11:41:19 +01:00
{{ define "main" }}
<h1>{{ .Title }}</h1>
2023-03-11 14:07:49 +01:00
{{ $textContent := .Content }}
{{ with .Resources.GetMatch "image.jpg" }}
2023-03-11 16:04:10 +01:00
<article class="page">
2023-03-11 14:07:49 +01:00
<section class="text">{{ $textContent }}</section>
2023-03-11 15:04:07 +01:00
<section class="image">
<img alt="{{ .Title }}" src="{{ .RelPermalink }}">
by <a href="{{ .Params.copyright_url }}"{{ if hasPrefix .Params.copyright_url "https://" }} target="_blank"{{ end }}>{{ .Params.copyright }}</a>
</section>
2023-03-11 14:07:49 +01:00
</article>
{{ else }}
2023-03-11 11:41:19 +01:00
{{ .Content }}
{{ end }}
2023-03-11 14:07:49 +01:00
{{ end }}