2015-03-27 21:57:37 +01:00
{% extends "bootstrap/base.html" %}
2015-03-28 01:09:59 +01:00
{% import "bootstrap/utils.html" as utils %}
2015-03-27 21:57:37 +01:00
2015-03-27 18:07:06 +01:00
{% set navbar = [
('home', 'Home'),
2015-03-28 00:44:58 +01:00
('order_bp.orders', 'Orders'),
2015-03-27 18:07:06 +01:00
('about', 'About'),
('stats', 'Stats'),
] -%}
2015-03-27 18:25:09 +01:00
{% if not current_user.is_anonymous() and current_user.is_admin() -%}
2015-03-27 18:07:06 +01:00
{% set navbar = navbar + [('admin.index', 'Admin')] -%}
{% endif -%}
{% set active_page = active_page|default('index') -%}
2015-03-27 01:07:43 +01:00
2015-03-27 21:57:37 +01:00
{% block title %}
2015-03-30 23:53:21 +02:00
James - {{ active_page|capitalize }}
2015-03-27 21:57:37 +01:00
{% endblock %}
2015-03-30 00:23:59 +02:00
2015-03-27 21:57:37 +01:00
{% block styles %}
{{ super() }}
2015-03-27 01:07:43 +01:00
< link rel = "stylesheet" href = "{{ url_for('static', filename='css/main.css') }}" >
2015-03-27 21:57:37 +01:00
{% endblock %}
2015-03-30 00:23:59 +02:00
{% block scripts %}
2015-03-30 00:29:32 +02:00
{{ super() }}
2015-03-30 23:02:05 +02:00
< script src = "{{ url_for('static', filename='js/timer.js') }}" > < / script >
2015-03-30 00:23:59 +02:00
< script async defer id = "github-bjs" src = "https://buttons.github.io/buttons.js" > < / script >
{% endblock %}
2015-03-27 21:57:37 +01:00
{% block navbar %}
2015-03-27 01:07:43 +01:00
< nav class = "navbar navbar-default navbar-fixed-top" >
2015-03-26 00:17:43 +01:00
< div class = "container" >
2015-03-27 01:07:43 +01:00
< 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('home') }}" > FOODBOT< / a >
< / div >
< div id = "navbar" class = "navbar-collapse collapse" >
< ul class = "nav navbar-nav" >
2015-03-27 18:07:06 +01:00
{% for id, text in navbar -%}
< li class = "{{ 'active' if id == active_page else '' }}" >
< a href = "{{ url_for(id) }}" > {{ text|e }}< / a >
< / li >
{% endfor -%}
2015-03-27 01:07:43 +01:00
< / ul >
< ul class = "nav navbar-nav navbar-right" >
2015-03-26 23:31:13 +01:00
{% if current_user.is_anonymous() %}
< li > < a href = "{{ url_for('login') }}" > Login< / a > < / li >
{% else %}
2015-03-27 01:07:43 +01:00
< li > < a href = "#" > {{ current_user.username }}< / a > < / li >
2015-03-26 23:31:13 +01:00
< li > < a href = "{{ url_for('logout') }}" > Logout< / a > < / li >
{% endif %}
2015-03-26 00:17:43 +01:00
< / ul >
2015-03-27 01:07:43 +01:00
< / div > <!-- /.nav - collapse -->
2015-03-26 00:17:43 +01:00
< / div >
2015-03-27 01:07:43 +01:00
< / nav >
2015-03-27 21:57:37 +01:00
{% endblock %}
{% block content -%}
2015-03-29 13:01:42 +02:00
{{ utils.flashed_messages(container=True) }}
2015-03-26 00:17:43 +01:00
< div class = "container" >
2015-03-27 21:57:37 +01:00
{% block container -%}
{%- endblock %}
2015-03-26 00:17:43 +01:00
< / div >
2015-03-30 00:23:59 +02:00
< footer >
< hr >
< div class = "container" >
< div class = "pull-right" > Made with ❤ by < a href = "http://zeus.ugent.be" > Zeus WPI< / a > < / div >
< div class = "pull-left" > < a class = "github-button" href = "https://github.com/ZeusWPI/FoodBot" data-icon = "octicon-star" data-style = "mega" data-count-href = "/ZeusWPI/FoodBot/stargazers" data-count-api = "/repos/ZeusWPI/FoodBot#stargazers_count" data-count-aria-label = "# stargazers on GitHub" aria-label = "Star ZeusWPI/FoodBot on GitHub" > Star< / a > < / div >
< div class = "text-center" > © {{ ""|year }}< a href = "http://github.com/ZeusWPI/FoodBot" > < / a > < / div >
< / div >
< / footer >
2015-03-27 21:57:37 +01:00
{%- endblock %}