61 lines
1.8 KiB
HTML
61 lines
1.8 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>ImageRepo - {% block title %}{% endblock %}</title>
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
|
</head>
|
|
<body>
|
|
|
|
<div class="mainview">
|
|
<header>
|
|
<header>
|
|
<nav class="navbar">
|
|
<a class="nav-button" href="{{ url_for('main.gallery') if current_user.is_authenticated else url_for('main.index') }}">Home</a>
|
|
|
|
{% if current_user.is_authenticated and current_user.is_admin %}
|
|
<a class="nav-button" href="{{ url_for('main.settings') }}">Settings</a>
|
|
{% endif %}
|
|
|
|
{% if current_user.is_authenticated %}
|
|
<a class="nav-button" href="{{ url_for('main.artist_list') }}">Artists</a>
|
|
<a class="nav-button" href="{{ url_for('auth.logout') }}">Logout</a>
|
|
{% else %}
|
|
<a class="nav-button" href="{{ url_for('auth.login') }}">Login</a>
|
|
<a class="nav-button" href="{{ url_for('auth.register') }}">Register</a>
|
|
{% endif %}
|
|
</nav>
|
|
</header>
|
|
|
|
</header>
|
|
|
|
|
|
<!-- FLASH MESSAGES -->
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
<div class="flash-container">
|
|
{% for category, message in messages %}
|
|
<div class="flash flash-{{ category }}">{{ message }}</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
{% endwith %}
|
|
|
|
<hr>
|
|
|
|
<!-- MAIN CONTENT -->
|
|
<div class="content">
|
|
{% block content %}{% endblock %}
|
|
</div>
|
|
</div>
|
|
|
|
{% if request.endpoint == 'main.gallery' or request.endpoint == 'main.artist_gallery' %}
|
|
<input type="hidden" id="hasNextPage" value="{{ has_next|lower }}">
|
|
<input type="hidden" id="nextPageUrl" value="{{ next_page_url }}">
|
|
<input type="hidden" id="hasPrevPage" value="{{ has_prev|lower }}">
|
|
<input type="hidden" id="prevPageUrl" value="{{ prev_page_url }}">
|
|
{% endif %}
|
|
|
|
</body>
|
|
</html>
|