diff options
Diffstat (limited to 'layouts/_partials/featured-card.html')
| -rw-r--r-- | layouts/_partials/featured-card.html | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/layouts/_partials/featured-card.html b/layouts/_partials/featured-card.html new file mode 100644 index 0000000..cf2618f --- /dev/null +++ b/layouts/_partials/featured-card.html @@ -0,0 +1,23 @@ +{{ $page := .page }} + +<article class="featured-article"> + {{ if $page.Params.image }} + <div class="featured-image"> + <img src="{{ $page.Params.image }}" alt="{{ $page.Title }}" loading="lazy"> + </div> + {{ end }} + + <div class="featured-body"> + <div class="featured-header"> + <span class="featured-type-badge" style="color: var(--type-{{ $page.Params.type }});"> + {{ $page.Params.type }} + </span> + <span class="featured-date">$ {{ $page.Date.Format "2006-01-02" }}</span> + </div> + <h2 class="featured-title">{{ $page.Title }}</h2> + {{ with $page.Params.description }} + <p class="featured-excerpt">{{ . }}</p> + {{ end }} + <a href="{{ $page.RelPermalink }}" class="featured-link">Read the full article →</a> + </div> +</article> |
