haldis/app/templates/layout.html

118 lines
4.2 KiB
HTML
Raw Normal View History

2015-03-31 20:15:22 +02:00
{% extends "bootstrap/base.html" %}
{% import "bootstrap/utils.html" as utils %}
{% set navbar = [
('general_bp.home', 'Home'),
('order_bp.orders', 'Orders'),
('general_bp.locations', 'Locations'),
('general_bp.map_view', 'Map'),
('general_bp.about', 'About'),
('stats_blueprint.stats', 'Stats'),
2015-03-31 20:15:22 +02:00
] -%}
2021-10-28 23:35:57 +02:00
2020-07-29 23:14:57 +02:00
{% if current_user.is_admin() -%}
{% set navbar = navbar + [('admin.index', 'Admin')] -%}
{% endif -%}
2021-10-28 23:35:57 +02:00
2015-03-31 20:15:22 +02:00
{% set active_page = active_page|default('index') -%}
{% block title %}
2021-10-28 23:35:57 +02:00
Haldis - {{ active_page|capitalize }}
{% if title %}
- {{ title }}
{% endif %}
2015-03-31 20:15:22 +02:00
{% endblock %}
{% block styles %}
{{ super() }}
<link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}" media="screen">
2020-07-17 13:17:53 +02:00
<link rel="stylesheet" href="{{ url_for('general_bp.theme_css') }}" media="screen">
<link rel="stylesheet" href="{{ url_for('static', filename='css/print.css') }}" media="print">
2015-03-31 20:15:22 +02:00
{% endblock %}
{% block scripts %}
{{ super() }}
2020-07-17 13:17:53 +02:00
<script type="text/javascript" src="{{ url_for('general_bp.current_theme_js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/theme.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/timer.js') }}"></script>
2021-10-28 23:35:57 +02:00
<script type="text/javascript" src="{{ url_for('static', filename='js/pwa.js') }}"></script>
{% endblock %}
{% block head %}
{{ super() }}
<!-- Manifest (for PWA support) -->
<link rel="manifest" href="{{ url_for('static', filename='manifest.json') }}">
<!-- Favicons -->
<link rel="apple-touch-icon" sizes="180x180" href="{{ url_for('static', filename='icons/apple-touch-icon.png') }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ url_for('static', filename='icons/favicon-32x32.png') }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ url_for('static', filename='icons/favicon-16x16.png') }}">
<link rel="mask-icon" href="{{ url_for('static', filename='icons/safari-pinned-tab.svg') }}" color="#5bbad5">
<link rel="shortcut icon" href="{{ url_for('static', filename='icons/favicon.ico') }}">
<!-- Theme colors -->
<meta name="msapplication-TileColor" content="#1c1c1c">
<meta name="msapplication-config" content="{{ url_for('static', filename='browserconfig.xml') }}">
<meta name="theme-color" content="#1c1c1c">
2015-03-31 20:15:22 +02:00
{% endblock %}
{% block navbar %}
<div class="background"></div>
<div class="foreground"></div>
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
2022-04-20 01:34:19 +02:00
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{{ url_for('general_bp.home') }}">HALDIS</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
{% for id, text in navbar -%}
<li class="{{ 'active' if active_page in id else '' }}">
<a href="{{ url_for(id) }}">{{ text|e }}</a>
</li>
{% endfor -%}
</ul>
<ul class="nav navbar-nav navbar-right">
{% if current_user.is_anonymous() %}
2022-04-20 01:34:19 +02:00
{% if configuration.ENABLE_MICROSOFT_AUTH %}
<li><a href="{{ url_for('auth_microsoft_bp.login') }}">Login with Microsoft</a></li>
{% endif %}
2022-04-20 01:27:52 +02:00
<li><a href="{{ url_for('auth_zeus_bp.login') }}">Login with Zeus</a></li>
{% else %}
<li><a href="{{ url_for('general_bp.profile') }}">{{ current_user.username }}</a></li>
<li><a href="{{ url_for('auth_bp.logout') }}">Logout</a></li>
{% endif %}
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
2015-03-31 20:15:22 +02:00
{% endblock %}
{% block content -%}
{{ utils.flashed_messages(container=True) }}
2015-03-31 20:15:22 +02:00
<div class="container main">
2022-04-20 01:34:19 +02:00
{% block container -%}
{%- endblock %}
</div>
2015-03-31 20:15:22 +02:00
<footer>
<hr/>
<div class="container">
<div class="footerWrapper">
2020-07-18 20:09:03 +02:00
<div class="pull-left">Made with ❤ by <a href="https://zeus.gent/">Zeus WPI</a></div>
2020-07-17 13:17:53 +02:00
<div class="changeThemeButton" id="themeChange"><!-- Populated with JS --></div>
<div class="pull-right"><a href="https://github.com/ZeusWPI/Haldis">© {{ ""|year }}</a></div>
</div>
</div>
</footer>
2015-03-31 20:15:22 +02:00
{%- endblock %}