{% include base_path %}
<div class="masthead">
  <div class="masthead__inner-wrap">
    <div class="masthead__menu">
      <nav id="site-nav" class="greedy-nav">
        <button><span class="navicon"></span></button>
        <ul class="visible-links">
          <li class="masthead__menu-item masthead__menu-item--lg persist {% if page.url == '/' or page.url == '/index.html' %}selected{% endif %}">
            <a href="{{ base_path }}/">{{ site.title }}</a>
          </li>
          {% for link in site.data.navigation.main %}
            {% if link.url contains 'http' %}
              {% assign domain = '' %}
            {% else %}
              {% assign domain = base_path %}
            {% endif %}
            <li class="masthead__menu-item {% if page.url contains link.url and link.url != '/' %}selected{% endif %}">
              <a href="{{ domain }}{{ link.url }}">{{ link.title }}</a>
            </li>
          {% endfor %}
          <li id="theme-toggle" class="masthead__menu-item persist tail">
            <a role="button" aria-labelledby="theme-icon"><i id="theme-icon" class="fa-solid fa-sun" aria-hidden="true" title="toggle theme"></i></a>
          </li>
        </ul>
        <ul class="hidden-links hidden"></ul>
      </nav>
    </div>
  </div>
</div>
