]> git.lizzy.rs Git - cheatdb.git/blob - app/templates/base.html
Add package licenses
[cheatdb.git] / app / templates / base.html
1 <!DOCTYPE html>
2 <html>
3
4 <head>
5         <meta charset="utf-8">
6         <meta http-equiv="X-UA-Compatible" content="IE=edge">
7         <meta name="viewport" content="width=device-width, initial-scale=1">
8         <title>{% block title %}title{% endblock %} - {{ config.USER_APP_NAME }}</title>
9         <link rel="stylesheet" type="text/css" href="/static/style.css">
10 </head>
11
12 <body>
13         <nav>
14                 <ul class="nav navbar-nav">
15                         <li><a href="/">{{ config.USER_APP_NAME }}</a></li>
16                         {% for item in current_menu.children recursive %}
17                                 {% if item.visible %}
18                                         <li{% if item.children %} class="dropdown"{% endif %}>
19                                                 <a href="{{ item.url }}"
20                                                                 {% if item.children %}
21                                                                         class="dropdown-toggle"
22                                                                         data-toggle="dropdown"
23                                                                         role="button"
24                                                                         aria-expanded="false"
25                                                                 {% endif %}>
26                                                         {{ item.text }}
27                                                         {% if item.children %}
28                                                                 <span class="caret"></span>
29                                                         {% endif %}
30                                                 </a>
31                                                 {% if item.children %}
32                                                 <ul class="dropdown-menu" role="menu">
33                                                         {{ loop(item.children) }}
34                                                 </ul>
35                                                 {% endif %}
36                                         </li>
37                                 {% endif %}
38                         {% endfor %}
39                 </ul>
40                 <ul class="nav navbar-nav navbar-right">
41                         {% if current_user.is_authenticated %}
42                                 <li><a href="{{ url_for('user_profile_page', username=current_user.username) }}">{{ current_user.display_name }}</a></li>
43                                 <li><a href="{{ url_for('user.logout') }}">Sign out</a></li>
44                         {% else %}
45                                 <li><a href="{{ url_for('user.login') }}">Sign in</a></li>
46                         {% endif %}
47                 </ul>
48                 <div style="clear:both;"></div>
49         </nav>
50
51
52         {% block flash_messages %}
53                 {%- with messages = get_flashed_messages(with_categories=true) -%}
54                         {% if messages %}
55                                 <ul id="alerts">
56                                         {% for category, message in messages %}
57                                                 <li class="box box_grey alert alert-{{category}}">
58                                                         <span class="icon_message"></span>
59
60                                                         {{ message|safe }}
61
62                                                         <div style="clear: both;"></div>
63                                                 </li>
64                                         {% endfor %}
65                                 </ul>
66                         {% endif %}
67                 {%- endwith %}
68         {% endblock %}
69
70         {% block container %}
71         <main>
72                 {% block content %}
73                 {% endblock %}
74         </main>
75         {% endblock %}
76 </html>