91 lines
4.2 KiB
HTML
91 lines
4.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="pl">
|
|
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
|
<title>{% block title %}Aplikacja Zbiórek{% endblock %}</title>
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootswatch@5.3.0/dist/darkly/bootstrap.min.css">
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/custom.css') }}" />
|
|
{% block extra_head %}{% endblock %}
|
|
</head>
|
|
|
|
<body class="d-flex flex-column min-vh-100">
|
|
<nav class="navbar navbar-expand-lg">
|
|
<div class="container">
|
|
<a class="navbar-brand d-flex align-items-center gap-2" href="{{ url_for('index') }}">
|
|
{% set nav_mode = (global_settings.navbar_brand_mode if global_settings and
|
|
global_settings.navbar_brand_mode else ('logo' if global_settings and
|
|
global_settings.show_logo_in_navbar else 'text')) %}
|
|
{% if nav_mode == 'logo' and global_settings and global_settings.logo_url %}
|
|
<img src="{{ global_settings.logo_url }}" alt="Logo" style="max-height:40px; vertical-align:middle;">
|
|
{% else %}
|
|
<span>{{ global_settings.site_title if global_settings and global_settings.site_title else "Zbiórki"
|
|
}}</span>
|
|
{% endif %}
|
|
</a>
|
|
|
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#mainNavbar"
|
|
aria-controls="mainNavbar" aria-expanded="false" aria-label="Toggle navigation">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
|
|
<div class="collapse navbar-collapse" id="mainNavbar">
|
|
<ul class="navbar-nav ms-auto">
|
|
{% set hide_links = request.path == url_for('index') or request.path ==
|
|
url_for('zbiorki_zrealizowane') %}
|
|
{% if not hide_links %}
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ url_for('index') }}">Aktualne zbiórki</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ url_for('zbiorki_zrealizowane') }}">Zrealizowane zbiórki</a>
|
|
</li>
|
|
{% endif %}
|
|
{% if current_user.is_authenticated %}
|
|
<li class="nav-item"><a class="nav-link" href="{{ url_for('admin_dashboard') }}">Panel Admina</a>
|
|
</li>
|
|
<li class="nav-item"><a class="nav-link" href="{{ url_for('wyloguj') }}">Wyloguj</a></li>
|
|
{% else %}
|
|
{% if is_ip_allowed %}
|
|
<li class="nav-item"><a class="nav-link" href="{{ url_for('zaloguj') }}">Zaloguj</a></li>
|
|
{% endif %}
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<div class="container mt-4">
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
{% for category, message in messages %}
|
|
<div class="alert alert-{{ category|default('secondary') }}">{{ message }}</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endwith %}
|
|
|
|
<main class="flex-grow-1">
|
|
{% block content %}{% endblock %}
|
|
</main>
|
|
</div>
|
|
|
|
<!-- stopka -->
|
|
<footer class="border-top mt-5 py-3 text-center small text-muted">
|
|
{% set footer_mode = global_settings.footer_brand_mode if global_settings and global_settings.footer_brand_mode
|
|
else 'text' %}
|
|
{% if footer_mode == 'logo' and global_settings and global_settings.logo_url %}
|
|
<img src="{{ global_settings.logo_url }}" alt="Logo" style="max-height:28px;">
|
|
{% else %}
|
|
{{ global_settings.footer_text if global_settings and global_settings.footer_text else "© " ~ (now().year if now
|
|
else '2025') ~ " linuxiarz.pl" }}
|
|
{% endif %}
|
|
</footer>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
|
<script src="{{ url_for('static', filename='js/progress.js') }}"></script>
|
|
|
|
{% block extra_scripts %}{% endblock %}
|
|
</body>
|
|
|
|
</html> |