<!DOCTYPE html>

<html

  {% if site.google_analytics %}
    data-gaid="{{ site.google_analytics.id }}"
  {% endif %}
  lang="{{ page.lang | default: site.lang | default: "en" }}">

{% include head.html %}

<body class="{{ page.bodyClass | default: layout.bodyClass }}">
  <header class="{% if site.has_brand_name %}brand{% endif %}">
    <div class="site-headline">
      <div class="parent-org-reference">
        <a href="/" class="logo-link">
          <img src="{{ "/assets/logo-iso-noninverted.svg" | relative_url }}" alt="ISO">
        </a>
      </div>

      <div class="site-title">
        <span class="committee-widget">
          <span class="widget-group">
            <span class="widget-item parent-org-reference">
              ISO
            </span>
            <span class="widget-item committee-id">
              TC {{ site.committee.id }}
            </span>
            <span class="widget-item committee-name">
              {{ site.committee.name }}
            </span>

            {% if page.layout == "home" and site.always_show_committee_link_on_landing and site.committee.home %}
              <a href="{{ site.committee.home }}" class="widget-item home">
                <i class="fas fa-home"></i>
                Committee site
              </a>
            {% endif %}
          </span>

          {% if site.committee.home or site.committee.links %}
            <span class="widget-group committee-menu">
              {% unless page.layout == "home" and site.always_show_committee_link_on_landing and site.committee.home %}
                <a href="{{ site.committee.home }}" class="widget-item home">
                  <i class="fas fa-home"></i>
                  Committee site
                </a>
              {% endunless %}
              {% if site.committee.links %}
                {% for link in site.committee.links %}
                  <a href="{{ link.url }}" class="widget-item">
                    {{ link.title }}
                  </a>
                {% endfor %}
              {% endif %}
            </span>
          {% endif %}
        </span>

        <h1 class="title">
          <a href="/">{{ site.title_html | default: site.title }}</a>
        </h1>
      </div>
    </div>

    {% assign nav_items = page.nav_items | default: layout.nav_items %}
    {% if nav_items %}
      <nav class="priority-nav">
        <ul>
          {% for item in nav_items %}
            {% assign item_data = site.nav.items | where_exp: "nav_item", "nav_item.id == item" | first %}
            {% if item_data %}
              <li>
                <a href="{{ item_data.url }}">{{ item_data.title }}</a>
              </li>
            {% endif %}
          {% endfor %}
        </ul>
      </nav>
    {% endif %}

    {% if site.nav %}
      <nav class="expandable-nav">
        <ul>
        {% for item in site.nav.items %}
          <li>
            <a href="{{ item.url }}">{{ item.title }}</a>
            {% if item.description %}
              <p class="desc">{{ item.description }}</p>
            {% endif %}
          </li>
        {% endfor %}
        </ul>
      </nav>
    {% endif %}
  </header>

  <main>
    {{ content }}
  </main>

  {% if site.awards and page.hide_awards != true %}
    <p class="awards">
      <i class="fa fa-certificate icon"></i>
      Winner of 
      {% for award in site.awards %}
        <span class="award">the <a href="{{ award.path }}"
          >{{ award.title }}</a>{%- unless forloop.last -%}, {% endunless %}</span>{% endfor %}.
    </p>
  {% endif %}

  <footer>
    <ul role="nav">
      {% for link in site.social.links %}
        <li>
          <a href="{{ link.url }}">
            {% if link.url contains "twitter.com" %}
              <i class="fab fa-twitter"></i>
            {% elsif link.url contains "github.com" %}
              <i class="fab fa-github"></i>
            {% elsif link.url contains "facebook.com" %}
              <i class="fab fa-facebook"></i>
            {% elsif link.url contains "linkedin.com" %}
              <i class="fab fa-linkedin"></i>
            {% else %}
              {{ link.title }}
            {% endif %}
          </a>
      {% endfor %}
      {% for item in site.footer_nav %}
        <li><a href="{{ item.url }}">{{ item.title }}</a>
      {% endfor %}
    </ul>

    <div class="powered-by">
      <span class="powered-by-text">Powered by</span>
      <a href="{{ site.powered_by.url }}" class="powered-by-logo"><img src="{{ site.powered_by.logo_path }}" alt="{{ site.powered_by.title }}"/></a>
    </div>

    <p class="legal">
      © All Rights Reserved
    </p>

    <div class="logo">
      <a href="https://www.iso.org/"><img src="{{ "/assets/logo-iso-noninverted.svg" | relative_url }}" alt="ISO organization"/></a>
    </div>
  </footer>

  {% include script.html %}

  <template id="expandableNavTrigger">
    <button class="nav-expand-trigger">
      <i class="fas fa-bars"></i>
      <i class="fas fa-times"></i>
    </button>
  </template>

  <script src="{{ "/assets/js/nav.js" | relative_url }}"></script>

  {% assign extra_scripts = page.extra_scripts | default: layout.extra_scripts %}
  {% if extra_scripts %}
    {% for sc in extra_scripts %}
      <script
        src="{{ sc.src }}"
        {% if sc.integrity %}integrity="{{ sc.integrity }}"{% endif %}
        {% if sc.crossorigin %}crossorigin="{{ sc.crossorigin }}"{% endif %}></script>
    {% endfor %}
  {% endif %}

</body>

</html>