freedom/layouts/partials/sidebar.html
2022-09-20 22:56:20 -04:00

51 lines
No EOL
1.2 KiB
HTML

<div class="section-heading">
<h1>Recent Content</h1>
</div>
{{range first 3 .Site.RegularPages}}
<section class="recent">
<a href="{{.Permalink}}">
{{ 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}}
<img src="{{.Site.BaseURL}}{{.Params.image}}">
{{else}}
<img src="{{.Site.BaseURL}}/res/default.png">
</a>
{{end}}
{{end}}
{{end}}
</a>
<div>
<a href="{{.Permalink}}"><h2>{{.Title}}</h2></a>
<p>{{.Params.description}}</p>
</div>
</section>
{{end}}
{{if .Site.Data.details.featured}}
<div class="section-heading">
<h2>Featured</h2>
</div>
{{ range .Site.Data.details.featured}}
<section class="featured">
<a href="{{.href}}">
<img src="{{.img}}">
</a>
<div>
<a href="{{.href}}">
<h3>{{.title}}</h3>
</a>
<p>{{.description}}</p>
</div>
</section>
{{end}}
{{end}}