freedom/layouts/partials/item.html
2022-09-18 16:21:16 -04:00

37 lines
No EOL
972 B
HTML

<section class="listing">
<div>
{{ if .Params.gif}}
<video autoplay loop preload="true">
<source src="{{.Site.BaseURL}}{{.Params.gif}}">
</video>
{{else}}
{{ if .Params.video}}
<video controls preload="false">
<source src="{{.Site.BaseURL}}{{.Params.video}}">
</video>
{{else}}
{{if .Params.image}}
<a href="{{.Site.BaseURL}}{{.Permalink}}">
<img src="{{.Site.BaseURL}}{{.Params.image}}">
</a>
{{else}}
<a href="{{.Site.BaseURL}}{{.Permalink}}">
<img src="{{.Site.BaseURL}}/res/default.png">
</a>
{{end}}
{{end}}
{{end}}
</div>
<div>
<a href="{{.Permalink}}"><h2>{{.Title}}</h2></a>
<p>{{.Params.description}}</p>
{{if .GetTerms "tags"}}
<div class="tags">
{{ range (.GetTerms "tags")}}
<a href="{{.Permalink}}">{{.LinkTitle}}</a>
{{end}}
</div>
{{end}}
</div>
</section>