logo w navbarze lub tekst

This commit is contained in:
Mateusz Gruszczyński
2025-08-28 11:28:22 +02:00
parent 2186c81264
commit b7ab11d124
4 changed files with 119 additions and 38 deletions

View File

@@ -13,11 +13,16 @@
<body class="d-flex flex-column min-vh-100">
<nav class="navbar navbar-expand-lg">
<div class="container">
<a class="navbar-brand" href="{{ url_for('index') }}">
{% if global_settings and global_settings.show_logo_in_navbar and global_settings.logo_url %}
<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 %}
{{ global_settings.site_title if global_settings and global_settings.site_title else "Zbiórki" }}
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#mainNavbar"
@@ -66,11 +71,14 @@
</div>
<!-- stopka -->
<footer class="mt-auto text-center py-3 border-top" style="background: var(--surface-0);">
{% if global_settings and global_settings.logo_url %}
<img src="{{ global_settings.logo_url }}" alt="Logo" style="max-height:60px; opacity:0.85;">
<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 %}
<small class="text-muted">© linuxiarz.pl</small>
{{ global_settings.footer_text if global_settings and global_settings.footer_text else "© " ~ (now().year if now
else '2025') ~ " linuxiarz.pl" }}
{% endif %}
</footer>