Proyectos de Subversion Moodle

Rev

Ir a la última revisión | | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
/* course.less */
2
 
3
/* COURSE CONTENT */
4
 
5
.block_tree .tree_item.branch {
6
    margin-left: 8px;
7
}
8
 
9
.section {
10
    .side {
11
        &.left {
12
            float: left;
13
        }
14
 
15
        &.right {
16
            float: right;
17
            clear: right;
18
        }
19
        margin-top: 0.5rem;
20
    }
21
 
22
    .spinner {
23
        height: 16px;
24
        width: 16px;
25
    }
26
 
27
    .activity {
28
        .spinner {
29
            left: 100%;
30
            position: absolute;
31
        }
32
 
33
        /* The command block for each activity */
34
        .actions {
35
            position: absolute;
36
            right: 0;
37
            top: 0;
38
            display: flex;
39
        }
40
 
41
        .contentwithoutlink,
42
        .activityinstance {
43
            min-width: 40%;
44
 
45
            > a {
46
                display: inline-flex;
47
                align-items: center;
48
            }
49
 
50
            .dimmed {
51
                .activityicon {
52
                    opacity: .5;
53
                }
54
            }
55
        }
56
 
57
        .stealth {
58
            color: $text-muted;
59
        }
60
        a.stealth,
61
        a.stealth:hover {
62
            color: lighten($link-color, 25%) !important; /* stylelint-disable-line declaration-no-important */
63
        }
64
 
65
        &.indented {
66
            .activity-item {
67
                margin-left: map-get($spacers, 3);
68
            }
69
        }
70
    }
71
 
72
    .label {
73
        .contentwithoutlink,
74
        .activityinstance {
75
            padding-right: 32px;
76
            display: block;
77
            height: inherit;
78
        }
79
        @include media-breakpoint-up(sm) {
80
            .mod-indent-outer {
81
                padding-left: 24px;
82
                display: block;
83
            }
84
        }
85
    }
86
 
87
    .filler {
88
        // This must be sized like an icon to fill the space.
89
        width: 16px;
90
        height: 16px;
91
        padding: 0;
92
        margin: 0 ($spacer * 0.5);
93
        display: inline-block;
94
    }
95
 
96
    .activity.editor_displayed {
97
        a.editing_title,
98
        .moodle-actionmenu {
99
            display: none;
100
        }
101
 
102
        div.activityinstance {
103
            padding-right: initial;
104
 
105
            input {
106
                margin-bottom: initial;
107
                padding-top: initial;
108
                padding-bottom: initial;
109
                vertical-align: text-bottom;
110
            }
111
        }
112
    }
113
}
114
 
115
.section .activity .activityinstance {
116
    display: inline-flex;
117
    align-items: center;
118
    margin-bottom: 1rem;
119
}
120
 
121
.editing {
122
    .section {
123
        .activity {
124
            .contentwithoutlink,
125
            .activityinstance {
126
                padding-right: 200px;
127
            }
128
            .mod-indent-outer {
129
                /**
130
                 * Add appropriate padding such that nothing overlaps the
131
                 * absolute positioned move icon.
132
                 */
133
                padding-left: 2rem;
134
            }
135
        }
136
    }
137
    // Remove old spinners if the reactive state is ready.
138
    .course-content .stateready .section .spinner {
139
        display: none;
140
    }
141
    // New editing in progress spinners.
142
    .editinprogress {
143
        position: relative;
144
 
145
        & > * {
146
            opacity: .4;
147
        }
148
 
149
        .corelightbox,
150
        .lightbox {
151
            display: none;
152
        }
153
 
154
        &:after {
155
            @extend .fa-solid;
156
            position: absolute;
157
            font-size: 20px;
158
            color: $gray-600;
159
            content: fa-content($fa-var-spinner);
160
            display: flex;
161
            justify-content: center;
162
            align-items: center;
163
            width: 30px;
164
            height: 30px;
165
            left: calc(50% - 15px);
166
            top: calc(50% - 15px);
167
            animation: editinprogress-rotation 2s infinite linear;
168
        }
169
 
170
        // Prevent inner editingprogress.
171
        .editinprogress {
172
            &:after {
173
                display: none;
174
            }
175
        }
176
    }
177
}
178
 
179
@keyframes editinprogress-rotation {
180
    0% {
181
        opacity: 0;
182
        transform: rotate(0deg);
183
    }
184
    50% {
185
        opacity: 1;
186
    }
187
    100% {
188
        opacity: 0;
189
        transform: rotate(359deg);
190
    }
191
}
192
 
193
.editing_show + .editing_assign,
194
.editing_hide + .editing_assign {
195
    // if roles icon missing, add space
196
    margin-left: 20px;
197
}
198
 
199
.section .activity .commands {
200
    white-space: nowrap;
201
    display: inline-block;
202
}
203
 
204
.section .activity.modtype_label.label {
205
    font-weight: normal;
206
 
207
    // Remove min-height for labels so top and bottom paddings can be displayed more consistently.
208
    .contentwithoutlink {
209
        min-height: 0;
210
    }
211
 
212
    // When activity information is shown remove the bottom margin for the last p/i elements.
213
    &.hasinfo {
214
        p:last-child,
215
        i:last-child {
216
            margin-bottom: 0;
217
        }
218
    }
219
}
220
 
221
// The activity-wrapper class ensures these styles are not used when the new activity styles
222
// from MDL-71691 are not affected. As soons as MDL-72656 is integrated and these styles
223
// are removed the core_courseformat/local/content/cm template no longer needs this class.
224
.section li.activity:not(.activity-wrapper) {
225
    padding: 0.2em;
226
    clear: both;
227
 
228
    &.hasinfo {
229
        border-bottom: $border-width solid $table-border-color;
230
        padding-top: map-get($spacers, 3);
231
        padding-bottom: map-get($spacers, 3);
232
 
233
        &:last-child {
234
            border-bottom: 0;
235
            padding-bottom: 0;
236
        }
237
    }
238
}
239
 
