<!DOCTYPE html>
<html lang="en">

{% include head.html %}

<body>

{% include navbar.html %}


<main class="container-xxl">
  <div class="row">
    <div class="col-lg-2 border-right py-2">
      <ul class="nd-lnav nd-sidenav-sticky nav-pills nav flex-column">
        {% assign sorted_pages = site.pages | sort:"order" %}
        {% for docpage in sorted_pages %}
          {% if docpage.categories contains 'docs' %}
            {% if docpage.url == page.url %}
              <li class="nav-item" aria-current="page">
                <a class="nav-link active" href="{{ docpage.url | relative_url }}">{{ docpage.title }}</a>
              </li>
            {% else %}
              <li class="nav-item">
                <a class="nav-link" href="{{ docpage.url | relative_url }}">{{ docpage.title }}</a>
              </li>
            {% endif %}
          {% endif %}
        {% endfor %}
      </ul>
    </div>

    <div class="col-lg-8 p-4 nd-content">
      <a class="btn btn-sm btn-outline-secondary float-right my-2 my-md-0"
         href="https://github.com/edubart/nelua-lang/blob/master/docs/{{ page.path }}"
         title="View or edit this file on GitHub"
         target="_blank" rel="noopener">Edit on GitHub</a>
      <h1 class="mb-3">{{page.title}}</h1>
      {{content}}
    </div>
    {% if page.categories contains 'toc' %}
    <div class="col-lg-2 border-left pr-0">
      <div class="nd-sidenav-sticky">
        {% include toc.html html=content id="nd-toc"
          class="nav.flex-column.flex-nowrap.nav-pills"
          submenu_class="nav.flex-column.flex-nowrap"
          item_class="nav-item"
          anchor_class="nav-link" %}
      </div>
    </div>
    {% endif %}
  </div>
</main>

{% include footer.html %}

</body>
</html>
