1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
|
@import "buttons";
@import "variables";
.fc {
.fc-toolbar.fc-header-toolbar {
margin-bottom: 0.5em;
/* Make sure that all the elements of the header stay inside the area of the calendar: */
display: flex;
flex-wrap: wrap;
}
/* Styles for the buttons above the calendar: */
.fc-button-group {
height: 30px;
.fc-button.fc-button-primary {
@include button;
margin-top: 0;
margin-bottom: 0;
padding: 0;
&.fc-button-active {
@extend .active;
}
/* Remove the default gray "aura" around a focused button. */
&:focus {
box-shadow: var(--brand-color-dark) 0 0 0 1px;
}
/* The last button on the right shall align with the calendar border: */
&:last-of-type {
margin-right: 0;
}
/* A button with an icon as content. */
.fc-icon {
/* Unset rules that are set in the fullcalendar default stylesheet: */
line-height: unset;
height: unset;
}
}
}
/* Styles for header columns (dates or days of the week) */
/* Column header text shall not be displayed as link: */
@mixin calendar-header-column-content {
a {
color: var(--text-color);
/* overwrite the default Stud.IP style for links: */
&:visited, &:active, &:hover {
text-decoration: none;
color: var(--text-color);
}
}
}
/* Grid view header columns: */
table.fc-col-header thead {
background-color: var(--table-header-color);
.fc-col-header-cell, .fc-timegrid-axis {
@include calendar-header-column-content;
}
}
/* Timeline view header columns: */
.fc-resource-timeline table.fc-scrollgrid-sync-table th {
background-color: var(--table-header-color);
.fc-timeline-slot-frame {
@include calendar-header-column-content;
}
}
.fc-timegrid {
/*
There shall be no lines with empty labels for the minor time divisions
like half hours in a calendar where only the full hours have labels.
*/
.fc-timegrid-slot-label.fc-timegrid-slot-minor {
border-top-style: none;
}
/* The "now indicator" shall have an orange colour: */
.fc-timegrid-now-indicator-arrow {
border-color: var(--orange);
border-top-color: transparent;
border-bottom-color: transparent;
}
.fc-timegrid-now-indicator-line {
border-color: var(--orange);
}
}
.fc-daygrid, .fc-timegrid {
/*
Disable the short day of week by default:
*/
.fc-col-header-cell {
.dow {
display: block;
}
.dow-short {
display: none;
}
}
/*
Display the week number a bit smaller so that is doesn't overlap the day number on
small screens in portrait orientation:
*/
.fc-daygrid-week-number {
font-size: $font-size-tiny;
}
}
/* Display the week number at the top of the cell in the top left corner: */
&.fc-liquid-hack div.fc-timegrid-axis-frame-liquid {
position: unset;
a.fc-timegrid-axis-cushion {
padding: 2px 4px;
}
}
/* Styles for regular calendar events: */
a.fc-event,
td.fc-event {
/* no round corners for events: */
border-radius: 0;
/* extra thick border on the left side:*/
border-left-width: 8px;
/* Hide overflowing text: */
overflow: hidden;
/* Remove the default minus character for short events: */
.fc-timegrid-event-short .fc-event-time:after {
content: "";
}
/* The time or location in an event. */
.fc-event-time, .fc-event-location {
opacity: 70%;
}
/* The content shall span over the whole height of the event,
even if it doesn't need all the space. */
.event-content {
height: 100%;
}
/* The title of an event: */
.fc-event-title {
overflow-wrap: break-word;
}
/* The icons inside an event: */
.fc-event-title-container {
.action-icons {
position: absolute;
right: 0;
button {
border: none;
background: none;
cursor: pointer;
}
}
.icons .studip-icon {
width: $font-size-base;
height: $font-size-base;
}
}
}
}
/*
* Special rules for the responsive view.
*/
html.responsive-display .fc {
.fc-toolbar.fc-header-toolbar {
flex-direction: column;
.fc-toolbar-chunk {
width: 100%;
&:not(:last-child) {
margin-bottom: $line-height-computed - $font-size-base;
}
}
}
.fc-timegrid:not(.fc-timeGridDay-view) {
/*
Use extra lines for the day of week, day and month and the year
in the week view:
*/
.fc-day {
.dow, .year {
display: block;
}
}
}
/*
Disable the long day of week for the month and the week view:
*/
.fc-daygrid, .fc-timegrid:not(.fc-timeGridDay-view) {
.fc-col-header-cell {
.dow {
display: none;
}
.dow-short {
display: block;
}
}
}
}
/*
* Special rules for calendars that display holidays:
*/
.fc.with-holidays {
.fc-timegrid {
/*
* Header cells in time grid views shall have a fixed size to avoid jumping between
* weeks with and without holidays. The latter shall also be displayed in normal font weight
* and with a smaller font. All of this shall only happen when the calendar displays holidays.
*/
.fc-col-header-cell {
height: 2.85em;
.day {
/* The year may move into the next line of text in case that there is
* not enough space for displaying the date in one line.
*/
.year {
display: inline-block;
}
/* In case the day of week is too long, it shall be broken into the next line to prevent overflow. */
.dow {
word-break: break-all;
}
/*
* Holiday names are displayed a bit smaller. The name also must not overflow.
* Instead, words shall be broken.
*/
.holiday {
font-weight: normal;
font-size: 0.75em;
word-break: break-all;
}
}
}
}
}
/* Special styles: */
/* Events that are displayed in a Fullcalendar
* that is diplayed inside a Stud.IP contentbox need to have
* a padding of 0 to prevent them from being unnecessary empty.
*/
section.contentbox .fc .fc-event-main section
{
padding: 0;
}
/* The institute plan has larger cells than normal calendars: */
div.fc.institute-plan {
.fc-timegrid-slot {
height: 100px;
}
}
/*
* The room management uses special headers that shall look like
* table captions:
*/
.studip-fullcalendar-header {
background-color: transparent;
color: var(--base-gray);
font-size: 1.4em;
text-align: left;
&.fullcalendar-dialog{
width: calc(100% - 550px);
vertical-align: middle;
display: inline-block;
margin-right: 275px;
}
}
/*
* Special rules for the colour picker in the course planning view
* (admin/coursplanning/index):
*/
#event-colour-picker {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
column-gap: 16px;
width: 200px;
height: 204px;
margin: 10px 0 10px calc(50% - 100px);
input {
opacity: 0;
position: absolute;
+ label {
cursor: pointer;
&::before {
background-repeat: no-repeat;
content: ' ';
display: inline-block;
margin: 0 1px 1px 1px;
vertical-align: text-top;
background-image: none;
background-size: 100%;
}
}
&:checked + label {
@include icon(before, checkbox-checked, $size: 90%);
&::before {
background-color: var(--color--font-inverted);
}
}
}
}
@import "fullcalendar-print";
|