mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-10 09:33:44 +01:00
285 lines
11 KiB
HTML
285 lines
11 KiB
HTML
<!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>{{ self.title() | normalize_whitespace }} - {{ config.USER_APP_NAME }}</title>
|
|
<link rel="shortcut icon" href="/favicon-16.png" sizes="16x16">
|
|
<link rel="icon" href="/favicon-128.png" sizes="128x128">
|
|
<link rel="icon" href="/favicon-32.png" sizes="32x32">
|
|
<meta name="og:site_name" content="ContentDB">
|
|
{% if self.description and self.description != "" -%}
|
|
<meta name="og:title" content="{{ self.title() | normalize_whitespace }}">
|
|
<meta name="description" content="{{ self.description() | normalize_whitespace }}">
|
|
<meta name="og:description" content="{{ self.description() | normalize_whitespace }}">
|
|
{%- endif %}
|
|
|
|
<link rel="stylesheet" type="text/css" href="/static/libs/bootstrap.min.css">
|
|
<link rel="stylesheet" type="text/css" href="/static/custom.css?v=39">
|
|
<link rel="search" type="application/opensearchdescription+xml" href="/static/opensearch.xml" title="ContentDB" />
|
|
|
|
{% if noindex -%}
|
|
<meta name="robots" content="noindex">
|
|
{%- endif %}
|
|
|
|
{% block headextra %}{% endblock %}
|
|
</head>
|
|
<body>
|
|
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
|
|
<div class="container">
|
|
<a class="navbar-brand" href="/">{{ config.USER_APP_NAME }}</a>
|
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor01" aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
|
|
<div class="collapse navbar-collapse" id="navbarColor01">
|
|
<ul class="navbar-nav mr-auto">
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ url_for('packages.list_all', type='mod') }}">{{ _("Mods") }}</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ url_for('packages.list_all', type='game') }}">{{ _("Games") }}</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ url_for('packages.list_all', type='txp') }}">{{ _("Texture Packs") }}</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ url_for('packages.list_all', random=1, lucky=1) }}">{{ _("Random") }}</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ url_for('flatpage', path='help') }}">{{ _("Help") }}</a>
|
|
</li>
|
|
</ul>
|
|
<form class="form-inline my-2 my-lg-0" method="GET" action="/packages/">
|
|
{% if type %}<input type="hidden" name="type" value="{{ type }}" />{% endif %}
|
|
<div class="input-group mx-0 my-0">
|
|
<input class="form-control" name="q" type="text"
|
|
placeholder="{% if query_hint %}{{ _('Search %(type)s', type=query_hint | lower) }}{% else %}{{ _('Search all packages') }}{% endif %}"
|
|
value="{{ query or ''}}">
|
|
<div class="input-group-append">
|
|
<button type="submit" class="btn btn-secondary" title="{{ _('Search') }}">
|
|
<i class="fas fa-search"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<!-- <input class="btn btn-secondary my-2 my-sm-0"
|
|
data-toggle="tooltip" data-placement="bottom"
|
|
title="Go to the first found result for this query."
|
|
type="submit" name="lucky" value="First" /> -->
|
|
</form>
|
|
<ul class="navbar-nav ml-auto">
|
|
{% if current_user.is_authenticated %}
|
|
{% if todo_list_count is not none %}
|
|
<li class="nav-item">
|
|
<a class="nav-link notification-icon"
|
|
href="{{ url_for('todo.view_editor') }}"
|
|
title="{{ _('Work Queue') }}">
|
|
{% if todo_list_count > 0 %}
|
|
<i class="fas fa-inbox"></i>
|
|
<span class="badge badge-pill badge-notify">{{ todo_list_count }}</span>
|
|
{% else %}
|
|
<i class="fas fa-inbox" ></i>
|
|
{% endif %}
|
|
</a>
|
|
</li>
|
|
{% else %}
|
|
<li class="nav-item">
|
|
<a class="nav-link notification-icon"
|
|
href="{{ url_for('todo.view_user', username=current_user.username) }}"
|
|
title="{{ _('To do list') }}">
|
|
<i class="fas fa-tasks" ></i>
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
|
|
<li class="nav-item">
|
|
<a class="nav-link notification-icon"
|
|
href="{{ url_for('notifications.list_all') }}"
|
|
title="{{ _('Notifications') }}">
|
|
{% if current_user.notifications %}
|
|
<i class="fas fa-bell"></i>
|
|
{% set num_notifs = current_user.notifications | length %}
|
|
{% if num_notifs > 60 %}
|
|
<span class="badge badge-pill badge-notify badge-emoji">
|
|
😢
|
|
</span>
|
|
{% else %}
|
|
<span class="badge badge-pill badge-notify">
|
|
{{ num_notifs }}
|
|
</span>
|
|
{% endif %}
|
|
{% else %}
|
|
<i class="fas fa-bell" ></i>
|
|
{% endif %}
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link"
|
|
href="{{ url_for('packages.create_edit') }}"
|
|
title="{{ _('Add Package') }}">
|
|
<i class="fas fa-plus"></i>
|
|
</a>
|
|
</li>
|
|
|
|
<li class="nav-item dropdown">
|
|
<a class="nav-link dropdown-toggle"
|
|
data-toggle="dropdown"
|
|
role="button"
|
|
aria-expanded="false">
|
|
{{ current_user.display_name }}
|
|
<span class="caret"></span>
|
|
</a>
|
|
|
|
<ul class="dropdown-menu dropdown-menu-right" role="menu">
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ url_for('users.profile', username=current_user.username) }}">
|
|
{{ _("Profile") }}
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ url_for('todo.view_user', username=current_user.username) }}">
|
|
{{ _("To do list") }}
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ url_for('users.statistics', username=current_user.username) }}">
|
|
{{ _("Statistics") }}
|
|
</a>
|
|
</li>
|
|
{% if current_user.rank.atLeast(current_user.rank.EDITOR) or check_global_perm(current_user, "CREATE_TAG") %}
|
|
<li class="dropdown-divider"></li>
|
|
{% endif %}
|
|
{% if current_user.rank.atLeast(current_user.rank.MODERATOR) %}
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ url_for('admin.audit') }}">
|
|
{{ _("Audit Log") }}
|
|
</a>
|
|
</li>
|
|
{% if current_user.rank == current_user.rank.ADMIN %}
|
|
<li class="nav-item"><a class="nav-link" href="{{ url_for('admin.admin_page') }}">{{ _("Admin") }}</a></li>
|
|
{% else %}
|
|
{% if current_user.rank == current_user.rank.MODERATOR %}
|
|
<li class="nav-item"><a class="nav-link" href="{{ url_for('admin.license_list') }}">{{ _("License Editor") }}</a></li>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% if current_user.rank.atLeast(current_user.rank.EDITOR) %}
|
|
<li class="nav-item"><a class="nav-link" href="{{ url_for('admin.restore') }}">{{ _("Restore Package") }}</a></li>
|
|
{% endif %}
|
|
{% if check_global_perm(current_user, "EDIT_TAGS") %}
|
|
<li class="nav-item"><a class="nav-link" href="{{ url_for('admin.tag_list') }}">{{ _("Tag Editor") }}</a></li>
|
|
{% elif check_global_perm(current_user, "CREATE_TAG") %}
|
|
<li class="nav-item"><a class="nav-link" href="{{ url_for('admin.create_edit_tag') }}">{{ _("Create Tag") }}</a></li>
|
|
{% endif %}
|
|
<li class="dropdown-divider"></li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ url_for('users.profile_edit', username=current_user.username) }}">
|
|
{{ _("Settings") }}
|
|
</a>
|
|
</li>
|
|
<li class="nav-item"><a class="nav-link" href="{{ url_for('users.logout') }}">{{ _("Sign out") }}</a></li>
|
|
</ul>
|
|
</li>
|
|
{% else %}
|
|
<li><a class="nav-link" href="{{ url_for('users.login') }}">{{ _("Sign in") }}</a></li>
|
|
{% endif %}
|
|
|
|
<li class="nav-item dropdown">
|
|
<a class="nav-link dropdown-toggle"
|
|
data-toggle="dropdown"
|
|
role="button"
|
|
aria-expanded="false">
|
|
<i class="fas fa-language"></i>
|
|
</a>
|
|
<ul class="dropdown-menu dropdown-menu-right" role="menu">
|
|
{% for locale, locale_name in config["LANGUAGES"].items() %}
|
|
<li class="nav-item">
|
|
<form method="POST" action="{{ url_for('set_locale') }}">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
|
<input type="hidden" name="locale" value="{{ locale }}" />
|
|
<input type="hidden" name="r" value="{{ url_set_query() }}" />
|
|
<input type="submit" class="btn btn-link nav-link" value="{{ locale_name }} ({{ locale }})">
|
|
</form>
|
|
</li>
|
|
{% endfor %}
|
|
<li class="dropdown-divider"></li>
|
|
<li class="nav-item ">
|
|
<a class="nav-link" href="https://hosted.weblate.org/projects/minetest/contentdb/">
|
|
<small>
|
|
{{ _("Help translate ContentDB") }}
|
|
</small>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</form>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</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="alert alert-{{category}} container">
|
|
<span class="icon_message"></span>
|
|
|
|
{{ message }}
|
|
|
|
<div style="clear: both;"></div>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
{%- endwith %}
|
|
{% endblock %}
|
|
|
|
{% block container %}
|
|
<main class="container mt-4">
|
|
{% block content %}
|
|
{% endblock %}
|
|
</main>
|
|
{% endblock %}
|
|
|
|
<footer class="my-5">
|
|
<p class="pt-5 mb-1">
|
|
ContentDB © 2018-23 to <a href="{{ url_for('flatpage', path='about') }}">rubenwardy</a>
|
|
</p>
|
|
|
|
<ul class="list-inline my-1">
|
|
<li class="list-inline-item"><a href="{{ url_for('flatpage', path='help') }}">{{ _("Help") }}</a></li>
|
|
<li class="list-inline-item"><a href="{{ url_for('flatpage', path='about') }}">{{ _("About") }}</a></li>
|
|
<li class="list-inline-item"><a href="{{ url_for('flatpage', path='rules') }}">{{ _("Rules") }}</a></li>
|
|
<li class="list-inline-item"><a href="{{ url_for('flatpage', path='policy_and_guidance') }}">{{ _("Policy and Guidance") }}</a></li>
|
|
<li class="list-inline-item"><a href="{{ url_for('flatpage', path='help/api') }}">{{ _("API") }}</a></li>
|
|
<li class="list-inline-item"><a href="{{ url_for('flatpage', path='privacy_policy') }}">{{ _("Privacy Policy") }}</a></li>
|
|
{% if request.endpoint != "flatpage" and request.endpoint != "report.report" %}
|
|
<li class="list-inline-item"><a href="{{ url_for('report.report', url=url_current()) }}">{{ _("Report / DMCA") }}</a></li>
|
|
{% endif %}
|
|
<li class="list-inline-item"><a href="{{ url_for('users.list_all') }}">{{ _("User List") }}</a></li>
|
|
<li class="list-inline-item"><a href="{{ url_for('threads.list_all') }}">{{ _("Threads") }}</a></li>
|
|
<li class="list-inline-item"><a href="{{ url_for('donate.donate') }}">{{ _("Support Packages") }}</a></li>
|
|
<li class="list-inline-item"><a href="https://github.com/minetest/contentdb">{{ _("Source Code") }}</a></li>
|
|
</ul>
|
|
|
|
{% if debug %}
|
|
<p style="color: red">
|
|
DEBUG MODE ENABLED
|
|
</p>
|
|
{% endif %}
|
|
</footer>
|
|
|
|
<script src="/static/libs/jquery.min.js"></script>
|
|
<script src="/static/libs/bootstrap.min.js"></script>
|
|
<script src="/static/libs/easymde.min.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="/static/libs/easymde.min.css">
|
|
<link href="/static/fa/css/all.css" rel="stylesheet">
|
|
<script src="/static/markdowntextarea.js?v=2"></script>
|
|
|
|
{% block scriptextra %}{% endblock %}
|
|
</body>
|
|
</html>
|