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