25 lines
680 B
HTML
25 lines
680 B
HTML
{{ define "main" }}
|
|
<h1>{{ .Title }}</h1>
|
|
{{ $pages := .Site.GetPage "/pages" }}
|
|
{{ $page := . }}
|
|
{{ with .Resources.GetMatch "image.jpg" }}
|
|
<article class="{{ if $pages.InSection $page }}page{{ else }}post{{ end }}">
|
|
<section class="image">
|
|
<img alt="{{ .Title }}" src="{{ .RelPermalink }}">
|
|
{{ $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 }}
|
|
</section>
|
|
<section class="text">{{ $page.Content }}</section>
|
|
</article>
|
|
{{ else }}
|
|
{{ .Content }}
|
|
{{ end }}
|
|
{{ end }}
|