<!DOCTYPE html>
<html lang="{{ site.lang }}">

  <!-- Head -->
  <head>
  {%- if page.redirect -%}
    <meta http-equiv="refresh" content="3; url={{ site.baseurl }}/" />
  {%- endif -%}
  {% include head.html %}
  </head>

  <!-- Body -->
  <body class="{% if site.navbar_fixed %}fixed-top-nav{% endif %} {% unless site.footer_fixed %}sticky-bottom-footer{% endunless %}">

    <!-- Header -->
    {%- include header.html %}

    <!-- Content -->
    <div class="container mt-5">
      {% if page.toc and page.toc.sidebar %}
        {% if page.toc.sidebar == "right" %}
        <div class="row">
          <!-- main content area -->
          <div class="col-sm-9">
            {{ content }}
          </div>
          <!-- sidebar, which will move to the top on a small screen -->
          <div class="col-sm-3">
            <nav id="toc-sidebar" class="sticky-top"></nav>
          </div>
        </div>
        {% else %}
        <div class="row">
          <!-- sidebar, which will move to the top on a small screen -->
          <div class="col-sm-3">
            <nav id="toc-sidebar" class="sticky-top"></nav>
          </div>
          <!-- main content area -->
          <div class="col-sm-9">
            {{ content }}
          </div>
        </div>
        {% endif %}
      {% else %}
        {{ content }}
      {% endif %}
    </div>

    <!-- Footer -->
    {%- include footer.html %}

    <!-- JavaScripts -->
    {% include scripts/jquery.html %}
    {% include scripts/bootstrap.html %}
    {% include scripts/masonry.html %}
    {% include scripts/misc.html %}
    {% include scripts/badges.html %}
    {% include scripts/mathjax.html %}
    {% include scripts/analytics.html %}
    {% include scripts/progressBar.html %}
  </body>
</html>
