1
mirror of https://github.com/jlelse/GoBlog synced 2024-06-02 18:14:28 +00:00
GoBlog/templates/photosummary.gohtml
2020-10-12 18:47:23 +02:00

12 lines
411 B
Plaintext

{{ define "photosummary" }}
<article>
{{ with p .Data "title" }}<h2>{{ . }}</h2>{{ end }}
{{ with .Data.Published }}<p>{{ dateformat . "02. Jan 2006" }}</p>{{ end }}
{{ range $i, $photo := ( ps .Data .Blog.Photos.Parameter ) }}
{{ md ( printf "![](%s)" $photo ) }}
{{ end }}
<p>{{ summary .Data }}</p>
<a href="{{ .Data.Path }}">View</a>
</article>
<hr>
{{ end }}