diff options
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/post.html | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/layouts/partials/post.html b/layouts/partials/post.html index a950810..fa6d485 100644 --- a/layouts/partials/post.html +++ b/layouts/partials/post.html @@ -2,7 +2,13 @@ <a class="db no-underline dim near-black" href="{{ .RelPermalink }}"> <h3 class="f3 baskerville mt0 lh-title">{{ .Title }}</h3> <div class="cf"> - {{ with resources.Get (index .Params.images 0) }} + {{ $image := "" }} + {{ if resources.Get (index .Params.images 0) }} + {{ $image = resources.Get (index .Params.images 0) }} + {{ else if (.Resources.ByType "image").GetMatch "*featured*" }} + {{ $image = (.Resources.ByType "image").GetMatch "*featured*" }} + {{ end }} + {{ with $image }} {{ $image := .Resize (default "320x" .Params.thumbnail_size) }} <div class="fl-ns mb4 mb0-ns pr3-ns"> <img src="{{ $image.RelPermalink }}" class="db center" /> @@ -14,7 +20,7 @@ </div> </div> </a> - {{ if isset .Params "metadata" }} + {{ if in (slice "post" "talk") .Section }} {{ partial "metadata.html" . }} {{ end }} </article> |