Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
/* calendar.less */
2
 
3
// Calendar colour variables defined.
4
$calendarEventCategoryColor: #e0cbe0 !default; // Pale purple.
5
$calendarEventCourseColor: #ffd3bd !default; // Pale red.
6
$calendarEventGlobalColor: #d6f8cd !default; // Pale green.
7
$calendarEventGroupColor: #fee7ae !default; // Pale yellow.
8
$calendarEventUserColor: #dce7ec !default; // Pale blue.
9
$calendarEventOtherColor: #ced4da !default; // Pale gray.
10
 
11
// Border colours for the event colour indicators.
12
$calendarEventCategoryBorderColor:#9e619f !default; // Purple.
13
$calendarEventCourseBorderColor:#d34600 !default; // Red-orange.
14
$calendarEventGlobalBorderColor:#2b8713 !default; // Green.
15
$calendarEventGroupBorderColor:#9a6e02 !default; // Dark orange.
16
$calendarEventUserBorderColor:#4e7c91 !default; // Blue.
17
$calendarEventOtherBorderColor:#687889 !default; // Gray.
18
 
19
// Border for the event colour indicators.
20
$calendarEventCategoryBorder: 2px solid $calendarEventCategoryBorderColor !default; // Purple.
21
$calendarEventCourseBorder: 2px solid $calendarEventCourseBorderColor !default; // Red-orange.
22
$calendarEventGlobalBorder: 2px solid $calendarEventGlobalBorderColor !default; // Green.
23
$calendarEventGroupBorder: 2px solid $calendarEventGroupBorderColor !default; // Dark orange.
24
$calendarEventUserBorder: 2px solid $calendarEventUserBorderColor !default; // Blue.
25
$calendarEventOtherBorder: 2px solid $calendarEventOtherBorderColor !default; // Gray.
26
 
27
// This will be the colour of mini-calendar links, hide/show filter icons, edit/delete icon buttons.
28
$calendarEventColor: #0d5ca1 !default;
29
 
30
$calendarCurrentDateColor: $white;
31
$calendarCurrentDateBackground: $primary;
32
 
33
// Calendar event background colours defined.
34
.calendar_event_category {
35
    background-color: $calendarEventCategoryColor;
36
    .commands a {
37
        color: $calendarEventColor;
38
    }
39
}
40
.calendar_event_course {
41
    background-color: $calendarEventCourseColor;
42
    .commands a {
43
        color: $calendarEventColor;
44
    }
45
}
46
 
47
.calendar_event_site {
48
    background-color: $calendarEventGlobalColor;
49
    .commands a {
50
        color: $calendarEventColor;
51
    }
52
}
53
 
54
.calendar_event_group {
55
    background-color: $calendarEventGroupColor;
56
    .commands a {
57
        color: $calendarEventColor;
58
    }
59
}
60
 
61
.calendar_event_user {
62
    background-color: $calendarEventUserColor;
63
    .commands a {
64
        color: $calendarEventColor;
65
    }
66
}
67
 
68
.calendar_event_other {
69
    background-color: $calendarEventOtherColor;
70
    .commands a {
71
        color: $calendarEventColor;
72
    }
73
}
74
 
75
@mixin footer-links {
76
    span.footer-link:after {
77
        content: "\2022";
78
        color: $primary;
79
    }
80
 
81
    span.footer-link:last-child:after {
82
        content: none;
83
    }
84
}
85
 
86
// Calendar restyling.
87
.calendartable {
88
    width: 100%;
89
    table-layout: fixed;
90
 
91
    th,
92
    td {
93
        width: 14%;
94
        vertical-align: top;
95
        text-align: center;
96
        border: 0;
97
    }
98
}
99
 
