From 762dc4b0f686107a6d608027a270e7bdaee6f777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Fri, 19 Jul 2019 11:42:22 +0200 Subject: [PATCH] MOBILE-3021 calendar: Add styling to monthly view --- .../calendar/addon-calendar-calendar.html | 22 +++--- .../components/calendar/calendar.scss | 76 ++++++++++++++++++- src/addon/calendar/pages/day/day.html | 4 +- src/addon/calendar/pages/day/day.scss | 9 +++ 4 files changed, 96 insertions(+), 15 deletions(-) create mode 100644 src/addon/calendar/pages/day/day.scss diff --git a/src/addon/calendar/components/calendar/addon-calendar-calendar.html b/src/addon/calendar/components/calendar/addon-calendar-calendar.html index 1cc977fdf..679b0996e 100644 --- a/src/addon/calendar/components/calendar/addon-calendar-calendar.html +++ b/src/addon/calendar/components/calendar/addon-calendar-calendar.html @@ -7,8 +7,8 @@ - -

{{ periodName }}

+ +

{{ periodName }}

@@ -19,22 +19,22 @@ - + - +

{{ day.shortname | translate }}

- - - + + +

{{ day.mday }}

-

+

@@ -44,14 +44,14 @@ - {{ event.timestart * 1000 | coreFormatDate: timeFormat }} - {{event.name}} + {{ event.timestart * 1000 | coreFormatDate: timeFormat }} + {{event.name}}

{{ 'core.nummore' | translate:{$a: day.filteredEvents.length - 3} }}

- +
diff --git a/src/addon/calendar/components/calendar/calendar.scss b/src/addon/calendar/components/calendar/calendar.scss index b764187e4..f96cba14d 100644 --- a/src/addon/calendar/components/calendar/calendar.scss +++ b/src/addon/calendar/components/calendar/calendar.scss @@ -4,11 +4,81 @@ $calendar-event-course-color: $red !default; // Red. $calendar-event-group-color: $yellow !default; // Yellow. $calendar-event-user-color: $blue !default; // Blue. $calendar-event-site-color: $green !default; // Green. +$calendar-today-bgcolor: $core-color !default; +$calendar-today-color: $white !default; +$calendar-border-color: $gray !default; ion-app.app-root addon-calendar-calendar { - .addon-calendar-weekdays { - opacity: 0.4; + .addon-calendar-months { + background-color: white; + padding: 0; + } + + .addon-calendar-day { + border-bottom: 1px solid $calendar-border-color; + @include border-end(1px, solid, $calendar-border-color); + overflow: hidden; + min-height: 70px; + + &:first-child { + @include padding(null, null, null, 10px); + } + &:last-child { + @include border-end(0, null, null); + @include padding(null, 8px, null, null); + } + .addon-calendar-day-number { + height: 24px; + line-height: 24px; + width: max-content; + min-width: 24px; + text-align: center; + font-weight: 500; + display: inline-block; + margin: 3px; + } + &.today .addon-calendar-day-number { + background-color: $calendar-today-bgcolor; + color: $calendar-today-color; + + border-radius: 50%; + } + &.dayblank { + background-color: $gray-lighter; + } + + .addon-calendar-event { + margin-top: 0.6em; + margin-bottom: 0.6em; + overflow: hidden; + white-space: nowrap; + + .addon-calendar-event-name { + font-weight: 500; + } + } + + .addon-calendar-day-more { + @include margin(0.6em, null, 0.6em, 4px); + } + + .addon-calendar-dot-types { + @include margin(0.6em, null, 0.6em, null); + } + } + + .addon-calendar-period { + flex-grow: 3; + h3 { + margin-top: 10px; + font-size: 1.6rem; + } + } + + .addon-calendar-weekday { + color: $gray-dark; + border-bottom: 1px solid $list-md-border-color; } .addon-calendar-day-events { @@ -32,6 +102,8 @@ ion-app.app-root addon-calendar-calendar { border: 1px solid white; @include margin-horizontal(1px, 1px); + + &.calendar_event_category { background-color: $calendar-event-category-color; } diff --git a/src/addon/calendar/pages/day/day.html b/src/addon/calendar/pages/day/day.html index 134def736..e6db57d36 100644 --- a/src/addon/calendar/pages/day/day.html +++ b/src/addon/calendar/pages/day/day.html @@ -24,8 +24,8 @@
- -

{{ periodName }}

+ +

{{ periodName }}

diff --git a/src/addon/calendar/pages/day/day.scss b/src/addon/calendar/pages/day/day.scss new file mode 100644 index 000000000..4918c1312 --- /dev/null +++ b/src/addon/calendar/pages/day/day.scss @@ -0,0 +1,9 @@ +page-addon-calendar-day { + .addon-calendar-period { + flex-grow: 3; + h3 { + margin-top: 10px; + font-size: 1.6rem; + } + } +} \ No newline at end of file