valor/layouts/partials/post.html
2022-09-17 19:22:44 -04:00

32 lines
No EOL
888 B
HTML

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