Skip to content

Commit

Permalink
feat: show featured image in summary (when available) theNewDynamic#651
Browse files Browse the repository at this point in the history
  • Loading branch information
claytonbrown committed Jul 6, 2024
2 parents 33fbda0 + f9595c7 commit 29789d0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions layouts/_default/summary.html
Original file line number Diff line number Diff line change
@@ -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(&quot;{{ $featured_image }}&quot;) center center / cover no-repeat; height: 200px;"></div>
</a>
{{ end }}
<h1 class="f3 near-black">
<a href="{{ .RelPermalink }}" class="link black dim">
{{ .Title }}
Expand Down

0 comments on commit 29789d0

Please sign in to comment.