240
// Compensate for the border widths when dropzones are displayed.
241
.course-content .section.dropready {
242
 
243
    &.main.drop-down {
244
        border-bottom: 1px solid $dropzone-border;
245
    }
246
 
247
    .course-section-header.dropready.drop-zone {
248
        margin-top: -2px;
249
    }
250
 
251
    li.activity.dropready.drop-down {
252
        border-bottom: 1px solid $dropzone-border;
253
        margin-bottom: -1px;
254
    }
255
 
256
    li.activity.dropready.drop-up {
257
        border-top: 1px solid $dropzone-border;
258
        margin-top: -1px;
259
    }
260
}
261
 
262
.section .activity .activityinstance .groupinglabel {
263
    padding-left: 30px;
264
}
265
 
266
.section.main:not(.course-section) .activity .availabilityinfo,
267
.section.main:not(.course-section) .activity .contentafterlink {
268
    margin-top: 0.5em;
269
    margin-left: 30px;
270
}
271
 
272
.section .activity .contentafterlink p {
273
    margin: .5em 0;
274
}
275
 
276
.editing .section.main:not(.course-section) {
277
    .activity:hover,
278
    .activity.action-menu-shown,
279
    .sectionname:hover {
280
        background-color: $table-accent-bg;
281
    }
282
}
283
 
284
.course-content .current {
285
    position: relative;
286
}
287
 
288
.course-content .current::before {
289
    border-left: $primary 3px solid;
290
    bottom: 0;
291
    content: "";
292
    left: -8px;
293
    position: absolute;
294
    top: 0;
295
}
296
 
297
.course-content .single-section .section-navigation {
298
    display: block;
299
    padding: 0.5em;
300
    margin-bottom: -0.5em;
301
}
302
 
303
.course-content .single-section .section-navigation .title {
304
    font-weight: bold;
305
    font-size: 108%;
306
    clear: both;
307
}
308
 
309
.course-content .single-section .section-navigation .mdl-left {
310
    font-weight: normal;
311
    float: left;
312
    margin-right: 1em;
313
}
314
 
315
.course-content .single-section .section-navigation .mdl-left .larrow {
316
    margin-right: 0.1em;
317
}
318
 
319
.course-content .single-section .section-navigation .mdl-right {
320
    font-weight: normal;
321
    float: right;
322
    margin-left: 1em;
323
}
324
 
325
.course-content .single-section .section-navigation .mdl-right .rarrow {
326
    margin-left: 0.1em;
327
}
328
 
329
.course-content .single-section .section-navigation .mdl-bottom {
330
    margin-top: 0;
331
}
332
 
333
.course-content ul li.section.main:not(.course-section) {
334
    border-bottom: $border-width solid $table-border-color;
335
    margin-top: 0;
336
 
337
    &:last-child {
338
        border-bottom: 0;
339
    }
340
}
341
 
342
.course-content ul li.section.hidden:not(.course-section) {
343
    .sectionname > span,
344
    .content > div.summary,
345
    .activity .activityinstance {
346
        color: $text-muted;
347
    }
348
}
349
 
350
.course-content ul.topics,
351
.course-content ul.weeks {
352
    padding: 0;
353
    margin: 0;
354
    list-style: none;
355
 
356
    li.section {
357
        .content {
358
            margin: 0;
359
            padding: 0;
360
        }
361
 
362
        @include media-breakpoint-up(sm) {
363
            .summary,
364
            .content > .availabilityinfo {
365
                margin-left: 25px;
366
            }
367
        }
368
 
369
        .left,
370
        .right {
371
            padding: 0 6px 0;
372
            text-align: right;
373
            width: auto;
374
        }
375
    }
376
}
377
 
378
.course-content .single-section ul.topics li.section,
379
.course-content .single-section ul.weeks li.section {
380
    padding-top: 0;
381
}
382
 
383
@include media-breakpoint-down(sm) {
384
    body:not(.editing) {
385
        .course-content ul.topics,
386
        .course-content ul.weeks {
387
            li.section {
388
                .left,
389
                .right {
390
                    display: none;
391
                }
392
            }
393
        }
394
    }
395
}
396
 
397
.course-content {
398
    margin-top: 0;
399
}
400
 
401
.course-content .hidden {
402
    display: none;
403
}
404
 
405
.course-content li {
406
    &.section:not(.course-section) {
407
        @include media-breakpoint-down(sm) {
408
            ul {
409
                padding-left: 0;
410
            }
411
        }
412
        ul {
413
            list-style: disc;
414
 
415
            ul {
416
                list-style: circle;
417
 
418
                ul {
419
                    list-style: square;
420
                }
421
            }
422
        }
423
 
424
        li {
425
            &.activity {
426
                ul {
427
                    list-style: disc;
428
 
429
                    ul {
430
                        list-style: circle;
431
 
432
                        ul {
433
                            list-style: square;
434
                        }
435
                    }
436
                }
437
            }
438
        }
439
 
440
        .right {
441
            > .icon:first-child {
442
                /* Remove the spacer icon. */
443
                display: none;
444
            }
445
        }
446
    }
447
}
448
 
449
.path-course-view.editing #region-main > .card-block {
450
    padding-bottom: 13rem;
451
}
452
 
453
.path-course-view .completionprogress {
454
    margin-left: 25px;
455
}
456
 
457
.path-course-view .completionprogress {
458
    display: block;
459
    float: right;
460
    height: 20px;
461
    position: relative;
462
}
463
 
464
#page-site-index .subscribelink {
465
    text-align: right;
466
}
467
 
468
#site-news-forum h2,
469
#frontpage-course-list h2,
470
#frontpage-category-names h2,
471
#frontpage-category-combo h2 {
472
    margin-bottom: 9px;
