From ae31a5f64248ead5d8cc4aa20cbf52c49482bba1 Mon Sep 17 00:00:00 2001 From: Ruslan Ignatov Date: Mon, 14 Nov 2022 16:25:02 +0300 Subject: [PATCH] Added year button to events. Fixed oneday month hightlighting --- .../static/faerun_calendar/css/main.css | 20 +++++++++++++++++-- .../templates/faerun_calendar/index.html | 2 +- .../templates/faerun_calendar/month.html | 11 +++++++--- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/faerun_calendar/static/faerun_calendar/css/main.css b/faerun_calendar/static/faerun_calendar/css/main.css index 89e5b43..e1d3513 100644 --- a/faerun_calendar/static/faerun_calendar/css/main.css +++ b/faerun_calendar/static/faerun_calendar/css/main.css @@ -9,6 +9,20 @@ div.content.calendar h2 { text-align: center; } +div.content.calendar a.button.year { + margin: auto; +} + +div.content.calendar a.arrow.left { + margin-left: auto; + margin-right: 40px; +} + +div.content.calendar a.arrow.right { + margin-right: auto; + margin-left: 40px; +} + div.current-year { display: flex; justify-content: space-between; @@ -35,7 +49,8 @@ table.month td { padding: 5px 0px; } -table.month td.with_events { +table.month td.with_events, +table.month th.with_events { background: #0080c0; } @@ -56,7 +71,8 @@ table.month a.current_day { border-radius: 50%; } -table.month td.with_events a { +table.month td.with_events a, +table.month th.with_events a { color: #fefefe; } diff --git a/faerun_calendar/templates/faerun_calendar/index.html b/faerun_calendar/templates/faerun_calendar/index.html index ea83d0d..904dca8 100644 --- a/faerun_calendar/templates/faerun_calendar/index.html +++ b/faerun_calendar/templates/faerun_calendar/index.html @@ -48,7 +48,7 @@ {% endif %} -

Год {{year_data.number}}-й, {{month_data.name}}{% if not month_data.is_oneday %}, день {{day}}-й{% endif %}

+


Год {{year_data.number}}-й
{{month_data.name}}{% if not month_data.is_oneday %}, день {{day}}-й{% endif %}

{% if next_day %} diff --git a/faerun_calendar/templates/faerun_calendar/month.html b/faerun_calendar/templates/faerun_calendar/month.html index 363e34c..386c320 100644 --- a/faerun_calendar/templates/faerun_calendar/month.html +++ b/faerun_calendar/templates/faerun_calendar/month.html @@ -1,12 +1,17 @@
+ {% if not month.is_oneday %} {% if month.folkname %}
- {% if not month.is_oneday %} - {{month.name}} + {{month.name}} + {% else %} + {% if month.days.0.event_counts %} + {% else %} - {{month.name}} + {% endif %} + {{month.name}} + {% endif %}