]> git.lizzy.rs Git - cheatdb.git/blob - app/templates/base.html
Fix profile picture bugs
[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/bootstrap.css">
10         <link rel="stylesheet" type="text/css" href="/static/custom.css?v=5">
11         {% block headextra %}{% endblock %}
12 </head>
13
14 <body>
15         <nav class="navbar navbar-expand-lg navbar-dark bg-primary">
16                 <div class="container">
17                         <a class="navbar-brand" href="/">{{ config.USER_APP_NAME }}</a>
18                         <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor01" aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation">
19                                 <span class="navbar-toggler-icon"></span>
20                         </button>
21
22                         <div class="collapse navbar-collapse" id="navbarColor01">
23                                 <ul class="navbar-nav mr-auto">
24                                         {% for item in current_menu.children recursive %}
25                                                 {% if item.visible %}
26                                                         <li class="nav-item {% if item.children %} dropdown{% endif %}">
27                                                                 <a class="nav-link" href="{{ item.url }}"
28                                                                                 {% if item.children %}
29                                                                                         class="dropdown-toggle"
30                                                                                         data-toggle="dropdown"
31                                                                                         role="button"
32                                                                                         aria-expanded="false"
33                                                                                 {% endif %}>
34                                                                         {{ item.text }}
35                                                                         {% if item.children %}
36                                                                                 <span class="caret"></span>
37                                                                         {% endif %}
38                                                                 </a>
39                                                                 {% if item.children %}
40                                                                 <ul class="dropdown-menu" role="menu">
41                                                                         {{ loop(item.children) }}
42                                                                 </ul>
43                                                                 {% endif %}
44                                                         </li>
45                                                 {% endif %}
46                                         {% endfor %}
47                                 </ul>
48                                 <form class="form-inline my-2 my-lg-0" method="GET" action="/packages/">
49                                         {% if type %}<input type="hidden" name="type" value="{{ type }}" />{% endif %}
50                                         <input class="form-control mr-sm-2" name="q" type="text" placeholder="Search {{ title | lower or 'all packages' }}" value="{{ query or ''}}">
51                                         <input class="btn btn-secondary my-2 my-sm-0 mr-sm-2" type="submit" value="Search" />
52                                         <!-- <input class="btn btn-secondary my-2 my-sm-0"
53                                                 data-toggle="tooltip" data-placement="bottom"
54                                                 title="Go to the first found result for this query."
55                                                 type="submit" name="lucky" value="First" /> -->
56                                 </form>
57                                 <ul class="navbar-nav ml-auto">
58                                         {% if current_user.is_authenticated %}
59                                                 <li class="nav-item"><a class="nav-link" href="{{ url_for('notifications_page') }}">
60                                                         <img src="/static/notification{% if current_user.notifications %}_alert{% endif %}.svg" />
61                                                 </a></li>
62                                                 <li class="nav-item"><a class="nav-link" href="{{ url_for('create_edit_package_page') }}">+</a></li>
63                                                 <li class="nav-item dropdown">
64                                                         <a class="nav-link dropdown-toggle"
65                                                                 data-toggle="dropdown"
66                                                                 role="button"
67                                                                 aria-expanded="false">{{ current_user.display_name }}
68                                                                         <span class="caret"></span></a>
69
70                                                         <ul class="dropdown-menu" role="menu">
71                                                                 <li class="nav-item">
72                                                                         <a class="nav-link" href="{{ url_for('user_profile_page', username=current_user.username) }}">Profile</a>
73                                                                 </li class="nav-item">
74                                                                 <li class="nav-item">
75                                                                         <a class="nav-link" href="{{ url_for('user_profile_page', username=current_user.username) }}#unadded-topics">Your unadded topics</a>
76                                                                 </li class="nav-item">
77                                                                 {% if current_user.canAccessTodoList() %}
78                                                                         <li class="nav-item"><a class="nav-link" href="{{ url_for('todo_page') }}">Work Queue</a></li>
79                                                                         <li class="nav-item"><a  class="nav-link" href="{{ url_for('user_list_page') }}">User list</a></li>
80                                                                 {% endif %}
81                                                                 <li class="nav-item">
82                                                                         <a class="nav-link" href="{{ url_for('todo_topics_page') }}">All unadded topics</a>
83                                                                 </li class="nav-item">
84                                                                 {% if current_user.rank == current_user.rank.ADMIN %}
85                                                                         <li class="nav-item"><a class="nav-link" href="{{ url_for('admin_page') }}">Admin</a></li>
86                                                                 {% endif %}
87                                                                 {% if current_user.rank == current_user.rank.MODERATOR %}
88                                                                         <li class="nav-item"><a class="nav-link" href="{{ url_for('tag_list_page') }}">Tag Editor</a></li>
89                                                                         <li class="nav-item"><a class="nav-link" href="{{ url_for('license_list_page') }}">License Editor</a></li>
90                                                                 {% endif %}
91                                                                 <li class="nav-item"><a class="nav-link" href="{{ url_for('user.logout') }}">Sign out</a></li>
92                                                         </ul>
93                                                 </li>
94                                         {% else %}
95                                                 <li><a class="nav-link" href="{{ url_for('user.login') }}">Sign in</a></li>
96                                         {% endif %}
97                                 </ul>
98                         </div>
99                 </div>
100         </nav>
101
102         {% block flash_messages %}
103                 {%- with messages = get_flashed_messages(with_categories=true) -%}
104                         {% if messages %}
105                                 <ul id="alerts">
106                                         {% for category, message in messages %}
107                                                 <li class="alert alert-{{category}} container">
108                                                         <span class="icon_message"></span>
109
110                                                         {{ message|safe }}
111
112                                                         <div style="clear: both;"></div>
113                                                 </li>
114                                         {% endfor %}
115                                 </ul>
116                         {% endif %}
117                 {%- endwith %}
118         {% endblock %}
119
120         {% block container %}
121         <main class="container mt-4">
122                 {% block content %}
123                 {% endblock %}
124         </main>
125         {% endblock %}
126
127         <footer class="container footer-copyright my-5 page-footer font-small text-center">
128                 ContentDB &copy; 2018 to <a href="https://rubenwardy.com/">rubenwardy</a> |
129                 <a href="https://github.com/minetest/contentdb">GitHub</a> |
130                 <a href="{{ url_for('flatpage', path='help') }}">Help</a> |
131                 <a href="{{ url_for('flatpage', path='help/reporting') }}">Report / DMCA</a>
132         </footer>
133
134         <script src="/static/jquery.min.js"></script>
135         <script src="/static/popper.min.js"></script>
136         <script src="/static/bootstrap.min.js"></script>
137         <script src="/static/easymde.min.js"></script>
138         <link rel="stylesheet" type="text/css" href="/static/easymde.min.css">
139         <script>
140                 $("textarea.markdown").each(function() {
141                         new EasyMDE({ element: this, hideIcons: ["image"] });
142                 })
143         </script>
144         {% block scriptextra %}{% endblock %}
145 </body>
146 </html>