100
.calendar-controls {
101
    .previous,
102
    .next,
103
    .current {
104
        display: block;
105
        float: left;
106
        width: 12%;
107
    }
108
 
109
    .previous {
110
        text-align: left;
111
        border: 1px solid transparent;
112
        width: 25%;
113
    }
114
 
115
    .current {
116
        text-align: center;
117
        width: 50%;
118
    }
119
 
120
    .next {
121
        text-align: right;
122
        border: 1px solid transparent;
123
        width: 25%;
124
    }
125
 
126
    .drop-target {
127
        box-sizing: border-box;
128
        border: 1px dashed $primary;
129
    }
130
}
131
 
132
.filters {
133
    table {
134
        border-collapse: separate;
135
        border-spacing: 2px;
136
        width: 100%;
137
    }
138
}
139
 
140
#region-main {
141
    .maincalendar {
142
        .calendarwrapper {
143
            td {
144
                & > div {
145
                    height: 11.5em;
146
                    overflow: hidden;
147
                }
148
            }
149
        }
150
    }
151
 
152
}
153
 
154
.maincalendar {
155
    vertical-align: top;
156
    padding: 0;
157
 
158
    .bottom {
159
        text-align: left;
160
        width: 98%;
161
        margin: 10px auto;
162
 
163
        @include footer-links;
164
    }
165
 
166
    .heightcontainer {
167
        height: 100%;
168
        position: relative;
169
    }
170
 
171
    .calendarmonth {
172
        width: 98%;
173
        margin: 10px auto;
174
 
175
        ul {
176
            margin: 0;
177
            padding: 0;
178
 
179
            li[data-event-folded="true"] {
180
                display: none;
181
            }
182
 
183
            li {
184
                list-style-type: none;
185
                line-height: 1.2em;
186
 
187
                > a {
188
                    @include text-truncate;
189
                    max-width: 100%;
190
                    display: inline-block;
191
 
192
                    &:hover {
193
                        text-decoration: $link-decoration;
194
 
195
                        .eventname {
196
                            text-decoration: $link-hover-decoration;
197
                        }
198
                    }
199
                }
200
 
201
                a[data-action="view-day-link"] {
202
                    @include text-truncate;
203
                }
204
 
205
                .icon {
206
                    margin-left: 0.25em;
207
                    margin-right: 0.25em;
208
                    vertical-align: initial;
209
                }
210
 
211
                .calendar-circle {
212
                    width: 12px;
213
                    height: 12px;
214
                    border-radius: 6px;
215
                    vertical-align: middle;
216
                    display: inline-block;
217
 
218
                    &.calendar_event_category {
219
                        background-color: $calendarEventCategoryColor;
220
                        border: $calendarEventCategoryBorder;
221
                    }
222
                    &.calendar_event_course {
223
                        background-color: $calendarEventCourseColor;
224
                        border: $calendarEventCourseBorder;
225
                    }
226
 
227
                    &.calendar_event_site {
228
                        background-color: $calendarEventGlobalColor;
229
                        border: $calendarEventGlobalBorder;
230
                    }
231
 
232
                    &.calendar_event_group {
233
                        background-color: $calendarEventGroupColor;
234
                        border: $calendarEventGroupBorder;
235
                    }
236
 
237
                    &.calendar_event_user {
238
                        background-color: $calendarEventUserColor;
239
                        border: $calendarEventUserBorder;
240
                    }
241
 
242
                    &.calendar_event_other {
243
                        background-color: $calendarEventOtherColor;
244
                        border: $calendarEventOtherBorder;
245
                    }
246
                }
247
            }
248
        }
249
 
250
        th {
251
            text-align: left;
252
            padding-left: 16px;
253
        }
254
 
255
        td {
256
 
257
            a.day:focus {
258
                display: inline-block;
259
                border-radius: 50%;
260
                box-shadow: $input-btn-focus-box-shadow;
261
            }
262
 
263
            .day-number-circle {
264
                display: inline-block;
265
                line-height: 0;
266
                width: 30px;
267
                height: 30px;
268
 
269
                .day-number {
270
                    display: inline-block;
271
                    padding: 50% 4px;
272
                    width: 100%;
273
                    text-align: center;
274
                }
275
            }
276
 
277
            &.today {
278
                .day-number-circle {
279
                    border-radius: 50%;
280
                    color: $calendarCurrentDateColor;
281
                    background-color: $calendarCurrentDateBackground;
282
                }
283
            }
284
        }
285
 
286
        .clickable:hover {
287
            background-color: $calendar-month-clickable-bg;
288
        }
289
    }
290
 
291
    .controls {
292
        width: 98%;
293
        margin: 10px auto;
294
    }
295
 
296
    .calendar_event_category,
297
    .calendar_event_course,
298
    .calendar_event_site,
299
    .calendar_event_group,
300
    .calendar_event_user {
11 efrain 301
        a:has(> .icon) {
302
            &:hover {
303
                color: darken($calendarEventColor, 15%);
304
                text-decoration: $link-decoration;
1 efrain 305
            }
306
        }
307
    }
308
 
309
    .calendar_event_category {
310
        border-color: $calendarEventCategoryColor;
311
    }
312
 
313
    .calendar_event_course {
314
        border-color: $calendarEventCourseColor;
315
    }
316
 
317
    .calendar_event_site {
318
        border-color: $calendarEventGlobalColor;
319
    }
320
 
321
    .calendar_event_group {
322
        border-color: $calendarEventGroupColor;
323
    }
324
 
325
    .calendar_event_user {
326
        border-color: $calendarEventUserColor;
327
    }
328
 
329
    .calendar_event_other {
330
        border-color: $calendarEventOtherColor;
331
    }
332
 
333
    .calendartable {
334
        td,
335
        li {
336
            padding: 4px;
337
        }
338
 
339
        li {
340
            text-align: left;
341
        }
342
    }
343
 
344
    .header {
345
        overflow: hidden;
346
 
347
        .buttons {
348
            float: right;
349
        }
350
    }
351
 
352
    .event {
353
        .card-header img {
354
            vertical-align: baseline;
355
        }
356
 
357
        .location {
358
            word-break: break-all;
359
            overflow-wrap: break-word;
360
        }
361
    }
362
 
363
    table#subscription_details_table {
364
        td {
365
            vertical-align: middle;
366
 
367
            > .btn-group button {
368
                padding-left: 0;
369
            }
370
        }
371
    }
