diff --git a/static/css/style.css b/static/css/style.css index 497338f..59bb9a3 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -855,3 +855,27 @@ td select.tom-dark { .sens-low { background: rgba(108,117,125,.25); color: #ced4da; } /* szary */ .sens-mid { background: rgba(13,110,253,.25); color: #9ec5fe; } /* niebieski */ .sens-high { background: rgba(220,53,69,.25); color: #f1aeb5; } /* czerwony */ + +/* Responsive buttons - hide text on narrow screens (iPhone 11, iPhone 17 Pro) */ +@media (max-width: 420px) { + .btn-group-compact .btn-text { + display: none !important; + } + + .btn-group-compact .btn { + padding: 0.375rem 0.5rem; + min-width: auto; + } +} + +/* Medium-narrow screens - smaller font */ +@media (min-width: 421px) and (max-width: 576px) { + .btn-group-compact .btn { + padding: 0.375rem 0.45rem; + font-size: 0.8rem; + } + + .btn-group-compact .btn-text { + font-size: 0.75rem; + } +} diff --git a/templates/main.html b/templates/main.html index c7a006c..e82fe87 100644 --- a/templates/main.html +++ b/templates/main.html @@ -2,17 +2,20 @@ {% block title %}Twoje listy zakupów{% endblock %} {% block content %} + {% if not current_user.is_authenticated %} {% endif %} + {% if current_user.is_authenticated %}

Stwórz nową listę

+
@@ -31,9 +34,11 @@
{% endif %} + {% set month_names = ["styczeń", "luty", "marzec", "kwiecień", "maj", "czerwiec", "lipiec", "sierpień", "wrzesień", "październik", "listopad", "grudzień"] %} +
@@ -51,6 +56,7 @@
+
+ {% if current_user.is_authenticated %}

Twoje listy @@ -85,39 +92,62 @@ {% endfor %} -
+ +
📂 Otwórz + class="btn btn-sm btn-outline-light d-flex align-items-center" + data-bs-toggle="tooltip" + title="Otwórz"> + 📂 Otwórz + ✏️ Odznaczaj + class="btn btn-sm btn-outline-light d-flex align-items-center" + data-bs-toggle="tooltip" + title="Odznaczaj"> + ✏️ Odznaczaj + 📋 Kopiuj + class="btn btn-sm btn-outline-light d-flex align-items-center" + data-bs-toggle="tooltip" + title="Kopiuj"> + 📋 Kopiuj + - {% if l.is_public %}🙈 Ukryj{% else %}🐵 Odkryj{% endif %} + class="btn btn-sm btn-outline-light d-flex align-items-center" + data-bs-toggle="tooltip" + title="{% if l.is_public %}Ukryj{% else %}Odkryj{% endif %}"> + {% if l.is_public %}🙈 Ukryj{% else %}🐵 Odkryj{% endif %} ⚙️ Ustawienia + class="btn btn-sm btn-outline-light d-flex align-items-center" + data-bs-toggle="tooltip" + title="Ustawienia"> + ⚙️ Ustawienia +
+
{# Kupione #}
+ {# Niekupione #} {% set not_purchased_count = l.not_purchased_count if l.total_count else 0 %}
+ {# Pozostałe #}
+ Produkty: {{ purchased_count }}/{{ total_count }} ({{ percent|round(0) }}%) @@ -127,6 +157,7 @@
+ {% endfor %} @@ -136,10 +167,12 @@ {% endif %} +

{% if current_user.is_authenticated %}Udostępnione i publiczne listy innych użytkowników {% else %} Publiczne listy innych użytkowników {% endif %}

+ {% set lists_to_show = accessible_lists %} {% if lists_to_show %}
+
+ {% set not_purchased_count = l.not_purchased_count if l.total_count else 0 %}
+
+ Produkty: {{ purchased_count }}/{{ total_count }} ({{ percent|round(0) }}%) {% if l.total_expense > 0 %} — 💸 {{ '%.2f'|format(l.total_expense) }} PLN{% endif %} @@ -189,6 +231,7 @@

Brak list do wyświetlenia

{% endif %} +