Files
boker/templates/base.html
T

53 lines
2.3 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}myboker.org{% endblock %}</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/tokens.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</head>
<body>
<header class="topbar">
<div class="topbar__inner">
<a class="brand" href="{{ url_for('leaderboard') }}">
<span class="brand__mark"></span>
<span class="brand__name">myboker.org</span>
</a>
<nav class="mainnav">
<a class="navlink {{ 'is-active' if request.endpoint == 'leaderboard' }}" href="{{ url_for('leaderboard') }}">Leaderboard</a>
<a class="navlink {{ 'is-active' if request.endpoint in ('sessions', 'session_detail') }}" href="{{ url_for('sessions') }}">Sessions</a>
{% if is_admin %}
<a class="navlink {{ 'is-active' if request.endpoint == 'admin_dashboard' }}" href="{{ url_for('admin_dashboard') }}">Admin</a>
{% else %}
<a class="navlink {{ 'is-active' if request.endpoint == 'admin_login' }}" href="{{ url_for('admin_login') }}">Admin</a>
{% endif %}
</nav>
<span class="topbar__spacer"></span>
{% if is_admin %}
<div class="topbar__admin-actions">
<form method="post" action="{{ url_for('admin_logout') }}" style="margin:0">
<button class="btn btn--ghost btn--sm" type="submit">Logout</button>
</form>
</div>
{% endif %}
</div>
</header>
<main class="page {% block page_class %}page--public{% endblock %}">
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
<div class="flash-stack">
{% for category, message in messages %}
<div class="flash {{ category }}">{{ message }}</div>
{% endfor %}
</div>
{% endif %}
{% endwith %}
{% block content %}{% endblock %}
</main>
</body>
</html>