<!DOCTYPE html>
<html data-bs-theme="dark" data-bs-core="modern">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Laketower</title>
  <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" rel="stylesheet">
  <link href="https://cdn.jsdelivr.net/npm/halfmoon@2.0.2/css/halfmoon.min.css" rel="stylesheet"
    integrity="sha256-RjeFzczeuZHCyS+Gvz+kleETzBF/o84ZRHukze/yv6o=" crossorigin="anonymous">
  <link href="https://cdn.jsdelivr.net/npm/halfmoon@2.0.2/css/cores/halfmoon.modern.css" rel="stylesheet"
    integrity="sha256-DD6elX+jPmbFYPsGvzodUv2+9FHkxHlVtQi0/RJVULs=" crossorigin="anonymous">
</head>

<body class="ps-md-sbwidth">
  <header>
    <nav class="sidebar offcanvas-start offcanvas-md" tabindex="-1" id="sidebar">
      <div class="offcanvas-header border-bottom">
        <a class="sidebar-brand" href="/">
          Laketower
        </a>
        <button
          type="button"
          class="btn-close d-md-none"
          data-bs-dismiss="offcanvas"
          aria-label="Close"
          data-bs-target="#sidebar"
        >
        </button>
      </div>
      <div class="offcanvas-body">
        <ul class="sidebar-nav">
          <li>
            <h6 class="sidebar-header">Tables</h6>
          </li>
          <li><hr class="sidebar-divider"></li>
          {% for table in tables %}
          {% set table_url = '/tables/' + table.name %}
          <li class="nav-item">
            <a
              class="text-truncate nav-link{% if request.url.path.startswith(table_url) %} active{% endif %}"
              href="{{ table_url }}"
              aria-current="page"
            >
              <i class="bi-table" aria-hidden="true"></i>
              {{ table.name }}
            </a>
          </li>
          {% endfor %}

          <li><hr class="sidebar-divider"></li>

          <li>
            <h6 class="sidebar-header">Queries</h6>
          </li>
          <li><hr class="sidebar-divider"></li>
          {% for query in queries %}
          {% set query_url = '/queries/' + query.name + '/view' %}
          <li class="nav-item">
            <a
              class="text-truncate nav-link{% if request.url.path.startswith(query_url) %} active{% endif %}"
              href="{{ query_url }}"
              aria-current="page"
            >
              <i class="bi-code-square" aria-hidden="true"></i>
              {{ query.title }}
            </a>
          </li>
          {% endfor %}
        </ul>
      </div>
    </nav>

    <nav class="navbar navbar-expand-md sticky-top" style="border-bottom: var(--bs-border-width) solid var(--bs-content-border-color); min-height: 60px;">
      <div class="container-md justify-content-start">
        <button type="button" data-bs-toggle="offcanvas" data-bs-target="#sidebar" class="btn btn-secondary d-md-none">
          <i class="bi-layout-sidebar" aria-hidden="true"></i>
        </button>

        <a href="/" class="navbar-brand d-flex align-items-center d-md-none ms-auto ms-md-0">
					Laketower
				</a>
      </div>
    </nav>
  </header>

  <main>
    <div class="container py-3 py-sm-4 px-3 px-sm-4">
      {% block body %}{% endblock %}
    </div>
  </main>

  <footer></footer>

  <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js"
    integrity="sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r"
    crossorigin="anonymous"></script>
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js"
    integrity="sha384-0pUGZvbkm6XF6gxjEnlmuGrJXVbNuzT9qBBavbLwCsOGabYfZo0T0to5eqruptLy"
    crossorigin="anonymous"></script>
</body>

</html>