canaille-globuzma/canaille/themes/default/base.html

103 lines
4.6 KiB
HTML
Raw Normal View History

{% import 'macro/flask.html' as flask %}
2020-08-17 09:53:30 +00:00
<!doctype html>
<html lang="{{ locale }}">
2021-12-20 22:57:27 +00:00
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
2020-10-21 08:52:18 +00:00
2023-03-10 00:02:36 +00:00
<title>{% block title %}{% trans %}Authorization interface{% endtrans %}{% endblock %} - {{ website_name|default("Canaille") }}</title>
2020-10-21 08:52:18 +00:00
2021-12-20 22:57:27 +00:00
<link href="/static/fomanticui/semantic.min.css" rel="stylesheet">
<link href="/static/fonts/lato.css" rel="stylesheet">
<link href="/static/css/base.css" rel="stylesheet">
{% if logo_url %}<link rel="icon" href="{{ favicon_url }}">{% endif %}
{% block style %}{% endblock %}
2020-08-17 09:53:30 +00:00
2021-12-20 22:57:27 +00:00
<!--[if lt IE 9]>
2021-09-17 09:51:08 +00:00
<script>window.html5 || document.write('<script src="/static/html5shiv/html5shiv.min.js"><\/script>')</script>
2020-08-17 09:53:30 +00:00
<script src="/static/js/respond.min.js"></script>
<![endif]-->
2021-12-20 22:57:27 +00:00
</head>
2020-08-17 09:53:30 +00:00
2021-12-20 22:57:27 +00:00
<body>
{% block menu %}
{% if user and menu %}
2023-03-15 16:27:32 +00:00
<div class="ui container menu-container">
<nav class="ui stackable labeled icon seven item {% if self.submenu() | trim %}top attached{% endif %} menu">
{% if logo_url %}
<a href="/" class="item logo">
2022-11-04 17:28:26 +00:00
<img class="ui img" src="{{ logo_url }}" alt="{{ website_name }}" />
2021-12-20 22:57:27 +00:00
</a>
2023-03-15 16:27:32 +00:00
{% endif %}
{% if user.can_edit_self %}
<a class="item {% if menuitem == "profile" %}active{% endif %}"
href="{{ url_for('account.profile_edition', username=user.uid[0]) }}">
<i class="id card icon"></i>
{% trans %}Profile{% endtrans %}
</a>
{% endif %}
{% if user.can_use_oidc %}
<a class="item {% if menuitem == "consents" %}active{% endif %}"
href="{{ url_for('oidc.consents.consents') }}">
<i class="handshake icon"></i>
{% trans %}Consents{% endtrans %}
</a>
{% endif %}
{% if user.can_manage_users %}
<a class="item {% if menuitem == "users" %}active{% endif %}"
href="{{ url_for('account.users') }}">
<i class="address book icon"></i>
{% trans %}Users{% endtrans %}
</a>
{% endif %}
{% if user.can_manage_groups %}
<a class="item {% if menuitem == "groups" %}active{% endif %}"
href="{{ url_for('groups.groups') }}">
<i class="users icon"></i>
{% trans %}Groups{% endtrans %}
</a>
{% endif %}
{% if user.can_manage_oidc %}
<a class="item {% if menuitem == "admin" %}active{% endif %}" href="{{ url_for('admin.mail_index') }}">
<i class="settings icon"></i>
{% trans %}Admin{% endtrans %}
</a>
{% endif %}
<a class="item" href="{{ url_for('account.logout') }}">
<i class="sign out alternate icon"></i>
{% trans %}Log out{% endtrans %}
2021-12-20 22:57:27 +00:00
</a>
2023-03-15 16:27:32 +00:00
</nav>
{% block submenu %}{% endblock %}
</div>
2020-11-01 10:33:56 +00:00
{% endif %}
2021-12-20 22:57:27 +00:00
{% endblock %}
2020-10-21 09:30:26 +00:00
2023-03-15 16:27:32 +00:00
{% block container %}
<div class="ui container">
2023-03-15 16:27:32 +00:00
<div class="ui content">
{{ flask.messages() }}
{% block content %}{% endblock %}
</div>
2021-12-20 22:57:27 +00:00
</div>
{% endblock %}
2020-11-13 09:45:01 +00:00
2021-12-20 22:57:27 +00:00
<footer>
2023-01-30 18:56:58 +00:00
<a href="{{ url_for('account.about') }}">{{ _("About Canaille") }}</a>
2021-12-20 22:57:27 +00:00
</footer>
<script src="/static/jquery/jquery.min.js"></script>
<script src="/static/fomanticui/semantic.min.js"></script>
<script src="/static/htmx/htmx.min.js"></script>
2021-12-20 22:57:27 +00:00
<script src="/static/js/base.js"></script>
<script>
htmx.config.requestClass = "loading"
</script>
2021-12-20 22:57:27 +00:00
{% block script %}{% endblock %}
</body>
2020-08-17 09:53:30 +00:00
</html>