156 lines
7.9 KiB
HTML
156 lines
7.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='css/flag-icon.min.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">
|
|
<header>
|
|
<nav class="top-nav blue nav-fixed">
|
|
<div class="nav-wrapper">
|
|
|
|
<div><a href="#" data-activates="nav-mobile" class="button-collapse top-nav full"><i class="material-icons">menu</i></a></div>
|
|
<img class="top-logo" src={{ url_for('static', filename='img/logo.png') }}></img>
|
|
<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('user_dashboard') }}">{{ user.username }}</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>
|
|
</div>
|
|
|
|
</nav>
|
|
<ul id="nav-mobile" class="side-nav fixed">
|
|
|
|
{% if config.competition_is_running() %}
|
|
{% if logged_in %}
|
|
<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>
|
|
{% endif %}
|
|
<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>
|
|
{% endif %}
|
|
{% if logged_in %}
|
|
<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>
|
|
{% endif %}
|
|
<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>
|
|
<div class="divider" /></div>
|
|
{% if logged_in %}
|
|
|
|
<li><a href="{{ url_for('team_dashboard') }}">
|
|
<div class="side-icon"><i class="material-icons indigo-text">track_changes</i></div>
|
|
<div class="side-text">My Team</div>
|
|
</a></li>
|
|
<li><a href="{{ url_for('user_dashboard') }}">
|
|
<div class="side-icon"><i class="material-icons teal-text">account_circle</i></div>
|
|
<div class="side-text">{{ user.username }}</div>
|
|
</a></li>
|
|
<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>
|
|
{% endif %}
|
|
{% if not logged_in %}
|
|
{% if config.registration %}
|
|
<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>
|
|
{% endif %}
|
|
<li><a href="{{ url_for('login') }}">
|
|
<div class="side-icon"><i class="material-icons amber-text">lock</i></div>
|
|
<div class="side-text">Login</div>
|
|
</a></li>
|
|
{% endif %}
|
|
</ul>
|
|
</header>
|
|
<div class="cont">
|
|
{% 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="cont">
|
|
{% 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='js/api.js') }}"></script>
|
|
<script src="{{ url_for('static', filename='js/main.js') }}"></script>
|
|
<script>
|
|
$(function() {
|
|
$("abbr.time[title='1970-01-01 00:00:00']").attr("title", "").removeClass("time").html("None");
|
|
$("abbr.time").timeago();
|
|
$('.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>
|