diff --git a/public/css/components/calendar.css b/public/css/components/calendar.css index 8df453d6d..4657bbb3f 100644 --- a/public/css/components/calendar.css +++ b/public/css/components/calendar.css @@ -1,5 +1,6 @@ :root{ --fhc-calendar-pane-height: calc(100vh - 220px); + --fhc-calendar-past: #F5E9D7 } .fhc-calendar-week-page-header { @@ -188,7 +189,7 @@ .fhc-calendar-past { - background-color:#F5E9D7; + background-color: var(--fhc-calendar-past); border-color: #E8E8E8; opacity: 0.5; } diff --git a/public/js/components/Calendar/Calendar.js b/public/js/components/Calendar/Calendar.js index 0bae84583..fe987a643 100644 --- a/public/js/components/Calendar/Calendar.js +++ b/public/js/components/Calendar/Calendar.js @@ -8,7 +8,6 @@ import CalendarMinimized from './Minimized.js'; import CalendarDate from '../../composables/CalendarDate.js'; import CalendarDates from '../../composables/CalendarDates.js'; - const todayDate = new Date(new Date().setHours(0, 0, 0, 0)); const today = todayDate.getTime() diff --git a/public/js/components/Calendar/Day/Page.js b/public/js/components/Calendar/Day/Page.js index 85a9cbc84..4342dd1ce 100644 --- a/public/js/components/Calendar/Day/Page.js +++ b/public/js/components/Calendar/Day/Page.js @@ -93,6 +93,18 @@ export default { } }, computed: { + overlayStyle() { + return { + 'background-color': '#F5E9D7', + 'position': 'absolute', + 'pointer-events': 'none', + 'z-index': 2, + height: this.getDayTimePercent + '%', + width: '100%', + opacity: 0.5, + overflow: 'hidden' + } + }, pageHeaderStyle() { return { 'z-index': 4, @@ -307,7 +319,6 @@ export default { // calculate the minutes percentage of the total minutes timePercentage = ((currentMinutes - (this.hours[0] * 60)) / (this.hours.length * 60)) * 100; // calculate the relative position of the time percentage - console.log('height: ', height) position = height * (timePercentage / 100); this.hourPosition = position; @@ -365,6 +376,7 @@ export default {
{{hour}}:00
+
diff --git a/public/js/components/Calendar/Week/Page.js b/public/js/components/Calendar/Week/Page.js index e090b8ec2..10ff6c495 100644 --- a/public/js/components/Calendar/Week/Page.js +++ b/public/js/components/Calendar/Week/Page.js @@ -36,8 +36,16 @@ export default { 'input', ], computed: { + getGridStyle() { + return { + 'min-height': '100px', + // this.size is the magic number anyway which directs font-size, + // which in turn influences a lot of layout + width: '42px' + } + }, laneWidth() { - return this.width / this.days.length + return (this.width - 42) / this.days.length }, curTime() { const now = new Date(); @@ -52,6 +60,17 @@ export default { top: 0, } }, + overlayStyle() { + return { + 'background-color': '#F5E9D7', + 'position': 'absolute', + 'pointer-events': 'none', + 'z-index': 2, + height: this.getDayTimePercent + '%', + width: this.laneWidth + 'px', + opacity: 0.5 + } + }, indicatorStyle() { return { 'pointer-events': 'none', @@ -148,7 +167,7 @@ export default { 'z-index': 2, 'border-color': '#00649C!important', top: this.getDayTimePercent + '%', - width: this.laneWidth + 'px' // todo: manage the real value of 1fr somehow + width: this.laneWidth + 'px' } }, getDayTimePercent() { @@ -170,7 +189,7 @@ export default { top: this.getAbsolutePositionForHour(hour), left: 0, right: 0, - 'z-index': 0, + 'z-index': 0 } }, dayGridStyle(day) { @@ -185,9 +204,9 @@ export default { styleObj.opacity = 0.5; } else if (day.isToday) { - styleObj['backgroundImage'] = 'linear-gradient(to bottom, #F5E9D7 '+this.getDayTimePercent+'%, #FFFFFF '+this.getDayTimePercent+'%)' - styleObj['border-color'] = '#E8E8E8'; - styleObj.opacity = 0.5; + // styleObj['backgroundImage'] = 'linear-gradient(to bottom, #F5E9D7 '+this.getDayTimePercent+'%, #FFFFFF '+this.getDayTimePercent+'%)' + // styleObj['border-color'] = '#E8E8E8'; + // styleObj.opacity = 0.5; } return styleObj @@ -315,7 +334,7 @@ export default {
-
{{hour}}:00
+
{{hour}}:00
@@ -323,6 +342,7 @@ export default { {{curTime}}
+