473
}
474
 
475
.path-course-view a.reduce-sections {
476
    padding-left: 0.2em;
477
}
478
 
479
.path-course-view .subscribelink {
480
    text-align: right;
481
}
482
 
483
.path-course-view .unread {
484
    margin-left: 30px;
485
}
486
 
487
.path-course-view .block.drag .header {
488
    cursor: move;
489
}
490
 
491
.path-course-view .completionprogress {
492
    text-align: right;
493
}
494
 
495
.path-course-view .single-section .completionprogress {
496
    margin-right: 5px;
497
}
498
 
499
.path-course-view li.activity span.autocompletion img {
500
    vertical-align: text-bottom;
501
    margin-left: 0;
502
}
503
 
504
.path-course-view {
505
    &.editing {
506
        li.activity span.autocompletion img {
507
            /* Use the same spacing as the filler. */
508
            margin-right: $spacer * 0.5;
509
            margin-left: $spacer * 0.5;
510
        }
511
    }
512
}
513
 
514
li.section.hidden span.commands a.editing_hide,
515
li.section.hidden span.commands a.editing_show {
516
    cursor: default;
517
}
518
 
519
.single-section-page .header-action {
520
    display: inline-block;
521
}
522
 
523
input.titleeditor {
524
    width: 330px;
525
    vertical-align: text-bottom;
526
}
527
 
528
span.editinstructions {
529
    position: absolute;
530
    top: 0;
531
    margin-top: -22px;
532
    margin-left: 30px;
533
    font-size: $font-size-sm;
534
    padding: .1em .4em;
535
    text-decoration: none;
536
    z-index: 9999;
537
    border: $alert-border-width solid transparent;
538
 
539
    @include alert-variant(
540
        theme-color-level('info', $alert-bg-level),
541
        theme-color-level('info', $alert-border-level),
542
        theme-color-level('info', $alert-color-level)
543
    );
544
}
545
 
546
/* COURSES LISTINGS AND COURSE SUMMARY */
547
#page-course-pending .singlebutton,
548
#page-course-index .singlebutton,
549
#page-course-index-category .singlebutton,
550
#page-course-editsection .singlebutton {
551
    text-align: center;
552
}
553
 
554
#page-admin-course-manage #movecourses td img {
555
    margin: 0 .22em;
556
    vertical-align: text-bottom;
557
}
558
 
559
#page-course-pending .pendingcourserequests {
560
    margin-bottom: 1em;
561
}
562
 
563
#page-course-pending .pendingcourserequests .singlebutton {
564
    display: inline;
565
}
566
 
567
#page-course-pending .pendingcourserequests .cell {
568
    padding: 0 5px;
569
}
570
 
571
#page-course-pending .pendingcourserequests .cell.c6 {
572
    white-space: nowrap;
573
}
574
 
575
.coursebox {
576
    display: flex;
577
    flex-direction: column;
578
    .info {
579
        display: flex;
580
        align-items: center;
581
    }
582
}
583
 
584
#frontpage-available-course-list,
585
#frontpage-course-list,
586
.course-search-result {
587
    margin-top: $spacer * 0.5;
588
    .coursebox {
589
        padding: $spacer * 0.5;
590
        border: $border-width solid $border-color;
591
        margin-bottom: $spacer * 0.5;
592
 
593
        @include border-radius();
594
    }
595
}
596
 
597
.subcategories,
598
#frontpage-category-names,
599
#frontpage-category-combo {
600
    .coursebox > .info > .coursename a {
601
        display: block;
602
        background-image: url([[pix:moodle|i/course]]);
603
        background-repeat: no-repeat;
604
        padding-left: 21px;
605
        background-position: left 0.2em;
606
    }
607
}
608
 
609
.coursebox > .info > .coursename {
610
    font-size: $font-size-base;
611
    font-weight: normal;
612
    margin: 5px;
613
    padding: 0;
614
}
615
 
616
.coursebox .content .teachers li {
617
    list-style-type: none;
618
    padding: 0;
619
    margin: 0;
620
}
621
 
622
.coursebox .customfieldname,
623
.coursebox .customfieldseparator {
624
    font-weight: $font-weight-bold;
625
}
626
 
627
.coursebox .content .coursefile {
628
    max-width: 100px;
629
}
630
 
631
.coursebox .content .courseimage img {
632
    max-width: 100px;
633
    max-height: 100px;
634
}
635
 
636
.coursebox .content .coursecat,
637
.coursebox .content .summary,
638
.coursebox .content .courseimage,
639
.coursebox .content .coursefile,
640
.coursebox .content .teachers,
641
.coursebox.remotecoursebox .remotecourseinfo,
642
.coursebox .content .customfields-container {
643
    margin: 15px 5px 5px;
644
    padding: 0;
645
}
646
 
647
.category-browse {
648
    .coursebox .content .coursecat,
649
    .coursebox .content .summary,
650
    .coursebox .content .courseimage,
651
    .coursebox .content .coursefile,
652
    .coursebox .content .teachers,
653
    .coursebox.remotecoursebox .remotecourseinfo,
654
    .coursebox .content .customfields-container {
655
        margin-top: 0;
656
    }
657
}
658
 
659
.coursebox.collapsed > .content {
660
    display: none;
661
}
662
 
663
.courses > .paging.paging-morelink {
664
    text-align: center;
665
    padding: $spacer;
666
}
667
 
668
.course_category_tree .category .numberofcourse {
669
    font-size: $font-size-sm;
670
}
671
 
672
.course_category_tree .category > .info > .categoryname {
673
    margin: 5px;
674
    font-size: $font-size-base;
675
    font-weight: normal;
676
    padding: 2px 18px;
677
}
678
 
679
.course_category_tree .category.with_children > .info > .categoryname {
680
    background-image: url([[pix:moodle|t/expanded]]);
681
    background-repeat: no-repeat;
682
    background-position: center left;
683
}
684
 
