diff --git a/core/__pycache__/views.cpython-311.pyc b/core/__pycache__/views.cpython-311.pyc index cabbde8..ec327bd 100644 Binary files a/core/__pycache__/views.cpython-311.pyc and b/core/__pycache__/views.cpython-311.pyc differ diff --git a/core/templates/core/calendar_embed.html b/core/templates/core/calendar_embed.html index 9ec28e3..8a0d7e4 100644 --- a/core/templates/core/calendar_embed.html +++ b/core/templates/core/calendar_embed.html @@ -3,8 +3,8 @@ {% block title %}Embeddable Calendar Widget{% endblock %} {% block content %} -
-
+
+
{% if show_embed_header %}
diff --git a/core/templates/core/includes/calendar_widget.html b/core/templates/core/includes/calendar_widget.html index 7555b3f..5cd257e 100644 --- a/core/templates/core/includes/calendar_widget.html +++ b/core/templates/core/includes/calendar_widget.html @@ -5,9 +5,9 @@

{{ month_label }}

diff --git a/core/views.py b/core/views.py index c136494..5949651 100644 --- a/core/views.py +++ b/core/views.py @@ -116,7 +116,11 @@ def _embed_base_url(request): def _show_embed_header(request): - return request.GET.get('header', '1') != '0' + return request.GET.get('header', '0') != '0' + + +def _embed_header_value(request): + return '1' if _show_embed_header(request) else '0' def _serialize_event(event): @@ -501,6 +505,7 @@ def calendar_embed(request): page_title='Embeddable calendar', embedded=True, show_embed_header=_show_embed_header(request), + embed_header_value=_embed_header_value(request), **month_context, ), ) diff --git a/static/css/custom.css b/static/css/custom.css index a41b0a1..d6000e3 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -575,10 +575,21 @@ span { margin-bottom: 0.7rem; } +.embed-section-wide { + padding: 0.3rem 0 0.85rem; +} + +.embed-container { + width: 100%; + max-width: none; + margin: 0 auto; + padding-inline: clamp(0.35rem, 1vw, 0.85rem); +} + .embed-shell-card { - padding: 1.2rem; - margin: 1.2rem auto; - max-width: 1200px; + padding: clamp(0.6rem, 1vw, 0.95rem); + margin: 0; + max-width: none; } .embed-section .calendar-card { @@ -588,6 +599,39 @@ span { padding: 0; } +.calendar-embed .calendar-toolbar { + margin-bottom: 0.7rem; +} + +.calendar-embed .calendar-weekdays, +.calendar-embed .calendar-grid { + gap: 0.5rem; +} + +.calendar-embed .calendar-day { + min-height: 96px; + padding: 0.7rem; + gap: 0.45rem; +} + +.calendar-embed .calendar-day-number { + font-size: 1.22rem; +} + +.calendar-embed .calendar-badge { + padding: 0.34rem 0.58rem; + font-size: 0.78rem; +} + +.calendar-embed .calendar-title { + font-size: clamp(1.35rem, 2vw, 1.7rem); +} + +.calendar-embed .toolbar-label { + font-size: 0.82rem; + margin-bottom: 0.2rem !important; +} + .event-card, .detail-card, .form-card, @@ -821,4 +865,18 @@ textarea, .embed-section { padding-bottom: 2.3rem; } + + .embed-container { + padding-inline: 0.4rem; + } + + .embed-shell-card { + margin-top: 0; + padding: 0.55rem; + } + + .calendar-embed .calendar-day { + min-height: 92px; + padding: 0.62rem; + } } diff --git a/staticfiles/css/custom.css b/staticfiles/css/custom.css index a41b0a1..d6000e3 100644 --- a/staticfiles/css/custom.css +++ b/staticfiles/css/custom.css @@ -575,10 +575,21 @@ span { margin-bottom: 0.7rem; } +.embed-section-wide { + padding: 0.3rem 0 0.85rem; +} + +.embed-container { + width: 100%; + max-width: none; + margin: 0 auto; + padding-inline: clamp(0.35rem, 1vw, 0.85rem); +} + .embed-shell-card { - padding: 1.2rem; - margin: 1.2rem auto; - max-width: 1200px; + padding: clamp(0.6rem, 1vw, 0.95rem); + margin: 0; + max-width: none; } .embed-section .calendar-card { @@ -588,6 +599,39 @@ span { padding: 0; } +.calendar-embed .calendar-toolbar { + margin-bottom: 0.7rem; +} + +.calendar-embed .calendar-weekdays, +.calendar-embed .calendar-grid { + gap: 0.5rem; +} + +.calendar-embed .calendar-day { + min-height: 96px; + padding: 0.7rem; + gap: 0.45rem; +} + +.calendar-embed .calendar-day-number { + font-size: 1.22rem; +} + +.calendar-embed .calendar-badge { + padding: 0.34rem 0.58rem; + font-size: 0.78rem; +} + +.calendar-embed .calendar-title { + font-size: clamp(1.35rem, 2vw, 1.7rem); +} + +.calendar-embed .toolbar-label { + font-size: 0.82rem; + margin-bottom: 0.2rem !important; +} + .event-card, .detail-card, .form-card, @@ -821,4 +865,18 @@ textarea, .embed-section { padding-bottom: 2.3rem; } + + .embed-container { + padding-inline: 0.4rem; + } + + .embed-shell-card { + margin-top: 0; + padding: 0.55rem; + } + + .calendar-embed .calendar-day { + min-height: 92px; + padding: 0.62rem; + } }