mirror of
https://github.com/theNewDynamic/gohugo-theme-ananke.git
synced 2025-06-08 17:22:46 +00:00
feat: show featured image in summary (when available)
Display the feature image as a preview when displaying a list of pages.
This commit is contained in:
parent
a1a99cf126
commit
f9595c791a
@ -1,6 +1,12 @@
|
||||
{{ $featured_image := partial "func/GetFeaturedImage.html" . }}
|
||||
<div class="relative w-100 mb4 bg-white nested-copy-line-height">
|
||||
<div class="bg-white mb3 pa4 gray overflow-hidden">
|
||||
{{with .CurrentSection.Title }}<span class="f6 db">{{ . }}</span>{{end}}
|
||||
{{ if $featured_image }}
|
||||
<a href="{{ .RelPermalink }}" class="link black dim">
|
||||
<div class="featured_image" style="background: url("{{ $featured_image }}") center center / cover no-repeat; height: 200px;"></div>
|
||||
</a>
|
||||
{{ end }}
|
||||
<h1 class="f3 near-black">
|
||||
<a href="{{ .RelPermalink }}" class="link black dim">
|
||||
{{ .Title }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user