685
.course_category_tree .category.with_children.collapsed > .info > .categoryname {
686
    background-image: url([[pix:moodle|t/collapsed]]);
687
}
688
/* rtl:raw:
689
.course_category_tree .category.with_children.collapsed > .info > .categoryname {
690
    background-image:url([[pix:moodle|t/collapsed_rtl]]);
691
}
692
*/
693
.course_category_tree .category.collapsed > .content {
694
    display: none;
695
}
696
 
697
.course_category_tree .category > .content {
698
    padding-left: 16px;
699
}
700
 
701
#page-course-index-category .categorypicker {
702
    margin: 10px 0 20px;
703
}
704
 
705
/**
706
 * Course management page
707
 * Palette
708
 *
709
 * Background (reg)         #F5F5F5
710
 * Background (light        #fafafa
711
 * Background (highlight)   #ddffaa
712
 * Borders                  #e1e1e8
713
 */
714
#course-category-listings {
715
    margin-bottom: 0;
716
 
717
    /** Two column layout */
718
    &.columns-2 {
719
        > #course-listing > div {
720
            position: relative;
721
            left: -1px;
722
        }
723
    }
724
    /** Three column layout */
725
    &.columns-3 > #course-listing > div {
726
        height: 100%;
727
    }
728
 
729
    > div > div {
730
        min-height: 300px;
731
 
732
        > ul.ml > li:first-child > div {
733
            border-top: 0;
734
        }
735
    }
736
 
737
    h3 {
738
        margin: 0;
739
        padding: 0.4rem 0.6rem 0.3rem;
740
    }
741
 
742
    h4 {
743
        margin: 1rem 0 0;
744
        padding: 0.6rem 1rem 0.5rem;
745
    }
746
 
747
    .moodle-actionmenu {
748
        white-space: nowrap;
749
    }
750
 
751
    .listing-actions {
752
        text-align: center;
753
 
754
        > .moodle-actionmenu {
755
            display: inline-block;
756
        }
757
    }
758
 
759
    ul.ml {
760
        list-style: none;
761
        margin: 1rem 0;
762
 
763
        ul.ml {
764
            margin: 0;
765
        }
766
    }
767
 
768
    .listitem {
769
 
770
        &[data-selected='1'] {
771
            border-left: calc(#{$list-group-border-width} + 5px) solid map-get($theme-colors, 'primary');
772
            padding-left: calc(#{$list-group-item-padding-x} - 5px);
773
        }
774
        &:hover {
775
            z-index: 2;
776
        }
777
    }
778
 
779
    .item-actions {
780
        margin-right: 1em;
781
        display: inline-block;
782
 
783
        &.show .menu {
784
 
785
            img {
786
                width: 12px;
787
                max-width: none;
788
            }
789
        }
790
 
791
        .menu-action-text {
792
            vertical-align: inherit;
793
        }
794
    }
795
 
796
    .listitem {
797
        > div {
798
            > .float-left {
799
                float: left;
800
            }
801
 
802
            > .float-right {
803
                float: right;
804
                text-align: right;
805
            }
806
 
807
            .item-actions {
808
                .action-show {
809
                    display: none;
810
                }
811
 
812
                .action-hide {
813
                    display: inline;
814
                }
815
            }
816
 
817
            .without-actions {
818
                color: $course-cat-without-actions-color;
819
            }
820
 
821
            .idnumber {
822
                margin-right: 2em;
823
            }
824
        }
825
        // The category or course is hidden.
826
        &[data-visible="0"] {
827
            color: $text-muted;
828
 
829
            > div {
830
                > a {
831
                    color: $text-muted;
832
                }
833
 
834
                .item-actions {
835
                    .action-show {
836
                        display: inline;
837
                    }
838
 
839
                    .action-hide {
840
                        display: none;
841
                    }
842
                }
843
            }
844
        }
845
 
846
        &.highlight {
847
            background-color: $body-bg;
848
 
849
            > div,
850
            > div:hover,
851
            &[data-selected='1'] > div {
852
                background-color: $table-hover-bg;
853
            }
854
        }
855
    }
856
 
857
    #course-listing {
858
        .listitem {
859
            .categoryname {
860
                display: inline-block;
861
                margin-left: 1em;
862
                color: $course-listing-color;
863
            }
864
 
865
            .coursename {
866
                display: inline-block;
867
                flex-basis: 10rem;
868
            }
869
        }
870
 
871
        > .firstpage .listitem:first-child > div .item-actions .action-moveup,
872
        > .lastpage .listitem:last-child > div .item-actions .action-movedown {
873
            display: none;
874
        }
875
 
876
        .bulk-action-checkbox {
877
            margin: -2px 6px 0 0;
878
        }
879
    }
880
 
881
    #category-listing {
882
        .listitem.collapsed > ul.ml {
883
            display: none;
884
        }
885
 
886
        .listitem {
887
            &:first-child > div .item-actions .action-moveup,
888
            &:last-child > div .item-actions .action-movedown {
889
                display: none;
890
            }
891
        }
892
 
893
        .course-count {
894
            color: $course-listing-color;
895
            margin-right: 2rem;
896
            min-width: 3.5em;
897
            display: inline-block;
898
        }
899
 
900
        .bulk-action-checkbox {
901
            margin-right: -3px;
902
        }
903
 
904
        .category-listing > ul > .listitem:first-child {
905
            position: relative;
906
        }
907
 
908
        .category-bulk-actions {
909
            margin: 0 0.5em 0.5em;
910
            position: relative;
911
        }
912
    }
913
 
914
    .detail-pair {
915
 
916
        > * {
917
            display: inline-block;
918
        }
919
 
920
        .pair-key {
921
            font-weight: bold;
922
            vertical-align: top;
923
 
924
            span {
925
                margin-right: 1rem;
926
                display: block;
927
            }
928
        }
929
 
930
        .pair-value select {
931
            max-width: 100%;
932
        }
933
    }