372
}
373
 
374
// Calendar export.
375
#page-calendar-export {
376
    .indent {
377
        padding-left: 20px;
378
    }
379
}
380
 
381
// Block minicalendar.
382
.block {
383
    .bottom {
384
        width: 98%;
385
        margin: 10px auto;
386
        @include footer-links;
387
    }
388
 
389
    .minicalendar {
390
        max-width: 280px;
391
        margin: 0 auto;
392
        width: 100%;
393
 
394
        th,
395
        td {
396
            padding: 2px;
397
            font-size: 0.8em;
398
            text-align: center;
399
        }
400
 
401
        td {
402
            &.weekend {
403
                color: $text-muted;
404
            }
405
 
406
            a {
407
                width: 100%;
408
                height: 100%;
409
                display: block;
410
                color: $calendarEventColor;
411
            }
412
 
413
            &.duration_global {
414
                border-top: 1px solid $calendarEventGlobalColor;
415
                border-bottom: 1px solid $calendarEventGlobalColor;
416
 
417
                &.duration_finish {
418
                    background-color: $calendarEventGlobalColor;
419
                }
420
            }
421
 
422
            &.duration_category {
423
                border-top: 1px solid $calendarEventCategoryColor;
424
                border-bottom: 1px solid $calendarEventCategoryColor;
425
 
426
                &.duration_finish {
427
                    background-color: $calendarEventCategoryColor;
428
                }
429
            }
430
 
431
            &.duration_course {
432
                border-top: 1px solid $calendarEventCourseColor;
433
                border-bottom: 1px solid $calendarEventCourseColor;
434
 
435
                &.duration_finish {
436
                    background-color: $calendarEventCourseColor;
437
                }
438
            }
439
 
440
            &.duration_group {
441
                border-top: 1px solid $calendarEventGroupColor;
442
                border-bottom: 1px solid $calendarEventGroupColor;
443
 
444
                &.duration_finish {
445
                    background-color: $calendarEventGroupColor;
446
                }
447
            }
448
 
449
            &.duration_user {
450
                border-top: 1px solid $calendarEventUserColor;
451
                border-bottom: 1px solid $calendarEventUserColor;
452
 
453
                &.duration_finish {
454
                    background-color: $calendarEventUserColor;
455
                }
456
            }
457
 
458
            &.duration_other {
459
                border-top: 1px solid $calendarEventOtherColor;
460
                border-bottom: 1px solid $calendarEventOtherColor;
461
 
462
                &.duration_finish {
463
                    background-color: $calendarEventOtherColor;
464
                }
465
            }
466
        }
467
 
468
        caption {
469
            font-size: inherit;
470
            font-weight: inherit;
471
            line-height: inherit;
472
            text-align: center;
473
        }
474
    }
475
 
476
    .calendar_filters {
477
        ul {
478
            list-style: none;
479
            margin: 0;
480
            padding: 0;
481
        }
482
 
483
        li {
484
            margin-bottom: 0.2em;
485
 
486
            span {
487
                &.calendar_event_category {
488
                    i {
489
                        color: $calendarEventColor;
490
                    }
491
                }
492
                &.calendar_event_course {
493
                    i {
494
                        color: $calendarEventColor;
495
                    }
496
                }
497
                &.calendar_event_site {
498
                    i {
499
                        color: $calendarEventColor;
500
                    }
501
                }
502
                &.calendar_event_group {
503
                    i {
504
                        color: $calendarEventColor;
505
                    }
506
                }
507
                &.calendar_event_user {
508
                    i {
509
                        color: $calendarEventColor;
510
                    }
511
                }
512
                &.calendar_event_other {
513
                    i {
514
                        color: $calendarEventColor;
515
                    }
516
                }
517
                img {
518
                    padding: 0 0.2em;
519
                    margin: 0;
520
                }
521
            }
522
            .icon {
523
                vertical-align: initial;
524
                margin: 0 0.1rem 0 0.4rem;
525
            }
526
 
527
            > a {
528
                &:hover {
529
                    text-decoration: $link-decoration;
530
 
531
                    .eventname {
532
                        text-decoration: $link-hover-decoration;
533
                    }
534
                }
535
            }
536
        }
537
    }
538
 
539
    .content {
540
        h3 {
541
            &.eventskey {
542
                margin-top: 0.5em;
543
            }
544
        }
545
    }
546
}
547
 
