<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{% block title %}Quartermaster{% endblock %}</title>
    <link rel="stylesheet" href="/assets/style.css">
    <script src="/assets/htmx.min.js"></script>
    <script src="/assets/sse.js"></script>
</head>
<body>
    <nav>
        <span class="brand">Quartermaster</span>
        {% block nav %}{% endblock %}
    </nav>
    <div id="sse-source" hx-ext="sse" sse-connect="/api/events">
    <main>
        {% block flash %}
        {% if let Some(flash) = flash %}
        <div class="toast toast-{{ flash.flash_type }}">{{ flash.message }}</div>
        {% endif %}
        {% endblock %}
        {% block content %}{% endblock %}
    </main>
    </div>
</body>
</html>
