2015-03-31 20:15:22 +02:00
{% extends "bootstrap/base.html" %}
{% import "bootstrap/utils.html" as utils %}
2015-06-05 11:29:14 +02:00
{% import "bootstrap/google.html" as google %}
2015-03-31 20:15:22 +02:00
{% set navbar = [
('home', 'Home'),
('order_bp.orders', 'Orders'),
2016-08-01 23:40:04 +02:00
('locations', 'Locations'),
2015-03-31 20:15:22 +02:00
('about', 'About'),
('stats', 'Stats'),
] -%}
{% if not current_user.is_anonymous() and current_user.is_admin() -%}
{% set navbar = navbar + [('admin.index', 'Admin')] -%}
{% endif -%}
{% set active_page = active_page|default('index') -%}
{% block title %}
2015-04-03 18:41:44 +02:00
Haldis - {{ active_page|capitalize }}
2015-03-31 20:15:22 +02:00
{% endblock %}
{% block styles %}
{{ super() }}
2015-06-05 11:29:14 +02:00
< link rel = "stylesheet" href = "{{ url_for('static', filename='css/main.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() }}
2015-06-05 11:29:14 +02:00
{{ google.uanalytics('UA-25444917-9') }}
2015-03-31 20:15:22 +02:00
< script src = "{{ url_for('static', filename='js/timer.js') }}" > < / script >
< script async defer id = "github-bjs" src = "https://buttons.github.io/buttons.js" > < / script >
{% endblock %}
{% block navbar %}
< 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 >
2015-04-03 19:11:07 +02:00
< a class = "navbar-brand" href = "{{ url_for('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('login') }}" > Login< / a > < / li >
{% else %}
2015-06-05 11:39:34 +02:00
< li > < a href = "{{ url_for('profile') }}" > {{ current_user.username }}< / a > < / li >
2015-03-31 20:15:22 +02:00
< li > < a href = "{{ url_for('logout') }}" > Logout< / a > < / li >
{% endif %}
< / ul >
< / div > <!-- /.nav - collapse -->
< / div >
< / nav >
{% endblock %}
{% block content -%}
{{ utils.flashed_messages(container=True) }}
< div class = "container" >
{% block container -%}
{%- endblock %}
< / div >
< footer >
< hr >
< div class = "container" >
< div class = "pull-right" > Made with ❤ by < a href = "http://zeus.ugent.be" > Zeus WPI< / a > < / div >
2015-04-03 18:51:19 +02:00
< div class = "pull-left" > < a class = "github-button" href = "https://github.com/ZeusWPI/haldis" data-icon = "octicon-star" data-style = "mega" data-count-href = "/ZeusWPI/Haldis/stargazers" data-count-api = "/repos/ZeusWPI/Haldis#stargazers_count" data-count-aria-label = "# stargazers on GitHub" aria-label = "Star ZeusWPI/Haldis on GitHub" > Star< / a > < / div >
2015-04-03 18:41:44 +02:00
< div class = "text-center" > < a href = "http://github.com/ZeusWPI/Haldis" > © {{ ""|year }}< / a > < / div >
2015-03-31 20:15:22 +02:00
< / div >
< / footer >
{%- endblock %}