934
 
935
    .bulk-actions .detail-pair {
936
        > * {
937
            display: block;
938
            width: 100%;
939
        }
940
    }
941
 
942
    .listing-pagination {
943
        text-align: center;
944
 
945
        .yui3-button {
946
            @include button-variant($info, $info);
947
            border: 0;
948
            margin: 0.4rem 0.2rem 0.45rem;
949
            font-size: 10.4px;
950
 
951
            &.active-page {
952
                @include button-variant($primary, $primary);
953
            }
954
        }
955
    }
956
 
957
    .listing-pagination-totals {
958
        text-align: center;
959
 
960
        &.dimmed {
961
            color: $text-muted;
962
            margin: 0.4rem 1rem 0.45rem;
963
        }
964
    }
965
 
966
    .select-a-category .notifymessage,
967
    .select-a-category .alert {
968
        margin: 1em;
969
    }
970
}
971
 
972
#course-category-listings #course-listing .listitem .drag-handle {
973
    display: none;
974
}
975
 
976
.jsenabled #course-category-listings #course-listing .listitem .drag-handle {
977
    display: inline-block;
978
    margin: 0 6px 0 0;
979
    cursor: pointer;
980
}
981
 
982
/** Management header styling **/
983
.course-being-dragged-proxy {
984
    border: 0;
985
    color: $link-color;
986
    vertical-align: middle;
987
    padding: 0 0 0 4em;
988
}
989
 
990
.course-being-dragged {
991
    opacity: 0.5;
992
}
993
 
994
/**
995
 * Display sizes:
996
 * Large displays                   1200        +
997
 * Default displays                  980     1199
998
 * Tablets                           768      979
999
 * Small tablets and large phones    481      767
1000
 * Phones                              0      480
1001
 */
1002
 
1003
@media (min-width: 1200px) and (max-width: 1600px) {
1004
    #course-category-listings.columns-3 {
1005
        background-color: $body-bg;
1006
        border: 0;
1007
 
1008
        #category-listing,
1009
        #course-listing {
1010
            width: 50%;
1011
        }
1012
 
1013
        #category-listing > div,
1014
        #course-listing > div,
1015
        #course-detail > div {
1016
            background-color: $body-bg;
1017
        }
1018
 
1019
        #course-detail {
1020
            width: 100%;
1021
            margin-top: 1em;
1022
        }
1023
    }
1024
}
1025
 
1026
@media (max-width: 1199px) {
1027
    #course-category-listings.columns-2,
1028
    #course-category-listings.columns-3 {
1029
        border: 0;
1030
 
1031
        #category-listing,
1032
        #course-listing,
1033
        #course-detail {
1034
            width: 100%;
1035
            margin: 0 0 1em;
1036
        }
1037
    }
1038
}
1039
 
1040
.page-settings-menu .menubar > a > .icon {
1041
    width: auto;
1042
    height: 32px;
1043
    font-size: 32px;
1044
}
1045
 
1046
.activity-navigation {
1047
    .row {
1048
        align-items: center;
1049
    }
1050
    #prev-activity-link,
1051
    #next-activity-link {
1052
        white-space: pre-wrap;
1053
    }
1054
}
1055
 
1056
.automatic-completion-conditions {
1057
    .badge {
1058
        font-size: 100%;
1059
    }
1060
}
1061
 
1062
// These are the new styles for the renewed course UI in isssue MDL-71691
1063
// once the old course renderers are removed in MDL-72656, all css related
1064
// to activities and sections above this commend needs to be reviewed an
1065
// possibly removed.
1066
 
1067
/* Variables definition*/
1068
 
1069
$activity-border-radius: 1rem !default;
1070
$activity-border-width: 2px !default;
1071
$activity-hover-border-color: $primary !default;
1072
$divider-color: $gray-300 !default;
1073
$divider-width: 2px !default;
1074
$divider-hover-color: $primary !default;
1075
 
1076
/* Functions/Mixins definition */
1077
 
1078
// Activity completion button custom styling mixin.
1079
@mixin completion-button() {
1080
    &.btn {
1081
        @include button-variant($white, $gray-400, $gray-600);
1082
        min-height: map-get($iconsizes, 5);
1083
        font-weight: bold;
1084
        @include border-radius();
1085
        .icon {
1086
            font-size: inherit;
1087
        }
1088
    }
1089
    @each $color, $value in $theme-colors {
1090
        &.btn-#{$color} {
1091
            $bg-color: theme-color-level($color, $alert-bg-level);
1092
            @include button-variant($bg-color, $bg-color, $value);
1093
            color: theme-color-level($color, $alert-color-level);
1094
            &:hover {
1095
                color: color-yiq($value);
1096
            }
1097
        }
1098
    }
1099
}
1100
 
1101
/* Section Expand all/Collapse all */
1102
 
1103
.section-collapsemenu {
1104
    .collapseall {
1105
        display: block;
1106
    }
1107
 
1108
    .expandall {
1109
        display: none;
1110
    }
1111
 
1112
    &.collapsed {
1113
        .collapseall {
1114
            display: none;
1115
        }
1116
 
1117
        .expandall {
1118
            display: block;
1119
        }
1120
    }
1121
}
1122
 
1123
/* Course section */
1124
 
