{{ if .Params.obsolete }}
  {{ $successor := false }}
  {{ with .Params.successor }}
    {{ $successor = site.GetPage . }}
  {{ end }}
  <div class="banner-obsolete" role="alert">
    <div class="banner-obsolete__inner">
      <i data-feather="alert-triangle" class="w-5 h-5 shrink-0" aria-hidden="true"></i>
      <span class="sr-only">{{ i18n "obsolete_label" }}</span>
      <div class="banner-obsolete__body">
        <p>{{ i18n "obsolete_warning" }}</p>
        {{ if $successor }}
          <a href="{{ $successor.Permalink }}" class="banner-obsolete__cta">
            {{ i18n "obsolete_read_updated" }}
            <i data-feather="arrow-right" class="w-4 h-4" aria-hidden="true"></i>
            <span>{{ $successor.Title }}</span>
          </a>
        {{ end }}
      </div>
    </div>
  </div>
{{ end }}
