{%- from "components/tagList.njk" import tagList with context -%}
<header>
  <nav>
    <div class="nav-row">
      <div class="nav-home"><a href="{{ "/" | url }}">{{ site.title }}</a></div>
    </div>
    <div class="nav-categories">
      <a class="{{ 'nav-active' if '/posts' in page.url }}" href="{{ "/posts/" | url }}">/posts</a>
      <a class="{{ 'nav-active' if '/about' in page.url }}" href="{{ "/about/" | url }}">/about</a>
      <a class="{{ 'nav-active' if '/now' in page.url }}" href="{{ "/now/" | url }}">/now</a>
      <a class="{{ 'nav-active' if '/uses' in page.url }}" href="{{ "/uses/" | url }}">/uses</a>
      <a class="{{ 'nav-active' if '/recipes' in page.url }}" href="{{ "/recipes/" | url }}">/recipes</a>
      <a class="{{ 'nav-active' if '/music' in page.url }}" href="{{ "/music/" | url }}">/music</a>
      <a class="{{ 'nav-active' if '/books' in page.url }}" href="{{ "/books/" | url }}">/books</a>
      <a class="{{ 'nav-active' if '/links' in page.url }}" href="{{ "/links/" | url }}">/links</a>
      <a class="{{ 'nav-active' if '/search' in page.url }}" href="{{ "/search/" | url }}">/search</a>
    </div>
  </nav>
  <h1>{{ title }}</h1>
  <div class="header-meta">
    {%- if author -%}
      <author>{{ author }}</author>
    {%- endif -%}
    {%- if date and not omitMetadata -%}
      <date>{{ date | formatDate("MMMM D, YYYY") }}</date>
    {%- endif -%}
    {# {%- if tags -%} #}
      {{ tagList(tags.slice(1)) }}
    {# {%- endif -%} #}
  </div>
</header>