aboutsummaryrefslogtreecommitdiff
path: root/app/templates/base.html
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2018-03-18 17:43:30 +0000
committerrubenwardy <rw@rubenwardy.com>2018-03-18 17:43:30 +0000
commit366a2302d092c12f388f0eb8efb4faaa3acd3303 (patch)
tree070f3ef21b04bd716b9136a827d9fe7b90c32e2c /app/templates/base.html
downloadcheatdb-366a2302d092c12f388f0eb8efb4faaa3acd3303.tar.xz
Initial commit
Diffstat (limited to 'app/templates/base.html')
-rw-r--r--app/templates/base.html74
1 files changed, 74 insertions, 0 deletions
diff --git a/app/templates/base.html b/app/templates/base.html
new file mode 100644
index 0000000..6e8c372
--- /dev/null
+++ b/app/templates/base.html
@@ -0,0 +1,74 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>{% block title %}title{% endblock %} - {{ config.USER_APP_NAME }}</title>
+ <link rel="stylesheet" type="text/css" href="/static/style.css">
+</head>
+
+<body>
+ <nav>
+ <ul class="nav navbar-nav">
+ <li><a href="/">{{ config.USER_APP_NAME }}</a></li>
+ {% for item in current_menu.children recursive %}
+ <li{% if item.children %} class="dropdown"{% endif %}>
+ <a href="{{ item.url }}"
+ {% if item.children %}
+ class="dropdown-toggle"
+ data-toggle="dropdown"
+ role="button"
+ aria-expanded="false"
+ {% endif %}>
+ {{ item.text }}
+ {% if item.children %}
+ <span class="caret"></span>
+ {% endif %}
+ </a>
+ {% if item.children %}
+ <ul class="dropdown-menu" role="menu">
+ {{ loop(item.children) }}
+ </ul>
+ {% endif %}
+ </li>
+ {% endfor %}
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ {% if current_user.is_authenticated %}
+ <li><a href="{{ url_for('user_profile_page') }}">{{ current_user.first_name or current_user.username }}</a></li>
+ <li><a href="{{ url_for('user.logout') }}">Sign out</a></li>
+ {% else %}
+ <li><a href="{{ url_for('user.login') }}">Sign in</a></li>
+ {% endif %}
+ </ul>
+ <div style="clear:both;"></div>
+ </nav>
+
+
+ {% block flash_messages %}
+ {%- with messages = get_flashed_messages(with_categories=true) -%}
+ {% if messages %}
+ <ul id="alerts">
+ {% for category, message in messages %}
+ <li class="box box_grey alert alert-{{category}}">
+ <span class="icon_message"></span>
+
+ {{ message|safe }}
+
+ <div style="clear: both;"></div>
+ </li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+ {%- endwith %}
+ {% endblock %}
+
+ {% block container %}
+ <main>
+ {% block content %}
+ {% endblock %}
+ </main>
+ {% endblock %}
+</html>