{{ $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>