548
// Side block in Course view page is different with other side blocks.
549
// We should hide the navigation text and re-arrange the Calendar links.
550
.path-course-view {
551
    .block {
552
        &.block_calendar_month {
553
            .maincalendar {
554
                div.header {
555
                    visibility: hidden;
556
                    height: 0;
557
                }
558
                .calendarwrapper {
559
                    .arrow_text {
560
                        @include sr-only;
561
                    }
562
                }
563
            }
564
 
565
            .footer {
566
                .bottom {
567
                    .footer-link {
568
                        display: block;
569
                    }
570
                    .footer-link:after {
571
                        content: none;
572
                    }
573
                }
574
            }
575
        }
576
    }
577
}
578
 
579
/* Display month name above the calendar */
580
table.calendartable caption {
581
    caption-side: top;
582
}
583
 
584
@mixin day-number-has-event {
585
    .day-number {
586
        display: inline-block;
587
        position: relative;
588
 
589
        &:before {
590
            content: '.';
591
            display: inline-block;
592
            position: absolute;
593
            bottom: 0.4em;
594
            left: 0;
595
            text-align: center;
596
            width: 100%;
597
            font-size: 3em;
598
            color: inherit;
599
        }
600
    }
601
}
602
 
603
@media (min-width: 768px) {
604
    #page-calender-view {
605
        .container-fluid {
606
            min-width: 1024px;
607
        }
608
    }
