From c22a59c70cb392049aaf03ab5491d7ce18ed43ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Gruszczy=C5=84ski?= Date: Tue, 13 Jan 2026 08:13:59 +0100 Subject: [PATCH] poprawka dla malych ekranow --- static/css/style.css | 69 ++++++++++++++++++++++++++++++++++++++++++++ templates/base.html | 62 ++++++++++++++++++++++++++++++++------- 2 files changed, 120 insertions(+), 11 deletions(-) diff --git a/static/css/style.css b/static/css/style.css index 59bb9a3..ed3955f 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -879,3 +879,72 @@ td select.tom-dark { font-size: 0.75rem; } } + +/* ================================================ + RESPONSIVE NAVBAR - ukryj tekst na małych ekranach + ================================================ */ + +/* Bardzo małe ekrany (iPhone 11, iPhone 17 Pro) - tylko emoji w navbar */ +@media (max-width: 420px) { + /* Ukryj teksty w przyciskach nawigacji */ + .nav-buttons-compact .nav-btn-text { + display: none !important; + } + + /* Zmniejsz padding przycisków */ + .nav-buttons-compact .btn { + padding: 0.25rem 0.5rem; + min-width: auto; + } + + /* Zmniejsz logo - ukryj słowo "Lista" */ + .navbar-brand-compact { + font-size: 1.25rem !important; + } + + .navbar-brand-text { + display: none !important; + } + + /* Ukryj "Zalogowany:" / "Przeglądasz jako" tekst */ + .user-info-compact .user-info-label { + display: none !important; + } + + /* Zmniejsz badge użytkownika */ + .user-info-compact .badge { + font-size: 0.7rem; + padding: 0.25rem 0.5rem; + } +} + +/* Średnio-małe ekrany (421-576px) - mniejszy font */ +@media (min-width: 421px) and (max-width: 576px) { + .navbar-brand-compact { + font-size: 1.5rem !important; + } + + .nav-buttons-compact .btn { + font-size: 0.8rem; + padding: 0.25rem 0.4rem; + } + + .nav-buttons-compact .nav-btn-text { + font-size: 0.75rem; + } + + .user-info-compact { + font-size: 0.75rem; + } +} + +/* Średnie ekrany (577-768px) - lekko zmniejszone */ +@media (min-width: 577px) and (max-width: 768px) { + .navbar-brand-compact { + font-size: 1.75rem !important; + } + + .nav-buttons-compact .btn { + font-size: 0.85rem; + } +} diff --git a/templates/base.html b/templates/base.html index 98a7fb2..3ac9bf3 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,17 +1,20 @@ + {% block title %}Live Lista Zakupów{% endblock %} + {# --- Bootstrap i główny css zawsze --- #} + {# --- Style CSS ładowane tylko dla niezablokowanych --- #} {% set exclude_paths = ['/system-auth'] %} {% if (exclude_paths | select("in", request.path) | list | length == 0) @@ -23,6 +26,7 @@ rel="stylesheet"> {% endif %} + {# --- Cropper CSS tylko dla wybranych podstron --- #} {% set substrings_cropper = ['/admin/receipts', '/edit_my_list'] %} {% if substrings_cropper | select("in", request.path) | list | length > 0 %} @@ -30,6 +34,7 @@ rel="stylesheet"> {% endif %} + {# --- Tom Select CSS tylko dla wybranych podstron --- #} {% set substrings_tomselect = ['/edit_my_list', '/admin/edit_list', '/admin/edit_categories'] %} {% if substrings_tomselect | select("in", request.path) | list | length > 0 %} @@ -38,36 +43,55 @@ {% endif %} + + +
{% block content %}{% endblock %}
+
+ + {% if not is_blocked %} + {% if request.endpoint != 'system_auth' %} @@ -121,20 +156,25 @@ }); + {% set substrings = ['/admin/receipts', '/edit_my_list'] %} {% if substrings | select("in", request.path) | list | length > 0 %} {% endif %} + {% set substrings = ['/edit_my_list', '/admin/edit_list', '/admin/edit_categories'] %} {% if substrings | select("in", request.path) | list | length > 0 %} {% endif %} + {% endif %} + {% block scripts %}{% endblock %} - \ No newline at end of file + +