oxil-net1
Version:
Oxford Information Labs Netistrar Theme
40 lines (32 loc) • 1.29 kB
HTML
{{- $taxonomy := .Get "taxonomy" -}}
<div class="flex flex-wrap flex-gutter-2-050">
{{- with (index .Site.Taxonomies.categories $taxonomy) -}}
{{- range first 2 . -}}
<div class="w-50 flex flex-col mb2">
{{- $img := .Resources.GetMatch "*featured*" -}}
{{- $permalink := .RelPermalink -}}
{{- with $img -}}
{{- $small := .Resize "600x" -}}
<div class="aspect sixteen-nine two-one-sm">
<img class="cover abs" src="{{ $small.RelPermalink }}" alt="{{ $img.Title }}"></img>
<a href="{{$permalink}}" class="link-over"></a>
</div>
{{- end -}}
<div class="ge flex1 p1 flex flex-col justify-between">
<div>
<ul class="unstyled comma-separated small uppercase ">
{{- range .Params.categories -}}
<li><a class="inverse normal g6-text" href="/categories/{{ . | urlize }}/">{{T . }}</a></li>
{{- end -}}
</ul>
<h3 class="lh-title mt0 "><a class="inv bold" href="{{.RelPermalink}}">{{.Title}}</a>
</h3>
</div>
<time class="small muted-text" datetime="{{ dateFormat "2006-01-02T15:04:05-07:00" (default .Date (.PublishDate)) }}">
{{- dateFormat "2 Jan, 2006" (default .Date (.PublishDate)) -}}
</time>
</div>
</div>
{{- end -}}
{{- end -}}
</div>