2015-11-08 06:10:26 +00:00
|
|
|
<html>
|
|
|
|
<head>
|
2016-03-06 00:44:19 +00:00
|
|
|
<title>{{ config.ctf_name }} – {% block title %}Home{% endblock %}</title>
|
2015-11-08 06:10:26 +00:00
|
|
|
{% if config.cdn %}
|
|
|
|
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/css/materialize.min.css" />
|
2015-11-08 19:04:02 +00:00
|
|
|
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.9.0/vis.min.css" />
|
2015-11-08 06:10:26 +00:00
|
|
|
<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') }}" />
|
2016-07-11 00:01:00 +00:00
|
|
|
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/flag-icon.min.css') }}" />
|
2015-11-10 04:41:07 +00:00
|
|
|
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='vis.min.css') }}" />
|
2015-11-08 06:10:26 +00:00
|
|
|
{% endif %}
|
2016-03-06 00:43:12 +00:00
|
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename=config.custom_stylesheet) }}" />
|
2016-04-16 18:34:48 +00:00
|
|
|
<script>
|
|
|
|
function dismissNotification(id) {
|
|
|
|
api.makeCall("/dismiss/" + id + ".json", {_csrf_token: "{{ csrf_token() }}"}, function() {
|
|
|
|
$("#notification" + id).slideUp();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
</script>
|
2016-03-06 00:59:20 +00:00
|
|
|
|
|
|
|
<meta name="viewport" content="width=device-width,initial-scale=1.0"/>
|
2015-11-08 06:10:26 +00:00
|
|
|
{% block head %}{% endblock %}
|
|
|
|
</head>
|
2016-03-06 00:59:30 +00:00
|
|
|
<body class="competition-page">
|
2016-07-10 16:55:12 +00:00
|
|
|
<header>
|
2016-07-11 21:28:55 +00:00
|
|
|
<nav class="top-nav blue nav-fixed">
|
2016-07-10 16:55:12 +00:00
|
|
|
<div class="nav-wrapper">
|
|
|
|
|
2016-07-10 17:25:03 +00:00
|
|
|
<div><a href="#" data-activates="nav-mobile" class="button-collapse top-nav full"><i class="material-icons">menu</i></a></div>
|
2016-07-10 20:58:04 +00:00
|
|
|
<img class="top-logo" src={{ url_for('static', filename='img/logo.png') }}></img>
|
2016-07-10 16:55:12 +00:00
|
|
|
<ul class="right hide-on-med-and-down">
|
2016-07-10 17:07:34 +00:00
|
|
|
{% if logged_in %}
|
|
|
|
<li><a href="{{ url_for('logout') }}">Logout</a></li>
|
2016-07-12 12:03:04 +00:00
|
|
|
<li><a href="{{ url_for('user_dashboard') }}">{{ user.username }}</a></li>
|
2016-07-10 17:07:34 +00:00
|
|
|
{% 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 %}
|
2016-07-10 16:55:12 +00:00
|
|
|
</ul>
|
2015-11-08 06:10:26 +00:00
|
|
|
</div>
|
2016-07-10 16:55:12 +00:00
|
|
|
|
2016-07-10 16:56:02 +00:00
|
|
|
<ul id="nav-mobile" class="side-nav fixed">
|
2016-07-10 17:00:07 +00:00
|
|
|
|
|
|
|
{% if config.competition_is_running() %}
|
|
|
|
{% if logged_in %}
|
2016-07-10 18:06:06 +00:00
|
|
|
<li><a href="{{ url_for('challenges') }}">
|
|
|
|
<div class="side-icon"><i class="material-icons blue-text">flag</i></div>
|
|
|
|
<div class="side-text">Challenges</div>
|
|
|
|
</a></li>
|
2016-07-10 17:00:07 +00:00
|
|
|
{% endif %}
|
2016-07-10 18:06:06 +00:00
|
|
|
<li><a href="{{ url_for('scoreboard') }}">
|
|
|
|
<div class="side-icon"><i class="material-icons red-text">timeline</i></div>
|
|
|
|
<div class="side-text">Scoreboard</div>
|
|
|
|
</a></li>
|
|
|
|
<li><a href="{{ url_for('chat') }}">
|
|
|
|
<div class="side-icon"><i class="material-icons green-text">chat</i></div>
|
|
|
|
<div class="side-text">Chat</div>
|
|
|
|
</a></li>
|
2016-07-10 17:00:07 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if logged_in %}
|
2016-07-10 18:06:06 +00:00
|
|
|
<li><a href="{{ url_for('team_tickets') }}">
|
|
|
|
<div class="side-icon"><i class="material-icons amber-text">report_problem</i></div>
|
|
|
|
<div class="side-text">Tickets</div>
|
|
|
|
</a></li>
|
2016-07-10 17:00:07 +00:00
|
|
|
{% endif %}
|
2016-07-10 18:06:06 +00:00
|
|
|
<li><a href="{{ url_for('chat') }}">
|
|
|
|
<div class="side-icon"><i class="material-icons purple-text">build</i></div>
|
|
|
|
<div class="side-text">Status</div>
|
|
|
|
</a></li>
|
2016-07-10 17:50:28 +00:00
|
|
|
<div class="divider" /></div>
|
2016-07-10 17:00:07 +00:00
|
|
|
{% if logged_in %}
|
2016-07-10 18:10:51 +00:00
|
|
|
<li><a href="{{ url_for('logout') }}">
|
|
|
|
<div class="side-icon"><i class="material-icons red-text">block</i></div>
|
|
|
|
<div class="side-text">Logout</div>
|
|
|
|
</a></li>
|
2016-07-12 12:03:04 +00:00
|
|
|
<li><a href="{{ url_for('user_dashboard') }}">
|
2016-07-10 18:14:41 +00:00
|
|
|
<div class="side-icon"><i class="material-icons teal-text">account_circle</i></div>
|
2016-07-11 23:57:43 +00:00
|
|
|
<div class="side-text">{{ user.username }}</div>
|
2016-07-10 18:13:17 +00:00
|
|
|
</a></li>
|
2016-07-12 12:03:04 +00:00
|
|
|
<li><a href="{{ url_for('team_dashboard') }}">
|
|
|
|
<div class="side-icon"><i class="material-icons teal-text">account_circle</i></div>
|
|
|
|
<div class="side-text">{{ team.name }}</div>
|
|
|
|
</a></li>
|
2016-07-10 17:00:07 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if not logged_in %}
|
|
|
|
{% if config.registration %}
|
2016-07-10 18:13:17 +00:00
|
|
|
<li><a href="{{ url_for('register') }}">
|
|
|
|
<div class="side-icon"><i class="material-icons indigo-text">person_add</i></div>
|
|
|
|
<div class="side-text">Register</div>
|
|
|
|
</a></li>
|
2016-07-10 17:00:07 +00:00
|
|
|
{% endif %}
|
2016-07-10 18:10:51 +00:00
|
|
|
<li><a href="{{ url_for('login') }}">
|
2016-07-10 21:23:30 +00:00
|
|
|
<div class="side-icon"><i class="material-icons amber-text">lock</i></div>
|
2016-07-10 18:10:51 +00:00
|
|
|
<div class="side-text">Login</div>
|
|
|
|
</a></li>
|
2016-07-10 17:00:07 +00:00
|
|
|
{% endif %}
|
2016-07-10 16:56:02 +00:00
|
|
|
</ul>
|
2016-07-10 17:34:18 +00:00
|
|
|
</nav>
|
2016-07-10 16:55:12 +00:00
|
|
|
</header>
|
2016-07-10 17:02:20 +00:00
|
|
|
<div class="cont">
|
2015-12-17 12:57:35 +00:00
|
|
|
{% 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 %}
|
2015-12-01 04:05:17 +00:00
|
|
|
{% 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>
|
2016-07-10 17:02:20 +00:00
|
|
|
<div class="cont">
|
2015-11-08 06:10:26 +00:00
|
|
|
{% 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>
|
2015-11-08 07:49:20 +00:00
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-timeago/1.4.3/jquery.timeago.min.js"></script>
|
2015-11-08 19:04:02 +00:00
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.9.0/vis.min.js"></script>
|
2015-11-08 06:10:26 +00:00
|
|
|
{% else %}
|
|
|
|
<script src="{{ url_for('static', filename='jquery.min.js') }}"></script>
|
|
|
|
<script src="{{ url_for('static', filename='materialize.min.js') }}"></script>
|
2015-11-10 04:41:07 +00:00
|
|
|
<script src="{{ url_for('static', filename='timeago.min.js') }}"></script>
|
|
|
|
<script src="{{ url_for('static', filename='vis.min.js') }}"></script>
|
2015-11-08 06:10:26 +00:00
|
|
|
{% endif %}
|
2016-07-10 16:15:33 +00:00
|
|
|
<script src="{{ url_for('static', filename='js/api.js') }}"></script>
|
2016-07-11 00:04:30 +00:00
|
|
|
<script src="{{ url_for('static', filename='js/main.js') }}"></script>
|
2015-12-01 04:05:17 +00:00
|
|
|
<script>
|
2016-03-06 00:52:29 +00:00
|
|
|
$(function() {
|
2016-05-25 18:49:23 +00:00
|
|
|
$("abbr.time[title='1970-01-01 00:00:00']").attr("title", "").removeClass("time").html("None");
|
2015-12-01 04:05:17 +00:00
|
|
|
$("abbr.time").timeago();
|
2016-03-06 00:52:29 +00:00
|
|
|
$('.button-collapse').sideNav();
|
|
|
|
});
|
2015-12-01 04:05:17 +00:00
|
|
|
</script>
|
2015-11-08 06:10:26 +00:00
|
|
|
<script id="toasts" type="text/javascript">
|
|
|
|
{% for message in get_flashed_messages() %}
|
|
|
|
Materialize.toast({{ message | tojson }}, 4000);
|
|
|
|
{% endfor %}
|
|
|
|
</script>
|
2015-11-08 19:04:02 +00:00
|
|
|
{% block postscript %}
|
|
|
|
{% endblock %}
|
2015-11-08 06:10:26 +00:00
|
|
|
</body>
|
|
|
|
</html>
|