From 5043a54bbba77166476750f0d75f66fe59c28a9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Gruszczy=C5=84ski?= Date: Wed, 13 Aug 2025 14:16:42 +0200 Subject: [PATCH] zmiana month na m i poprawka w kolorach paginaci --- app.py | 2 +- static/css/style.css | 26 +++++++++++++++++++++++++- templates/main.html | 4 ++-- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/app.py b/app.py index 92408e0..a033213 100644 --- a/app.py +++ b/app.py @@ -1248,7 +1248,7 @@ def favicon(): @app.route("/") def main_page(): now = datetime.now(timezone.utc) - month_str = request.args.get("month") or now.strftime("%Y-%m") + month_str = request.args.get("m") or now.strftime("%Y-%m") start = end = None if month_str: diff --git a/static/css/style.css b/static/css/style.css index 8a2f76c..07435ab 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -333,4 +333,28 @@ input.form-control { .ts-dropdown .active { background-color: #495057 !important; -} \ No newline at end of file +} + +.pagination-dark .page-link { + color: #fff; + background-color: #212529; + border: 1px solid #495057; +} + +.pagination-dark .page-link:hover { + background-color: #343a40; + border-color: #6c757d; + color: #fff; +} + +.pagination-dark .page-item.active .page-link { + background-color: #0d6efd; /* primary */ + border-color: #0d6efd; + color: #fff; +} + +.pagination-dark .page-item.disabled .page-link { + background-color: #2b3035; + border-color: #495057; + color: #6c757d; +} diff --git a/templates/main.html b/templates/main.html index 1f7fed3..02ddfb1 100644 --- a/templates/main.html +++ b/templates/main.html @@ -33,7 +33,7 @@ {% set month_names = ["styczeń", "luty", "marzec", "kwiecień", "maj", "czerwiec", "lipiec", "sierpień", "wrzesień", "październik", "listopad", "grudzień"] %} -{% set selected_month = request.args.get('month') or now.strftime('%Y-%m') %} +{% set selected_month = request.args.get('m') or now.strftime('%Y-%m') %}
@@ -230,7 +230,7 @@ {% for offset in range(0, 6) %} {% set d = (now - timedelta(days=offset * 30)) %} {% set val = d.strftime('%Y-%m') %} - + {{ month_names[d.month - 1] }} {{ d.year }} {% endfor %}