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

25 lines
680 B
HTML
Raw Permalink Normal View History

2023-03-11 11:41:19 +01:00
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ $pages := .Site.GetPage "/pages" }}
{{ $page := . }}
2023-03-11 14:07:49 +01:00
{{ with .Resources.GetMatch "image.jpg" }}
<article class="{{ if $pages.InSection $page }}page{{ else }}post{{ end }}">
2023-03-11 15:04:07 +01:00
<section class="image">
<img alt="{{ .Title }}" src="{{ .RelPermalink }}">
2023-03-11 16:12:55 +01:00
{{ $params := .Params }}
{{ with $params.copyright }}
{{ $copyright := . }}
{{ with $params.copyright_url }}
by <a href="{{ . }}"{{ if hasPrefix . "https://" }} target="_blank"{{ end }}>{{ $copyright }}</a>
{{ else }}
by {{ $copyright }}
{{ end }}
{{ end }}
2023-03-11 15:04:07 +01:00
</section>
<section class="text">{{ $page.Content }}</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 }}