haldis/app/templates/layout.html

89 lines
3.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'),
2015-03-31 20:15:22 +02:00
('order_bp.orders', 'Orders'),
('general_bp.locations', 'Locations'),
2019-09-10 02:50:22 +02:00
('general_bp.map_view', 'Map'),
('general_bp.about', 'About'),
('stats_blueprint.stats', 'Stats'),
2015-03-31 20:15:22 +02:00
] -%}
{% set active_page = active_page|default('index') -%}
{% block title %}
2019-05-29 18:02:55 +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">
<link rel="stylesheet" href="/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() }}
<script type="text/javascript" src="{{ url_for('static', filename='js/theme.js') }}"></script>
2019-11-16 14:54:45 +01:00
<script type="text/javascript" src="{{ url_for('static', filename='js/timer.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/customThemes.js') }}"></script>
2015-03-31 20:15:22 +02:00
{% endblock %}
{% block navbar %}
2019-11-16 14:54:45 +01:00
<div class="background"></div>
2019-12-05 19:39:35 +01:00
<div class="foreground"></div>
2015-03-31 20:15:22 +02:00
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<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>
2015-03-31 20:15:22 +02:00
</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() %}
<li><a href="{{ url_for('auth_bp.login') }}">Login</a></li>
2015-03-31 20:15:22 +02:00
{% 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>
2015-03-31 20:15:22 +02:00
{% endif %}
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
{% endblock %}
{% block content -%}
{{ utils.flashed_messages(container=True) }}
<div class="container main">
2015-03-31 20:15:22 +02:00
{% block container -%}
{%- endblock %}
</div>
<footer>
<hr>
<div class="container">
2019-10-24 13:50:51 +02:00
<div class="footerWrapper">
2019-09-13 15:51:49 +02:00
<div class="pull-left">Made with ❤ by <a href="http://zeus.ugent.be">Zeus WPI</a></div>
<div class="changeThemeButton toggleDarkmode" id="darkmode"><a>Enter darkmode</a></div>
2019-09-13 15:51:49 +02:00
<div class="pull-right"><a href="http://github.com/ZeusWPI/Haldis">© {{ ""|year }}</a></div>
2019-10-24 13:50:51 +02:00
</div>
2015-03-31 20:15:22 +02:00
</div>
</footer>
{%- endblock %}