1125
.course-section {
1126
    list-style: none;
1127
    margin-top: map-get($spacers, 3);
1128
    // Custom styles for course sections while editing.
1129
    .editing & {
1130
        margin-top: map-get($spacers, 2);
1131
    }
1132
 
1133
    .section-item {
1134
        padding: map-get($spacers, 3);
1135
        border: $border-width solid $border-color;
1136
        @include border-radius($activity-border-radius);
1137
    }
1138
 
1139
    &.hidden {
1140
        .section-item {
1141
            background-color: $gray-100;
1142
        }
1143
    }
1144
 
1145
    .sectionname > a {
1146
        color: $gray-900;
1147
        &:hover {
1148
            text-decoration: none;
1149
        }
1150
    }
1151
 
1152
    .sectionbadges .badge {
1153
        margin-left: map-get($spacers, 2);
1154
        font-weight: normal;
1155
        .icon {
1156
            font-size: 12px;
1157
            width: 12px;
1158
            height: 12px;
1159
        }
1160
    }
1161
 
1162
    .course-section-header.draggable {
1163
        cursor: move;
1164
    }
1165
 
1166
    .section_action_menu {
1167
        .dropdown-toggle::after {
1168
            display: none;
1169
        }
1170
    }
1171
 
1172
    .summarytext {
1173
        // Add rounded borders to images.
1174
        img {
1175
            @include border-radius($activity-border-radius);
1176
        }
1177
    }
1178
 
1179
    // Availability styles for both section and activities.
1180
    .availabilityinfo {
1181
        margin-top: map-get($spacers, 2);
1182
        padding: map-get($spacers, 1) map-get($spacers, 3);
1183
        background-color: $gray-200;
1184
        @include font-size($small-font-size);
1185
        @include border-radius($activity-border-radius);
1186
        .editavailability {
1187
            a {
1188
                @include border-radius();
1189
                font-weight: bold;
1190
                &:hover {
1191
                    background-color: $gray-400;
1192
                }
1193
                .icon {
1194
                    font-size: inherit;
1195
                    margin-right: map-get($spacers, 1);
1196
                }
1197
            }
1198
        }
1199
    }
1200
 
1201
    // Override '.btn.btn-icon' styles from buttons.scss to make action menu buttons smaller.
1202
    .action-menu .btn.btn-icon {
1203
        height: map-get($iconsizes, 5);
1204
        width: map-get($iconsizes, 5);
1205
        @include border-radius();
1206
    }
1207
 
1208
    .section-summary-activities {
1209
        .icon {
1210
            width: inherit;
1211
            color: $primary;
1212
        }
1213
    }
1214
 
1215
    .section-summary-activities + .section {
1216
        border-top: $border-width solid $border-color;
1217
        margin-top: map-get($spacers, 3) !important;  // stylelint-disable-line declaration-no-important
1218
        padding-top: map-get($spacers, 3) !important; // stylelint-disable-line declaration-no-important
1219
    }
1220
 
1221
    .section_goto .icon {
1222
        font-size: $font-size-lg;
1223
        color: $primary;
1224
    }
1225
 
1226
    // Add new z-index context for dnd overlay higher divider buttons and quick edit links.
1227
    .overlay-preview {
1228
        z-index: 5;
1229
    }
1230
}
1231
 
1232
// Course 'add section' button.
1233
.btn.add-section {
1234
    @include border-radius($activity-border-radius);
1235
    border: $divider-width dashed $border-color;
1236
    color: $primary;
1237
    font-size: $font-size-sm;
1238
    font-weight: bold;
1239
    &:hover,
1240
    &:focus {
1241
        background-color: $primary-light-background;
1242
        border: $divider-width solid $primary;
1243
        color: $primary;
1244
    }
1245
}
1246
 
1247
/* Single section page specific styles */
1248
 
1249
.single-section {
1250
    // Revert main section's styles.
1251
    > ul > .course-section {
1252
        &.hidden .section-item {
1253
            background-color: inherit;
1254
        }
1255
        .section-item {
1256
            padding: 0;
1257
            border: none;
1258
        }
1259
    }
1260
}
1261
 
1262
/* Re-style ordered list in course content */
1263
.course-content .activity-altcontent {
1264
    ul {
1265
        list-style: disc;
1266
        ul {
1267
            list-style: circle;
1268
            ul {
1269
                list-style: square;
1270
            }
1271
        }
1272
    }
1273
}
1274
 
1275
/* Activity cards */
1276
 
1277
.activity {
1278
    list-style: none;
1279
    position: relative;
1280
    padding-top: map-get($spacers, 1);
1281
    margin-top: map-get($spacers, 1);
1282
    border-top: $border-width solid $border-color;
1283
    // Custom styles for activity while editing.
1284
    .editing & {
1285
        // Remove activity top border and spacing, while editing a separator is displayed.
1286
        padding-top: 0;
1287
        margin-top: 0;
1288
        border-top: none;
1289
    }
1290
}
1291
 
