rozbicie na moduły, poprawki i komendy cli
This commit is contained in:
93
zbiorka_app/templates/base.html
Normal file
93
zbiorka_app/templates/base.html
Normal file
@@ -0,0 +1,93 @@
|
||||
<!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="{{ asset_url('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.typ_navbar if global_settings and
|
||||
global_settings.typ_navbar else ('logo' if global_settings and
|
||||
global_settings.pokaz_logo_w_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.tytul_strony if global_settings and global_settings.tytul_strony 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|default(false) %}
|
||||
<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="mt-auto text-center py-3 border-top" style="background: var(--surface-0);">
|
||||
{% set footer_mode = global_settings.typ_stopka if global_settings and global_settings.typ_stopka
|
||||
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.stopka_text if global_settings and global_settings.stopka_text else "© " ~ (now().year if now
|
||||
else '2025') ~ " linuxiarz.pl" }}
|
||||
{% endif %}
|
||||
<div class="small text-muted">v{{ APP_VERSION }}</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="{{ asset_url('js/progress.js') }}"></script>
|
||||
|
||||
{% block extra_scripts %}{% endblock %}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user