zmiana month na m i poprawka w kolorach paginaci
This commit is contained in:
2
app.py
2
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:
|
||||
|
@@ -333,4 +333,28 @@ input.form-control {
|
||||
|
||||
.ts-dropdown .active {
|
||||
background-color: #495057 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
@@ -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') %}
|
||||
|
||||
<!-- Pulpit: zwykły <select> -->
|
||||
<div class="d-none d-md-flex justify-content-end align-items-center flex-wrap gap-2 mb-3">
|
||||
@@ -230,7 +230,7 @@
|
||||
{% for offset in range(0, 6) %}
|
||||
{% set d = (now - timedelta(days=offset * 30)) %}
|
||||
{% set val = d.strftime('%Y-%m') %}
|
||||
<a href="{{ url_for('main_page', month=val) }}" class="btn btn-outline-light">
|
||||
<a href="{{ url_for('main_page', m=val) }}" class="btn btn-outline-light">
|
||||
{{ month_names[d.month - 1] }} {{ d.year }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
|
Reference in New Issue
Block a user