terms list with thumbnails

This commit is contained in:
2020-11-12 22:05:39 +01:00
parent 5986899c43
commit 9c739fc0e5
3 changed files with 41 additions and 3 deletions
@@ -0,0 +1,38 @@
{{ $image := partial "func/GetNamedImage.html" (dict "context" . "name" "featured_image") }}
{{ $image_link := ""}}
{{ with $image }}
{{ $image_link = $image.Permalink }}
{{ end }}
<article class="bb b--light-gray">
<div class="db no-underline dark-gray">
<div class="f6 pa1 small-caps b pa1 gray bg-light-gray">
<div class="flex justify-between">
<div>
{{- .Params.Sports -}}
</div>
{{ partial "formatted-date.html" . }}
</div>
</div>
<div class="flex flex-column flex-row-ns pl1 pr1">
{{ if $image_link }}
<div class="pr3-ns pt1 w-50 w-20-ns">
<a href="{{.Permalink}}" class="db grow">
<img src="{{ $image_link }}" class="img" loading="lazy" alt="image from {{ .Title }}">
</a>
</div>
{{ end }}
<div class="blah w-100{{ if $image_link }} w-60-ns {{ end }}">
<h1 class="f3 fw1 athelas mt3 lh-title">
<a href="{{.Permalink}}" class="color-inherit dim link">
{{ .Title }}
</a>
</h1>
<div class="f6 f5-l lh-copy nested-copy-line-height nested-links">
{{ .Summary }}
</div>
</div>
</div>
</div>
</article>