<!DOCTYPE html>
<html lang="{{ site.lang | default: "en-US" }}">
  <head>
    <meta charset="UTF-8">

{% seo %}
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="theme-color" content="#157878">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <link rel="stylesheet" href="{{ 'assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
    <script src="{{ '/assets/js/highlight.9.12.0.min.js' | relative_url }}"></script>
    <script src="{{ '/assets/js/mermaid.8.9.2.min.js' | relative_url }}"></script>
    <script async defer src="https://buttons.github.io/buttons.js"></script>
    <script>
      hljs.initHighlightingOnLoad();

      var config = {
        startOnLoad:true,
        theme: 'forest',
        showSequenceNumbers: true,
        flowchart:{
          useMaxWidth:true,
          htmlLabels:true
        }
      };
      mermaid.initialize(config);
      document.addEventListener('DOMContentLoaded', (event) => {
        window.mermaid.init(undefined, document.querySelectorAll('.diagram'));
      })
    </script>
  </head>
  <body>
    <header class="page-header" role="banner">
      <img style="display: inline-block; padding-right: 0.5em; margin-bottom: 0.8em; width: 4rem" src="{{ 'assets/img/logo.svg?v=' | append: site.github.build_revision | relative_url }}" />
      <h1 style="display: inline-block; padding-right: 0.5em" class="project-name">{{ page.title | default: site.title | default: site.github.repository_name }}</h1>
      <a class="github-button" href="https://github.com/sponsors/postlund" data-icon="octicon-heart" aria-label="Sponsor @postlund on GitHub">Sponsor</a>
      <h2 class="project-tagline">{{ page.description | default: site.description | default: site.github.project_tagline }}</h2>
      {% for p in site.top_pages %}
        <a href="{{ p.link | relative_url }}" class="btn">
          {% assign sub = p.link | split:"/" %}
          {% if sub[1] == page.link_group %}
            <b>{{ p.title }}</b>
          {% else %}
            {{ p.title }}
          {% endif %}
        </a>
      {% endfor %}
      {% if site.github.is_project_page %}
        <a href="{{ site.github.repository_url }}" class="btn">View on GitHub</a>
      {% endif %}
    </header>

    <main id="content" class="main-content" role="main">
      <div style="text-align: center; width: 100%">
        {% for p in site.page_links[page.link_group] %}
          {% if page.permalink == p.link %}
            <b><a href="{{ p.link | relative_url }}" style="display: inline;">{{ p.title }}</a></b>
          {% else %}
            <a href="{{ p.link | relative_url }}" style="display: inline;">{{ p.title }}</a>
          {% endif %}
          {% if p != site.page_links[page.link_group].last %}| {% endif %}
        {% endfor %}
      </div>

      {{ content }}

      {% if site.page_links contains page.link_group %}
        {% assign prev = Nil %}
        {% assign curr = Nil %}
        {% assign next = Nil %}
        {% assign links = site.page_links[page.link_group] %}

        {% for p in links %}
          {% assign prev = curr %}
          {% assign curr = p %}
          {% if p["link"] == page.permalink %}
            {% assign next = links[forloop.index] %}
            {% break %}
          {% endif %}
        {% endfor %}

        <div style="font-weight: bold; padding-top: 2em">
        {% if prev == Nil %}
          <a href="{{ next['link'] }}">{{ next["title"] }} &rarr;</a>
        {% elsif next == Nil %}
          <a href="{{ prev['link'] }}">&larr; {{ prev["title"] }}</a>
        {% else %}
          <a href="{{ prev['link'] }}">&larr; {{ prev["title"] }}</a> | 
          <a href="{{ next['link'] }}">{{ next["title"] }} &rarr;</a>
        {% endif %}
        </div>
      {% endif %}
      <footer class="site-footer">
        {% if page.path contains ".md" %}
          <a href="{{ site.github.repository_url }}/edit/master/docs/{{ page.path }}">[Edit this page]</a>
        {% endif %}
        {% if site.github.is_project_page %}
          <span class="site-footer-owner">
            <a href="{{ site.github.repository_url }}">{{ site.github.repository_name }}</a> is maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a>.
          </span>
        {% endif %}
        <div class="site-footer-credits">
          Icons made by <a href="https://www.flaticon.com/authors/pixel-perfect" title="Pixel perfect">Pixel perfect</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a><br/>
          This page was generated by <a href="https://pages.github.com">GitHub Pages</a>.
        </div>
      </footer>
    </main>
  </body>
</html>
