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

<head>
  <meta charset="UTF-8">
  <meta name="viewport"
    content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>{{ config.app_name }}</title>
  <link rel="icon" type="image/svg+xml"
    href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'><circle cx='32' cy='32' r='32' fill='%2348536b'/></svg>">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css">
  <link rel="stylesheet" href="/assets/base.css">
  <script src="/assets/sortable.min.js"></script>
  <script src="/assets/base.js"></script>
</head>

<body>

  <header class="container-fluid">
    <nav style="justify-content: flex-start">
      <ul style="gap: 0.75rem">
        <li><strong style="font-size: 1.25rem">{{ config.app_name }}</strong></li>
        {% if header_status() and header_status_inline %}
        <li style="margin-left: 0.5rem">{{ header_status() }}</li>
        {% endif %}
        {% for path,title in config.ui_menu.items() %}
        <li><a href="{{path}}">{{title}}</a></li>
        {% endfor %}
        <li><a href="/system">system</a></li>
      </ul>
    </nav>
    {% if header_status() and not header_status_inline %}
    <div>{{ header_status() }}</div>
    {% endif %}
  </header>

  <main class="container-fluid">
    {% for message in flash_messages %}
    {% if message.error %}
    <div class="alert alert-danger">
      <span>&#9888; <strong>{{ message.message }}</strong></span>
      <button class="alert-close" aria-label="Close">&times;</button>
    </div>
    {% else %}
    <div class="alert alert-info">
      <span>&#8505; <strong>{{ message.message }}</strong></span>
      <button class="alert-close" aria-label="Close">&times;</button>
    </div>
    {% endif %}
    {% endfor %}

    {% block content -%}
    {%- endblock %}
  </main>

  <footer class="container-fluid">
    app: v{{ app_version }}, mm-base6: v{{ mm_base6_version }} / server time: {{ utc() | dt }} / <a href="/auth/logout">logout</a>
  </footer>

</body>

</html>
