2023-03-11 11:41:19 +01:00
|
|
|
{{ define "main" }}
|
|
|
|
<h1>{{ .Title }}</h1>
|
2023-03-30 00:34:36 +02:00
|
|
|
{{ $pages := .Site.GetPage "/pages" }}
|
|
|
|
{{ $page := . }}
|
2023-03-11 14:07:49 +01:00
|
|
|
{{ with .Resources.GetMatch "image.jpg" }}
|
2023-03-30 00:34:36 +02:00
|
|
|
<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>
|
2023-03-30 00:34:36 +02:00
|
|
|
<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 }}
|