<!DOCTYPE html>
<html>
<head>
  <title>{{ Configs.ctf_name }}</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="shortcut icon" href="{{ Configs.ctf_small_icon }}" type="image/x-icon">

  {% block stylesheets %}
    {{ Assets.css("assets/scss/main.scss") }}
  {% endblock %}

  {{ Plugins.styles }}

  <script type="text/javascript">
      window.init = {
          'urlRoot': "{{ request.script_root }}",
          'csrfNonce': "{{ Session.nonce }}",
          'userMode': "{{ Configs.user_mode }}",
          'userId': {{ Session.id }},
          'userName': {{ User.name | tojson }},
          'userEmail': {{ User.email | tojson }},
          'teamId': {{ Team.id | tojson }}, 
          'teamName': {{ Team.name | tojson }},
          'start': {{ Configs.start | tojson }},
          'end': {{ Configs.end | tojson }},
          'themeSettings': {{ Configs.theme_settings | tojson }},
          'eventSounds': [
            "/themes/core/static/sounds/notification.webm",
            "/themes/core/static/sounds/notification.mp3",
          ],
      }
  </script>

  {{ Configs.theme_header }}
</head>
<body>
{% include "components/navbar.html" %}

<main role="main">
  {% block content %}
  {% endblock %}
</main>

<footer class="footer">
  <div class="container text-center">
    <a href="https://ctfd.io" class="text-secondary">
      <small class="text-muted">
        {% trans %}Powered by CTFd{% endtrans %}
      </small>
    </a>
  </div>
</footer>

{% include "components/notifications.html" %}

{% block scripts %}
  {{ Assets.js("assets/js/index.js") }}
{% endblock %}

{{ Plugins.scripts }}

{{ Configs.theme_footer }}
</body>
</html>
