staticsite/themes/fiscleconsult/layouts/partials/aside.html

46 lines
1.2 KiB
HTML
Raw Normal View History

2020-12-09 00:23:56 +00:00
<aside class="single">
{{ $related := .Site.RegularPages.Related . | first 5 }}
{{ with $related }}
<h3>See Also</h3>
<div class="related-articles">
{{ range . }}
{{ $dateTime := .PublishDate.Format "2006-01-02" }}
{{ $dateFormat := .Site.Params.dateFormat | default "Jan 2, 2006" }}
<article class="article">
<a href="{{ .RelPermalink }}" class="article">
<div class="article">
<img src="{{.Params.image }}" alt="" srcset="{{.Params.image }}" class="article">
</div>
</a>
<div class="info article">
<h1 class=" article title">
<a href="{{ .RelPermalink }}" class="article title">{{ .Title }}</a>
</h1>
<div class="article metadata">
<time datetime="{{ $dateTime }}">{{ .PublishDate.Format $dateFormat }}</time>
</div>
<div class="article summary">
<p>{{.Summary}}</p>
<a href="{{ .RelPermalink }}" class="more article">
Read more »
</a>
</div>
</div>
</article>
{{end}}
</div>
{{ end }}
</aside>