{% extends "base.html" %}

{% block stylesheets %}
	<link rel="stylesheet" href="{{ url_for('views.themes', path='css/challenge-board.css') }}">
{% endblock %}

{% block content %}

<div class="jumbotron">
	<div class="container">
		<h1>Challenges</h1>
	</div>
</div>

{% if infos %}
	<div class="container">
		<div id='errors' class="row">
			<div class="col-md-12">
				{% for info in infos %}
					<h1 class="text-center">{{ info }}</h1>
				{% endfor %}
			</div>
		</div>
	</div>
{% endif %}

{% if errors %}
<div class="container">
	<div id='errors' class="row">
		<div class="col-md-12">
{% for error in errors %}
			<h1 class="text-center">{{ error }}</h1>
{% endfor %}
		</div>
	</div>
</div>
{% endif %}

{% if admin or not errors %}
<div class="container">
	<div id='challenges-board'>
		<div class="text-center">
			<i class="fas fa-circle-notch fa-spin fa-3x fa-fw spinner"></i>
		</div>
	</div>
</div>

<input id="nonce" type="hidden" name="nonce" value="{{ nonce }}">

<div class="modal fade" id="challenge-window" tabindex="-1" role="dialog">
</div>
{% endif %}
{% endblock %}

{% block scripts %}
{% endblock %}

{% block entrypoint %}
	{% if admin or not errors %}
		<script defer src="{{ url_for('views.themes', path='js/pages/challenges.js') }}"></script>
	{% endif %}
{% endblock %}
