
<!doctype html>
<html lang="da">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>{% block title %}TuxiNet StreamHub{% endblock %}</title>
  <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
  <script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
</head>
<body class="{% block body_class %}{% endblock %}">
  <header class="topbar">
    <a class="brand" href="{{ url_for('main.index') }}">
      <img src="{{ url_for('static', filename='logo.png') }}" alt="TuxiNet StreamHub">
      <span>TuxiNet StreamHub</span>
    </a>
    {% if current_user %}
      <nav>
        {% if current_user.role == 'admin' %}
          <a href="{{ url_for('main.admin_dashboard') }}">Dashboard</a>
          <a href="{{ url_for('main.create_streamer') }}">Ny streamer</a>
        {% endif %}
        <a href="{{ url_for('main.logout') }}">Log ud</a>
      </nav>
    {% endif %}
  </header>
  <main class="container">
    {% with messages = get_flashed_messages(with_categories=true) %}
      {% if messages %}
        {% for category, message in messages %}
          <div class="flash {{ category }}">{{ message }}</div>
        {% endfor %}
      {% endif %}
    {% endwith %}
    {% block content %}{% endblock %}
  </main>
</body>
</html>
