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 }}">
|
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-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 }}
|