<header>
  {{- if and (ne .Kind "home") (ne .RelPermalink "/search/") }}
    <form autocomplete="off" action="{{ "search" | absURL }}">
      <div class='form-container'>
        <input id="search-input" type="search" size="31" maxlength="255" value=""
               aria-label="Search the AFP" list="autocomplete"><button
               id="search-button" type="button">
          <img src="{{ .Site.BaseURL }}images/search.svg" alt="Search"/>
        </button>
        <datalist id="autocomplete">
        </datalist>
      </div>
    </form>
  {{- end }}
  {{- .Scratch.Set "title" (default .Site.Title (default .Title .Params.name)) }}
  {{- if and (eq .Section "authors") (isset .Site.Data.authors (.Scratch.Get "title")) }}
    {{- .Scratch.Set "title" (index (index .Site.Data.authors (.Scratch.Get "title")) "name") }}
  {{- end }}
  <h1
    {{- if or (eq .Kind "home" ) (eq .RelPermalink "/search/") }}
      class="large-top-margin"
    {{- end }}>
    {{ (.Scratch.Get "title") | replaceRE "[A-Z]" "<span class='first'>$0</span>" | safeHTML }}
    {{ if and (eq .Section "dependencies") (eq .Kind "term") }} Dependents {{ end }}
  </h1>
  <div>
    {{- if (eq .Section "authors") }}
      {{- with (index $.Site.Data.authors .Title )}}
        {{- with .website}}
          <p><a href="{{ . }}">{{ . }}</a></p>
        {{- end }}
      {{- end }}
    {{- end }}
    {{- $site := . }}
    {{- with .Params.authors}}
      <p>
        {{ partial "authors.html" (dict "site" $site "authors" . "affiliations"
           $site.Params.affiliations) }}
        {{- with $site.Params.contributors }}
          with contributions from
          {{ partial "authors.html" (dict "site" $site "authors" . "affiliations"
             $site.Params.affiliations) }}
        {{- end }}
      </p>
    {{- end }}
    {{- with .Params.date }}
      <p class="date">{{ dateFormat "January 2, 2006" . }}</p>
    {{- end }}
  </div>
</header>