diff --git a/public/css/components/calendar.css b/public/css/components/calendar.css index b3559df23..d7053d5e2 100644 --- a/public/css/components/calendar.css +++ b/public/css/components/calendar.css @@ -1,3 +1,7 @@ +:root{ + --fhc-calendar-pane-height: calc(100vh - 220px); +} + .fhc-calendar-week-page-header { background-color: #e9ecef; } diff --git a/public/js/apps/Cis/Stundenplan.js b/public/js/apps/Cis/Stundenplan.js index c2cfe87db..ca464a4be 100644 --- a/public/js/apps/Cis/Stundenplan.js +++ b/public/js/apps/Cis/Stundenplan.js @@ -36,12 +36,20 @@ const app = Vue.createApp({ }, methods:{ + setWindowWidth: function () { + this.windowWidth = window.innerWidth; + }, getLvID: function () { this.lv_id = window.location.pathname }, selectDay: function(day){ this.currentDay = day; }, + showDayModal: function (event) { + // only show the modal if the window width is smaller than 1200px + if(this.windowWidth >= 1200) return; + this.showModal(event); + }, showModal: function(event){ this.currentlySelectedEvent = event; Vue.nextTick(() => { @@ -108,6 +116,13 @@ const app = Vue.createApp({ this.loadEvents(); this.getLvID() }, + mounted(){ + this.windowWidth = window.innerWidth; + window.addEventListener('resize', this.setWindowWidth); + }, + beforeUnmount(){ + window.removeEventListener('resize', this.setWindowWidth); + }, //TODO: Stundenplan phrase template:/*html*/`

Stundenplan

@@ -122,7 +137,7 @@ const app = Vue.createApp({