<header class="site-header">
  <div class="container site-branding">
    <a class="site-logo" href="{{ "/" | relURL }}" rel="home">
      {{ with resources.Get site.Params.logo }}
        {{ $l := .Resize "160x png" }}
        <img src="{{ $l.RelPermalink }}" width="{{ $l.Width }}" height="{{ $l.Height }}"
             alt="Wappen des Motorradclub Giebelwald">
      {{ end }}
    </a>
    <div class="site-titles">
      <p class="site-title"><a href="{{ "/" | relURL }}" rel="home">{{ site.Title }}</a></p>
      <p class="site-tagline">{{ site.Params.tagline }}</p>
    </div>
  </div>

  {{ with resources.Get site.Params.banner }}
    {{ $banner := .Resize "1600x webp q80" }}
    <img class="site-banner" src="{{ $banner.RelPermalink }}"
         width="{{ $banner.Width }}" height="{{ $banner.Height }}"
         alt="" loading="eager" decoding="async">
  {{ end }}

  <nav class="site-nav" aria-label="Hauptnavigation">
    <div class="container">
      <ul class="nav-list">
        <li><a href="{{ "/" | relURL }}"{{ if .IsHome }} aria-current="page"{{ end }}>Start</a></li>
        {{ range site.Menus.main }}
          {{ $active := or ($.IsMenuCurrent "main" .) ($.HasMenuCurrent "main" .) }}
          <li><a href="{{ .URL }}"{{ if $active }} aria-current="page"{{ end }}>{{ .Name }}</a></li>
        {{ end }}
      </ul>
    </div>
  </nav>
</header>
