partitioncloud-server/partitioncloud/templates/base.html
2022-11-21 21:00:48 +01:00

43 lines
1.6 KiB
HTML

<!doctype html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{% block title %}{% endblock %} - PartitionCloud</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='mobile.css') }}">
<link rel="icon" type="image/png" href="{{ url_for('static', filename='icon.png') }}" />
<link rel="apple-touch-icon" href="{{ url_for('static', filename='icon.png') }}">
<link rel="manifest" href="{{ url_for('static', filename='manifest.webmanifest') }}" />
</head>
<nav>
<h1><a href="{{ url_for('albums.index') }}">PartitionCloud</a></h1>
<div class="dropdown">
{% if g.user %}
<button class="userdropbtn">{{ g.user['username'] }}</button>
{% else %}
<button class="userdropbtn">Connexion</button>
{% endif %}
<div class="dropdown-content">
{% if not g.user %}
<a href="{{ url_for('auth.register') }}">Créer un compte</a>
<a href="{{ url_for('auth.login') }}">Se connecter</a>
{% else %}
{% if g.user.access_level == 1 %}
<a href="/admin">Panneau Admin</a>
{% endif %}
<a href="{{ url_for('auth.logout') }}">Déconnexion</a>
{% endif %}
</div>
</nav>
<section class="content">
<header>
{% block header %}{% endblock %}
<div id="header-actions">
{% block header_actions %}{% endblock %}
</div>
</header>
{% for message in get_flashed_messages() %}
<div class="flash">{{ message }}</div>
{% endfor %}
{% block content %}{% endblock %}
</section>