1292
.activity-item {
1293
    position: relative;
1294
    padding: .75rem;
1295
    background-color: $white;
1296
    &.activityinline {
1297
        padding: .75rem 0;
1298
    }
1299
    &.hiddenactivity {
1300
        background-color: $gray-100;
1301
        .activityiconcontainer,
1302
        .badge {
1303
            mix-blend-mode: multiply;
1304
        }
1305
    }
1306
    // Custom styles for activity cards while editing.
1307
    .editing & {
1308
        cursor: move;
1309
        border: $activity-border-width solid transparent;
1310
        @include border-radius($activity-border-radius);
1311
        .a {
1312
            cursor: pointer;
1313
        }
1314
        &:hover,
1315
        &.selected {
1316
            border: $activity-border-width solid $activity-hover-border-color;
1317
            box-shadow: $box-shadow-sm;
1318
            .activityiconcontainer,
1319
            .badge {
1320
                mix-blend-mode: multiply;
1321
            }
1322
        }
1323
    }
1324
 
1325
    // Activity card grid layout.
1326
    .activity-grid {
1327
        display: grid;
1328
        align-items: center;
1329
        grid-template-columns: min-content 1fr min-content min-content min-content;
1330
        grid-template-rows: 1fr repeat(5, min-content);
1331
        grid-template-areas:
1332
            "icon   name          groupmode      completion    actions"
1333
            "icon   visibility    groupmode      completion    actions"
1334
            "icon   dates         groupmode      completion    actions"
1335
            "icon   altcontent    altcontent     altcontent    altcontent"
1336
            "icon   afterlink     afterlink      afterlink     afterlink"
1337
            "icon   availability  availability   availability  availability";
1338
        @include media-breakpoint-down(xs) {
1339
            grid-template-columns: min-content 1fr min-content min-content min-content;
1340
            grid-template-rows: 1fr repeat(4, min-content);
1341
            grid-template-areas:
1342
                "icon          name          actions"
1343
                "icon          visibility    actions"
1344
                "dates         dates         dates"
1345
                "groupmode     groupmode     groupmode"
1346
                "completion    completion    completion"
1347
                "altcontent    altcontent    altcontent"
1348
                "afterlink     afterlink     afterlink"
1349
                "availability  availability  availability";
1350
        }
1351
    }
1352
    // Activity card specific grid layout for activities without name.
1353
    .activity-grid.noname-grid {
1354
        grid-template-columns: min-content 1fr min-content min-content;
1355
        grid-template-areas:
1356
            "visibility    groupmode        completion    actions"
1357
            "altcontent    altcontent       altcontent    altcontent"
1358
            "afterlink     afterlink        afterlink     afterlink"
1359
            "availability  availability     availability  availability";
1360
        @include media-breakpoint-down(xs) {
1361
            grid-template-columns: 1fr min-content;
1362
            grid-template-areas:
1363
                "visibility    actions"
1364
                "altcontent    altcontent"
1365
                "groupmode     groupmode"
1366
                "afterlink     afterlink"
1367
                "completion    completion"
1368
                "availability  availability";
1369
        }
1370
    }
1371
 
1372
    .activity-actions {
1373
        grid-area: actions;
1374
        .actions {
1375
            position: relative;
1376
        }
1377
    }
1378
 
1379
    .activity-icon {
1380
        grid-area: icon;
1381
    }
1382
 
1383
    .activity-dates {
1384
        grid-area: dates;
1385
        @include font-size($small-font-size);
1386
        color: $gray-700;
1387
        display: flex;
1388
        flex-wrap: wrap;
1389
        column-gap: 0.75rem;
1390
        @include media-breakpoint-down(xs) {
1391
            margin-top: map-get($spacers, 2);
1392
        }
1393
    }
1394
    .activity-name-area {
1395
        grid-area: name;
1396
        // Prevent bootstrap strech-link from covering the inplace editable button using z-index.
1397
        .activityname {
1398
            .afterlink {
1399
                margin-left: map-get($spacers, 2);
1400
            }
1401
            .inplaceeditable .quickeditlink {
1402
                position: relative;
1403
                z-index: 2;
1404
                margin-left: map-get($spacers, 2);
1405
            }
1406
        }
1407
        .activitybadge {
1408
            &.badge-none {
1409
                font-weight: normal;
1410
                @include font-size($small-font-size);
1411
                padding: 0;
1412
            }
1413
        }
1414
    }
1415
 
1416
    .activity-completion {
1417
        grid-area: completion;
1418
        justify-self: end;
1419
        // Re-style completion buttons (mark as done & dropdown).
1420
        button,
1421
        a[role="button"] {
1422
            @include completion-button();
1423
        }
1424
        @include media-breakpoint-down(xs) {
1425
            width: 100%;
1426
            margin-top: map-get($spacers, 2);
1427
            button {
1428
                width: 100%;
1429
            }
1430
        }
1431
        .completion-dialog {
1432
            color: $gray-700;
1433
            font-size: $font-size-sm;
1434
            min-width: 12rem;
1435
            .icon {
1436
                font-size: $font-size-sm;
1437
                width: $font-size-sm;
1438
                height: $font-size-sm;
1439
                margin-right: map-get($spacers, 1);
1440
            }
1441
            .editcompletion a {
1442
                @include border-radius();
1443
                color: $gray-700;
1444
                font-weight: bold;
1445
                text-decoration: none;
1446
                &:hover {
1447
                    background-color: $gray-200;
1448
                }
1449
            }
1450
        }
1451
    }
1452
 
1453
    .activity-groupmode-info {
1454
        grid-area: groupmode;
1455
        justify-self: end;
1456
        .groupmode-information {
1457
            height: map-get($iconsizes, 5);
1458
            width: map-get($iconsizes, 5);
1459
            @include border-radius();
1460
        }
1461
        .groupmode-icon-info {
1462
            display: none;
1463
        }
1464
        @include media-breakpoint-down(xs) {
1465
            width: 100%;
1466
            margin-top: map-get($spacers, 2);
1467
            padding-top: map-get($spacers, 2);
1468
            border-top: $border-width solid $border-color;
1469
            .groupmode-information {
1470
                width: auto;
1471
                font-size: inherit;
1472
                padding: 0 map-get($spacers, 2);
1473
            }
1474
            .groupmode-icon-info {
1475
                display: inline;
1476
            }
1477
            // Disable v-parent-focus behaviour on small devices to always show the groupmode button.
1478
            .v-parent-focus {
1479
                opacity: 1;
1480
                visibility: visible;
1481
            }
1482
        }
1483
    }
1484
 
1485
    .activity-badges {
1486
        grid-area: visibility;
1487
        .badge {
1488
            font-weight: normal;
1489
            .icon {
1490
                font-size: 12px;
1491
                width: 12px;
1492
                height: 12px;
1493
            }
1494
        }
1495
    }
1496
 
1497
    .activity-altcontent {
1498
        grid-area: altcontent;
1499
        margin-top: map-get($spacers, 1);
1500
        &.activity-description {
1501
            margin-top: map-get($spacers, 2);
1502
            padding-top: map-get($spacers, 2);
1503
            border-top: $border-width solid $border-color;
1504
            @include font-size($small-font-size);
1505
        }
1506
        // Add rounded borders to images.
1507
        img {
1508
            @include border-radius($activity-border-radius);
1509
        }
1510
    }
1511
 
1512
    .activity-availability {
1513
        grid-area: availability;
1514
    }
1515
 
1516
    .activity-afterlink {
1517
        grid-area: afterlink;
1518
        margin-top: map-get($spacers, 2);
1519
        padding-top: map-get($spacers, 2);
1520
        border-top: $border-width solid $border-color;
1521
    }
1522
 
1523
    .no-overflow {
1524
        width: 100%;
1525
    }
1526
}
1527
 
