From fef3e3cdd612566e80769af99c5f9317e11c2aa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Krienb=C3=BChl?= Date: Wed, 11 May 2016 15:15:16 +0200 Subject: [PATCH] Extract calendar day style from occurrences view --- onegov/town/templates/macros.pt | 23 ++++++----- onegov/town/theme/styles/town.scss | 64 ++++++++++++++++++------------ 2 files changed, 52 insertions(+), 35 deletions(-) diff --git a/onegov/town/templates/macros.pt b/onegov/town/templates/macros.pt index baba50b..d5fb263 100644 --- a/onegov/town/templates/macros.pt +++ b/onegov/town/templates/macros.pt @@ -503,23 +503,28 @@ + +

+ +

+
+ + + ${layout.format_date(date, 'weekday_long')} + ${date.day}. + ${layout.format_date(date, 'month_long')} + +
- -
-
-

- ${layout.format_date(occurrence.localized_start, 'weekday_long')} - ${occurrence.localized_start.day} - . - ${layout.format_date(occurrence.localized_start, 'month_long')} -

+
+
${layout.format_date(occurrence.localized_start, 'date')}
diff --git a/onegov/town/theme/styles/town.scss b/onegov/town/theme/styles/town.scss index 257a75b..536b777 100644 --- a/onegov/town/theme/styles/town.scss +++ b/onegov/town/theme/styles/town.scss @@ -2033,6 +2033,44 @@ button { } } +/* + A box rendering the following structure as a calendar-like box: + +

+ Wednesday + 11 + March +

+*/ +.calendar-day-box { + padding: .5em 0; + width: 100%; + + @media #{$small-up} { + font-weight: bold; + } + + @media #{$large-up} { + background-color: $white-smoke; + font-weight: normal; + + span { + display: block; + font-size: 1rem; + text-align: center; + + &.dot { + display: none; + } + + &.day { + font-size: 3rem; + font-weight: bold; + } + } + } +} + /* Events */ @@ -2066,32 +2104,6 @@ button { } } -.occurrences-day-date { - padding: .5em 0; - width: 100%; - - &.active { - background-color: $white-smoke; - } - - @media #{$large-up} { - span { - display: block; - font-size: 1rem; - text-align: center; - - &.day { - font-size: 3rem; - font-weight: bold; - } - - &.dot { - display: none; - } - } - } -} - .occurrences-filter-result { margin-bottom: 1em;