133 lines
6.9 KiB
HTML
133 lines
6.9 KiB
HTML
<html>
|
|
<head>
|
|
<title>{{ config.ctf_name }} – {% block title %}Home{% endblock %}</title>
|
|
{% if config.cdn %}
|
|
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/css/materialize.min.css" />
|
|
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.9.0/vis.min.css" />
|
|
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
|
|
{% else %}
|
|
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='materialize.min.css') }}" />
|
|
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='icons.css') }}" />
|
|
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='vis.min.css') }}" />
|
|
{% endif %}
|
|
|
|
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename=config.custom_stylesheet) }}" />
|
|
<script>
|
|
function dismissNotification(id) {
|
|
api.makeCall("/dismiss/" + id + ".json", {_csrf_token: "{{ csrf_token() }}"}, function() {
|
|
$("#notification" + id).slideUp();
|
|
});
|
|
}
|
|
</script>
|
|
|
|
<meta name="viewport" content="width=device-width,initial-scale=1.0"/>
|
|
{% block head %}{% endblock %}
|
|
</head>
|
|
<body class="competition-page">
|
|
<div class="navbar-fixed">
|
|
<nav class="blue darken-3">
|
|
<div class="container">
|
|
<div class="nav-wrapper">
|
|
<ul class="left hide-on-med-and-down">
|
|
{% if config.competition_is_running() %}
|
|
{% if logged_in %}
|
|
<li><a href="{{ url_for('challenges') }}">Challenges</a></li>
|
|
{% endif %}
|
|
<li><a href="{{ url_for('scoreboard') }}">Scoreboard</a></li>
|
|
<li><a href="{{ url_for('chat') }}">Chat</a></li>
|
|
{% endif %}
|
|
{% if logged_in %}
|
|
<li><a href="{{ url_for('team_tickets') }}">Tickets</a></li>
|
|
{% endif %}
|
|
</ul>
|
|
<a href="{{ config.ctf_home_url }}" class="center brand-logo">{{ config.ctf_name }}</a>
|
|
<ul class="right hide-on-med-and-down">
|
|
{% if logged_in %}
|
|
<li><a href="{{ url_for('logout') }}">Logout</a></li>
|
|
<li><a href="{{ url_for('dashboard') }}">{{ team.name }}</a></li>
|
|
{% endif %}
|
|
{% if not logged_in %}
|
|
{% if config.registration %}
|
|
<li><a href="{{ url_for('register') }}">Register</a></li>
|
|
{% endif %}
|
|
<li><a href="{{ url_for('login') }}">Login</a></li>
|
|
{% endif %}
|
|
</ul>
|
|
<ul id="nav-mobile" class="side-nav">
|
|
{% if config.competition_is_running() %}
|
|
{% if logged_in %}
|
|
<li><a href="{{ url_for('challenges') }}">Challenges</a></li>
|
|
{% endif %}
|
|
<li><a href="{{ url_for('scoreboard') }}">Scoreboard</a></li>
|
|
<li><a href="{{ url_for('chat') }}">Chat</a></li>
|
|
{% endif %}
|
|
{% if logged_in %}
|
|
<li><a href="{{ url_for('team_tickets') }}">Tickets</a></li>
|
|
{% endif %}
|
|
<hr />
|
|
{% if logged_in %}
|
|
<li><a href="{{ url_for('logout') }}">Logout</a></li>
|
|
<li><a href="{{ url_for('dashboard') }}">{{ team.name }}</a></li>
|
|
{% endif %}
|
|
{% if not logged_in %}
|
|
{% if config.registration %}
|
|
<li><a href="{{ url_for('register') }}">Register</a></li>
|
|
{% endif %}
|
|
<li><a href="{{ url_for('login') }}">Login</a></li>
|
|
{% endif %}
|
|
</ul>
|
|
<a href="#" data-activates="nav-mobile" class="button-collapse"><i class="material-icons white-text">menu</i></a>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
</div>
|
|
<div class="container">
|
|
{% if session.admin %}
|
|
<div class="card red darken-3">
|
|
<div class="card-content white-text">
|
|
<span class="card-title">You are an admin.</span>
|
|
Please note that team restrictions do not currently apply.
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% for notification in notifications %}
|
|
<div class="card yellow darken-2" id="notification{{ notification.id }}" onclick="dismissNotification({{ notification.id }});" style="cursor: hand;">
|
|
<div class="card-content">
|
|
{{ notification.notification | safe }} (Click to dismiss)
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
<div class="container">
|
|
{% block content %}{% endblock %}
|
|
</div>
|
|
{% if config.cdn %}
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/js/materialize.min.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-timeago/1.4.3/jquery.timeago.min.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.9.0/vis.min.js"></script>
|
|
{% else %}
|
|
<script src="{{ url_for('static', filename='jquery.min.js') }}"></script>
|
|
<script src="{{ url_for('static', filename='materialize.min.js') }}"></script>
|
|
<script src="{{ url_for('static', filename='timeago.min.js') }}"></script>
|
|
<script src="{{ url_for('static', filename='vis.min.js') }}"></script>
|
|
{% endif %}
|
|
<script src="{{ url_for('static', filename='api.js') }}"></script>
|
|
<script>
|
|
$(function() {
|
|
$("abbr.time").timeago();
|
|
$("abbr.time[title='1970-01-01 00:00:00']").attr("title", "").html("None");
|
|
|
|
$('.button-collapse').sideNav();
|
|
});
|
|
</script>
|
|
<script id="toasts" type="text/javascript">
|
|
{% for message in get_flashed_messages() %}
|
|
Materialize.toast({{ message | tojson }}, 4000);
|
|
{% endfor %}
|
|
</script>
|
|
{% block postscript %}
|
|
{% endblock %}
|
|
</body>
|
|
</html>
|