609
}
610
 
611
@media (min-width: 768px) {
612
    section:not(#region-main) {
613
        .block {
614
            &.block_calendar_month {
615
                .maincalendar {
616
                    div.header {
617
                        visibility: hidden;
618
                        height: 0;
619
                    }
620
 
621
                    .calendarwrapper {
622
                        .current {
623
                            width: 40%;
624
                            font-size: inherit;
625
                            line-height: inherit;
626
                        }
627
 
628
                        .previous,
629
                        .next {
630
                            width: 30%;
11 efrain 631
 
632
                            .arrow_text {
633
                                display: none;
634
                            }
1 efrain 635
                        }
636
                    }
637
 
638
                    .calendartable {
639
                        &.calendarmonth {
640
                            th,
641
                            td {
642
                                border: none;
643
                                text-align: center !important; // stylelint-disable-line declaration-no-important
644
                                padding: 0;
645
                            }
646
 
647
                            td {
648
                                height: auto;
649
                                font-size: 0.8em;
650
 
651
                                &.hasevent {
652
                                    [data-region="day-content"] {
653
                                        display: none;
654
                                    }
655
 
656
                                    @include day-number-has-event;
657
                                }
658
                                &:after {
659
                                    content: '';
660
                                    display: block;
661
                                    margin-top: calc(100% - 26px);
662
                                }
663
 
664
                                &.clickable:hover {
665
                                    background-color: inherit;
666
                                }
667
 
668
                                &.clickable:not(.today):hover {
669
                                    .day-number-circle {
670
                                        border-radius: 50%;
671
                                        background-color: $calendar-month-clickable-bg;
672
                                    }
673
                                }
674
                            }
675
                        }
676
                    }
677
                }
678
 
679
                .bottom {
680
                    // This adds a border on the top side of the footer container.
681
                    // So we won't have to add a <hr> element in the footer_options template.
682
                    border-top: $border-width solid $card-border-color;
683
                    padding-top: map-get($spacers, 2);
684
                }
685
            }
686
        }
687
    }
688
}
689
 
690
@media (max-width: 768px) {
691
    .maincalendar {
692
        .calendartable {
693
            &.calendarmonth {
694
                th,
695
                td {
696
                    border: none;
697
                    text-align: center !important; // stylelint-disable-line declaration-no-important
698
                    padding: 0;
699
                }
700
                td {
701
                    height: auto;
702
                    font-size: inherit;
703
                    padding: 0;
704
 
705
                    &.hasevent {
706
                        [data-region="day-content"] {
707
                            display: none;
708
                        }
709
 
710
                        @include day-number-has-event;
711
                    }
712
                    &:after {
713
                        content: '';
714
                        display: block;
715
                        margin-top: calc(100% - 26px);
716
                    }
717
 
718
                    & > div {
719
                        height: auto !important; // stylelint-disable-line declaration-no-important
720
                    }
721
                }
722
            }
723
        }
724
    }
725
}
726
 
727
.calendarwrapper {
728
    position: relative;
729
}
730
 
731
.day-popover-content {
732
    &:empty + .day-popover-alternate {
733
        display: block;
734
    }
735
}
736
 
737
.location-content {
738
    overflow-wrap: break-word;
739
}
740
 
741
.description-content {
742
    overflow-wrap: break-word;
743
    > p {
744
        margin: 0;
745
    }
746
}
747
 
748
.cal_courses_flt {
749
    color: $gray-600;
750
    max-width: 75%;
751
}