valor/layouts/partials/post.html
2022-09-15 17:12:31 -04:00

24 lines
No EOL
639 B
HTML

<article class="post">
<a href="{{.Permalink}}"><h2>{{.Title}}</h2></a>
{{if .Date }}
<p>{{.Date | time.Format "Jan 02 2006"}}</p>
{{end}}
{{if .Params.video}}<video controls loop preload="none"><source src="{{.Params.video}}"></video>
{{else}}
{{if .Params.audio}}<audio controls preload="none"><source src="{{.Params.audio}}"></audio>
{{else}}
{{if .Params.image}}<img loading="lazy" src="{{.Params.image}}">
{{end}}
{{end}}
{{end}}
<p>{{.Summary}}</p>
{{ if .GetTerms "tags" }}
<div class="post-tags">
<span>Tags:</span>
{{range .GetTerms "tags" }}
<a href="{{.Permalink}}">{{.LinkTitle}}</a>
{{end}}
</div>
{{end}}
</article>