54 lines
2.3 KiB
HTML
54 lines
2.3 KiB
HTML
<!doctype html>
|
|
<html lang="pt-PT">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="theme-color" content="#ed1c24">
|
|
<title>{% block title %}{{ settings.app_name }}{% endblock %}</title>
|
|
<link rel="icon" type="image/png" href="{{ url_for('static', path='logo-crr.png') }}">
|
|
<link rel="stylesheet" href="{{ url_for('static', path='app.css') }}">
|
|
</head>
|
|
<body>
|
|
<header class="topbar">
|
|
<div class="container topbar-inner">
|
|
<a class="brand" href="{{ app_path('/') }}" aria-label="{{ settings.app_name }} — início">
|
|
<img class="brand-logo" src="{{ url_for('static', path='logo-crr.png') }}" alt="CRR">
|
|
<span class="brand-name">{{ settings.app_name }}</span>
|
|
</a>
|
|
<nav class="nav" aria-label="Navegação principal">
|
|
{% if current_user %}
|
|
<a href="{{ app_path('/swaps') }}">Trocas</a>
|
|
{% if not current_user.is_admin %}<a href="{{ app_path('/export/schedule') }}">Exportar PDF</a>{% endif %}
|
|
{% if current_user.is_admin %}
|
|
<a href="{{ app_path('/admin/schedules') }}">Gerir escalas</a>
|
|
<a href="{{ app_path('/admin/teams') }}">Equipas</a>
|
|
<a href="{{ app_path('/admin/users') }}">Utilizadores</a>
|
|
<a href="{{ app_path('/admin/notifications') }}">Registo de e-mails</a>
|
|
{% endif %}
|
|
{% endif %}
|
|
</nav>
|
|
{% if current_user %}
|
|
<div class="account">
|
|
<a class="account-link" href="{{ app_path('/account') }}" title="A minha conta">
|
|
<span class="name-text">{{ current_user.name or current_user.username }}</span>
|
|
<span class="muted">@{{ current_user.username }}</span>
|
|
</a>
|
|
<form method="post" action="{{ app_path('/logout') }}">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
|
<button class="link-button" type="submit">Sair</button>
|
|
</form>
|
|
</div>
|
|
{% else %}
|
|
<div class="account"><a href="{{ app_path('/login') }}">Entrar</a></div>
|
|
{% endif %}
|
|
</div>
|
|
</header>
|
|
<main class="container">
|
|
{% if flash %}
|
|
<div class="flash {{ flash.level }}" role="status">{{ flash.message }}</div>
|
|
{% endif %}
|
|
{% block content %}{% endblock %}
|
|
</main>
|
|
</body>
|
|
</html>
|