<!DOCTYPE html>
<html lang="en" data-fa-kit-code="b10bfbde90" data-cdn-url="{% cdnUrl %}" class="wa-cloak">
  <head>
    {% include 'head.njk' %}
    <meta name="theme-color" content="#f36944">

    <script type="module" src="/assets/scripts/code-examples.js"></script>
    <script type="module" src="/assets/scripts/scroll.js"></script>
    <script type="module" src="/assets/scripts/turbo.js"></script>
    <script type="module" src="/assets/scripts/search.js"></script>
    <script type="module" src="/assets/scripts/outline.js"></script>
    {% if hasSidebar %}<script type="module" src="/assets/scripts/sidebar.js"></script>{% endif %}
    {% if hasSidebar %}<script type="module" src="/assets/scripts/sidebar-tweaks.js"></script>{% endif %}
    <script defer data-domain="backers.webawesome.com" src="https://plausible.io/js/script.js"></script>

    {# Docs styles #}
    <link rel="stylesheet" href="/assets/styles/docs.css" />

    {% block head %}{% endblock %}
  </head>
  <body class="layout-{{ layout | stripExtension }}{{ ' page-wide' if wide }}">
    <!-- use view="desktop" as default to reduce layout jank on desktop site. -->
    <wa-page view="desktop" disable-navigation-toggle="" mobile-breakpoint="1180">
      <header slot="header" class="wa-split">
        {# Logo #}
        <div id="docs-branding">
          {# Nav toggle #}
          <wa-button appearance="plain" size="small" data-toggle-nav>
            <wa-icon name="bars" label="Toggle navigation"></wa-icon>
          </wa-button>

          <a href="/" aria-label="Web Awesome">
            <span class="wa-desktop-only">{% include "logo.njk" %}</span>
            <span class="wa-mobile-only">{% include "logo-simple.njk" %}</span>
          </a>
          <small id="version-number" class="wa-desktop-only">{{ package.version }}</small>
          <wa-badge variant="warning" appearance="filled" class="wa-desktop-only">Alpha</wa-badge>
        </div>

        <div id="docs-toolbar" class="wa-cluster wa-gap-xs">
          {# Desktop selectors #}
          <div class="wa-desktop-only wa-cluster wa-gap-xs">
            {% include "preset-theme-selector.njk" %}
            {% include "color-scheme-selector.njk" %}
          </div>

          {# Search #}
          <wa-button id="search-trigger" appearance="outlined" size="small" data-search>
            <wa-icon slot="start" name="magnifying-glass"></wa-icon>
            Search
            <kbd slot="end" class="wa-desktop-only">/</kbd>
          </wa-button>

          {# Login #}
          {% server "loginOrAvatar" %}
        </div>
      </header>

      {# Sidebar #}
      {% if hasSidebar %}
        {# Mobile selectors #}
        <div class="wa-mobile-only" slot="navigation-header">
          <div class="wa-cluster wa-gap-xs">
            {% include "preset-theme-selector.njk" %}
            {% include "color-scheme-selector.njk" %}
          </div>
        </div>
        <div slot="navigation" id="sidebar" class="docs-aside" data-remember-scroll>
          {% include "sidebar.njk" %}
        </div>
      {% endif %}

      {# Outline #}
      {% if hasOutline %}
        <aside slot="aside" id="outline" class="docs-aside">
          <nav id="outline-standard" class="outline-links">
            <h2><a href="#content">{{ title }}</a></h2>
          </nav>
        </aside>
      {% endif %}


      {# Main #}
      <main id="content">
        {# Expandable outline #}
        {% if hasOutline %}
        <nav id="outline-expandable">
          <details class="outline-links">
            <summary>On this page</summary>
          </details>
        </nav>
        {% endif %}

        <div id="flashes">{% server "flashes" %}</div>

        {% block header %}
          {% include 'breadcrumbs.njk' %}
          <h1 class="title">{{ title }}</h1>
        {% endblock %}

        {% block content %}
          {{ content | safe }}
        {% endblock %}

        {% block afterContent %}{% endblock %}
      </main>

      {% include 'search.njk' %}
    </wa-page>

  </body>
</html>
