2020-09-21 16:03:05 +00:00
|
|
|
{{ define "title" }}
|
2020-10-06 17:07:48 +00:00
|
|
|
{{ $blog := (blog .Blog) }}
|
|
|
|
{{ if $blog.Photos.Title }}
|
|
|
|
<title>{{ $blog.Photos.Title }} - {{ $blog.Title }}</title>
|
2020-09-21 16:03:05 +00:00
|
|
|
{{ else }}
|
2020-10-06 17:07:48 +00:00
|
|
|
<title>{{ $blog.Title }}</title>
|
2020-09-21 16:03:05 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ define "main" }}
|
|
|
|
<main>
|
2020-10-06 17:07:48 +00:00
|
|
|
{{ $blog := (blog .Blog) }}
|
|
|
|
{{ with $blog.Photos.Title }}<h1>{{ . }}</h1>{{ end }}
|
|
|
|
{{ with $blog.Photos.Description }}{{ md . }}{{ end }}
|
|
|
|
{{ if (or $blog.Photos.Title $blog.Photos.Description) }}
|
2020-09-21 16:03:05 +00:00
|
|
|
<hr>
|
|
|
|
{{ end }}
|
|
|
|
{{ range $i, $post := .Posts }}
|
|
|
|
{{ include "photosummary" . }}
|
|
|
|
{{ end }}
|
|
|
|
{{ if .HasPrev }}
|
|
|
|
<p><a href="{{ .Prev }}">Prev</a></p>
|
|
|
|
{{ end }}
|
|
|
|
{{ if .HasNext }}
|
|
|
|
<p><a href="{{ .Next }}">Next</a></p>
|
|
|
|
{{ end }}
|
|
|
|
</main>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ define "photos" }}
|
|
|
|
{{ template "base" . }}
|
|
|
|
{{ end }}
|