valor/layouts/partials/post.html

26 lines
No EOL
619 B
HTML

<div 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.image}}<img loading="lazy" src="{{.Site.BaseURL}}{{.Params.image}}">
{{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}}
</div>