1528
.section .draggable .activity-item .dragicon {
1529
    display: none;
1530
}
1531
 
1532
/* Dividers */
1533
 
1534
.divider {
1535
    position: relative;
1536
    hr {
1537
        width: 100%;
1538
        margin: map-get($spacers, 2) map-get($spacers, 1);
1539
        border-top: $divider-width dashed $divider-color;
1540
    }
1541
    .divider-content {
1542
        opacity: 0;
1543
        visibility: hidden;
1544
        transition: visibility 0.1s;
1545
        position: absolute;
1546
        background: linear-gradient(transparent 40%, $white 40%, $white 60%, transparent 60%);
1547
        .section.hidden & {
1548
            background: linear-gradient(transparent 40%, $gray-100 40%, $gray-100 60%, transparent 60%);
1549
        }
1550
    }
1551
    &.always-visible {
1552
        .divider-content {
1553
            opacity: 1;
1554
            visibility: visible;
1555
        }
1556
    }
1557
    &.always-hidden {
1558
        hr {
1559
            opacity: 0;
1560
            visibility: hidden;
1561
        }
1562
    }
1563
    &:hover,
1564
    &:focus,
1565
    &:focus-within {
1566
        .divider-content {
1567
            opacity: 1;
1568
            visibility: visible;
1569
        }
1570
        hr {
1571
            opacity: 1;
1572
            visibility: visible;
1573
        }
1574
    }
1575
    // Style the hr divider when the "Add content" button is hovered.
1576
    &:has(.btn.add-content:hover) {
1577
        hr {
1578
            border-color: $divider-hover-color;
1579
        }
1580
    }
1581
}
1582
 
1583
// These styles will make the activity and section dividers buttons visible (but still without opacity) so
1584
// buttons can be keyboard focusable.
1585
.activity:focus-within + .activity .divider .divider-content,
1586
.course-section-header:focus-within + .content .section .activity:first-child .divider .divider-content,
1587
.content .section .activity:focus-within .divider .divider-content,
1588
.course-content:focus-within .changenumsections .divider .divider-content {
1589
    visibility: visible;
1590
}
1591
 
1592
// Hide last section "Add section". It will rely on the course format general "Add section" button.
1593
.course-content ul.topics > li:last-child .changenumsections {
1594
    display: none;
1595
}
1596
 
1597
// Custom buttons for dividers.
1598
.btn.add-content {
1599
    position: relative;
1600
    z-index: 1;
1601
    @include border-radius($rounded-pill);
1602
    font-size: $font-size-sm;
1603
    font-weight: bold;
1604
    color: theme-color-level("primary", $alert-color-level);
1605
    background-color: theme-color-level("primary", $alert-bg-level);
1606
    &:hover,
1607
    &:focus {
1608
        color: color-yiq($primary);
1609
        background-color: $primary;
1610
    }
1611
    .icon {
1612
        width: 14px;
1613
        height: 14px;
1614
        font-size: 14px;
1615
    }
1616
}
1617
 
1618
/* Bulk editing */
1619
 
1620
.bulkenabled {
1621
    .bulk-hidden {
1622
        display: none !important; // stylelint-disable-line declaration-no-important
1623
    }
1624
    .section:not(:first-child) {
1625
        margin-top: map-get($spacers, 4);
1626
    }
1627
    .activity {
1628
        margin-top: map-get($spacers, 2);
1629
        margin-left: 2rem;
1630
        padding-top: map-get($spacers, 2);
1631
        border-top: $divider-width dashed $divider-color;
1632
        &:first-child {
1633
            margin-top: map-get($spacers, 4);
1634
        }
1635
    }
1636
    .activity-item {
1637
        .bulkselect {
1638
            position: absolute;
1639
            left: -2rem;
1640
        }
1641
    }
1642
    .course-section-header .bulkselect {
1643
        left: -2.75rem;
1644
        position: relative;
1645
        width: 0;
1646
    }
1647
    @include media-breakpoint-down(sm) {
1648
        .course-content {
1649
            margin-left: 2rem;
1650
        }
1651
    }
1652
}
1653
 
1654
// Custom styles for bulk actions sticky footer in small devices.
1655
.sticky-footer-content.bulkactions {
1656
    @include media-breakpoint-down(sm) {
1657
        position: relative;
1658
        .form-check,
1659
        .bulkaction-name,
1660
        .bulkcount {
1661
            display: none;
1662
        }
1663
        .actions button {
1664
            padding: 0 map-get($spacers, 2);
1665
        }
1666
        .bulkcancel {
1667
            position: absolute;
1668
            top: 0;
1669
            right: 0;
1670
        }
1671
    }
1672
}
1673
 
1674
/* Activity completion */
1675
 
1676
.defaultactivitycompletion-item {
1677
    a {
1678
        color: $black;
1679
        text-decoration: none;
1680
    }
1681
    .activityicon {
1682
        width: 32px;
1683
        height: 32px;
1684
    }
1685
}
1686
 
1687
/* Home page course specific styles */
1688
 
1689
.sitetopic {
1690
    // Hide the first activity top border.
1691
    .activity:first-of-type hr {
1692
        display: none;
1693
    }
1694
    .section-item {
1695
        margin-bottom: map-get($spacers, 4);
1696
        @include border-radius();
1697
    }
1698
}