<header role="banner">
  <div class="topbar" data-home="{{ "/" | relURL }}" data-info="{{ .Site.Params.description }}" data-email="{{ .Site.Params.email }}">
    <div class="prompt" aria-label="shell">
      <a class="prompt__seg prompt__user" href="{{ "/" | relURL }}">{{ .Site.Params.shellUser }}@{{ .Site.Params.shellHost }}</a><span class="prompt__path">:~{{ if not .IsHome }}{{ $rel := strings.TrimSuffix "/" .RelPermalink }}{{ $parts := after 1 (split $rel "/") }}{{ $last := sub (len $parts) 1 }}{{ $acc := "" }}{{ range $i, $seg := $parts }}{{ $acc = printf "%s/%s" $acc $seg }}{{ $disp := $seg }}{{ if and $.Params.dotfile (eq $i $last) }}{{ $disp = printf ".%s" $seg }}{{ end }}/<a class="prompt__seg" href="{{ (printf "%s/" $acc) | relURL }}">{{ $disp }}</a>{{ end }}{{ end }}$</span><span class="prompt__input" contenteditable="true" role="textbox" aria-label="type a command, then press enter" spellcheck="false"></span><span class="caret">_</span>
    </div>
    <p class="prompt__out" aria-live="polite"></p>
    <nav class="menu tui tui--files" aria-label="Main menu">
      <p class="tui__cmd"><span class="tui__sym">$</span> ls</p>
      <ul class="tui__ls">
        {{ range .Site.Menus.main }}<li><a href="{{ .URL | relURL }}" data-name="{{ .Name | lower }}">
          <span class="tui__perm">drwxr-xr-x</span><span class="tui__name">{{ .Name | lower }}/</span>
        </a></li>{{ end }}
      </ul>
    </nav>
    {{ if eq .Section "portfolio" }}
    <nav class="routes" hidden aria-hidden="true">
      {{ range (where .Site.RegularPages "Section" "portfolio") }}<a href="{{ .RelPermalink }}" data-name="{{ .Slug }}"></a>{{ end }}
    </nav>
    {{ end }}
  </div>
</header>
