contentdb/app/templates/base.html

113 lines
3.5 KiB
HTML
Raw Normal View History

2018-03-18 18:43:30 +01:00
<!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>
2018-05-09 19:35:36 +02:00
<link rel="stylesheet" type="text/css" href="/static/main.css">
2018-05-11 16:04:17 +02:00
{% block headextra %}{% endblock %}
2018-03-18 18:43:30 +01:00
</head>
<body>
<nav>
2018-05-18 01:16:10 +02:00
<div class="container">
<ul class="nav navbar-nav navbar-left">
2018-05-26 19:16:11 +02:00
<li><a href="/">{{ config.USER_APP_NAME }}</a></li>
2018-05-18 01:16:10 +02:00
{% for item in current_menu.children recursive %}
{% if item.visible %}
<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 }}
2018-03-21 20:24:45 +01:00
{% if item.children %}
2018-05-18 01:16:10 +02:00
<span class="caret"></span>
{% endif %}
</a>
2018-03-18 18:43:30 +01:00
{% if item.children %}
2018-05-18 01:16:10 +02:00
<ul class="dropdown-menu" role="menu">
{{ loop(item.children) }}
</ul>
2018-03-21 20:24:45 +01:00
{% endif %}
2018-05-18 01:16:10 +02:00
</li>
{% endif %}
{% endfor %}
</ul>
<ul class="nav navbar-nav navbar-right">
{% if current_user.is_authenticated %}
2018-05-18 01:33:24 +02:00
<li><a href="{{ url_for('notifications_page') }}">
<img src="/static/notification{% if current_user.notifications %}_alert{% endif %}.svg" />
</a></li>
2018-05-18 01:16:10 +02:00
<li><a href="{{ url_for('create_edit_package_page') }}">+</a></li>
<li class="dropdown">
2018-05-26 04:08:14 +02:00
<a class="dropdown-toggle"
2018-05-18 01:16:10 +02:00
data-toggle="dropdown"
role="button"
aria-expanded="false">{{ current_user.display_name }}
<span class="caret"></span></a>
2018-03-21 20:24:45 +01:00
<ul class="dropdown-menu" role="menu">
2018-05-18 01:16:10 +02:00
<li>
<a href="{{ url_for('user_profile_page', username=current_user.username) }}">Profile</a>
</li>
{% if current_user.canAccessTodoList() %}
<li><a href="{{ url_for('todo_page') }}">Work Queue</a></li>
<li><a href="{{ url_for('user_list_page') }}">User list</a></li>
2018-05-18 01:16:10 +02:00
{% endif %}
{% if current_user.rank == current_user.rank.ADMIN %}
<li><a href="{{ url_for('admin_page') }}">Admin</a></li>
{% endif %}
2018-05-27 18:11:02 +02:00
{% if current_user.rank == current_user.rank.MODERATOR %}
<li><a href="{{ url_for('tag_list_page') }}">Tag Editor</a></li>
2018-07-28 18:26:28 +02:00
<li><a href="{{ url_for('license_list_page') }}">License Editor</a></li>
2018-05-27 18:11:02 +02:00
{% endif %}
2018-05-18 01:16:10 +02:00
<li><a href="{{ url_for('user.logout') }}">Sign out</a></li>
2018-03-21 20:24:45 +01:00
</ul>
</li>
2018-05-18 01:16:10 +02:00
{% else %}
<li><a href="{{ url_for('user.login') }}">Sign in</a></li>
2018-03-21 20:24:45 +01:00
{% endif %}
2018-05-18 01:16:10 +02:00
</ul>
2018-05-21 15:56:00 +02:00
<div class="clearboth"></div>
2018-05-18 01:16:10 +02:00
</div>
2018-03-18 18:43:30 +01:00
</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 %}
2018-05-18 02:27:11 +02:00
<footer>
2018-06-02 18:17:32 +02:00
ContentDB &copy; 2018 to <a href="https://rubenwardy.com/">rubenwardy</a> |
<a href="https://github.com/minetest/contentdb">GitHub</a> |
2018-05-18 02:27:11 +02:00
<a href="{{ url_for('flatpage', path='help') }}">Help</a> |
2018-06-02 18:17:32 +02:00
<a href="{{ url_for('flatpage', path='help/reporting') }}">Report / DMCA</a>
2018-05-18 02:27:11 +02:00
</footer>
2018-03-18 18:43:30 +01:00
</html>