Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
/* Anchor link offset fix. This makes hash links scroll 60px down to account for the fixed header. */
2
:target::before {
3
    content: " ";
4
    display: block;
5
    height: 60px;
6
    /* fixed header height*/
7
    margin-top: -60px;
8
    /* negative fixed header height */
9
    width: 1px;
10
    pointer-events: none;
11
}
12
 
13
.pagelayout-embedded :target {
14
    padding-top: initial;
15
    margin-top: initial;
16
}
17
 
18
#nav-drawer.closed {
19
    left: -($drawer-width + $drawer-offscreen-gutter);
20
 
21
    @include media-breakpoint-between(xs, sm) {
22
        left: -100%;
23
    }
24
}
25
 
26
#nav-drawer[aria-hidden=true] .list-group-item {
27
    display: none;
28
}
29
 
30
.drawer-toggle-icon-open,
31
.drawer-toggle-icon-close {
32
    opacity: 0;
33
    display: none;
34
 
35
    transition: $transition-base;
36
}
37
 
38
.sidebar-btn[aria-expanded="true"] {
39
    .drawer-toggle-icon-open {
40
        opacity: 1;
41
        display: inline-flex;
42
    }
43
}
44
 
45
.sidebar-btn[aria-expanded="false"] {
46
    .drawer-toggle-icon-close {
47
        opacity: 1;
48
        display: inline-flex;
49
    }
50
}
51
 
52
#nav-drawer {
53
    position: fixed;
54
    z-index: $zindex-fixed + 10;
55
    width: $drawer-width;
56
    top: 7px;
57
    right: auto;
58
    left: 7px;
59
    height: calc(100% - 14px);
60
 
61
    background-color: $drawer-bg;
62
    border-radius: 9px;
63
    transition: right 350ms ease, left 350ms ease;
64
 
65
    @include media-breakpoint-down(md) {
66
        top: 68px;
67
        height: calc(100% - 74px);
68
    }
69
 
70
    @include media-breakpoint-between(xs, sm) {
71
        width: calc(100% - 14px);
72
    }
73
 
74
    .theme-dark & {
75
        background-color: $dm-gray-100; // todo: variable
76
    }
77
 
78
    .nav-drawer-container {
79
        max-height: calc(100vh - 133px);
80
        overflow-y: auto;
81
        overflow-x: hidden;
82
        padding-right: 5px;
83
        padding-right: 5px;
84
        margin: 7px 3px 4px 7px;
85
 
86
        @include thin-scrolls($drawer-scroll-bg-track);
87
 
88
        .theme-dark & {
89
            @include thin-scrolls($dm-drawer-scroll-bg-track);
90
        }
91
    }
92
 
93
    .rui-drawer-footer {
94
        background-color: $drawer-nav-box-bg;
95
        width: 100%;
96
        padding: 7px 10px 10px;
97
        position: absolute;
98
        bottom: 0;
99
        border-radius: 0 0 9px 9px;
100
    }
101
 
102
    .rui-custom-sidebar-content {
103
        a {
104
            color: $drawer-link;
105
 
106
            &:hover {
107
                color: $drawer-link-h;
108
            }
109
        }
110
    }
111
 
112
    h1,
113
    h2,
114
    h3,
115
    h4,
116
    h5 {
117
        color: $drawer-text;
118
    }
119
}
120
 
121
.rui-drawer-logo {
122
    padding: 10px 16px;
123
    margin: $topbar-padding-x 0 20px;
124
}
125
 
126
.nav-drawer-wrapper {
127
    margin: 40px 0;
128
}
129
 
130
 
131
 
132
body.drawer-ease {
133
    @include transition(margin-left 0.5s ease, margin-right 0.5s ease);
134
}
135
 
136
body:not(.uses-drawers).drawer-open-left {
137
    @include media-breakpoint-up(md) {
138
        margin-left: $drawer-left-width;
139
    }
140
}
141
 
142
body.drawer-open-left #page.drawers {
143
    @include media-breakpoint-up(md) {
144
        margin-left: $drawer-left-width;
145
        padding-left: 1rem;
146
    }
147
}
148
 
149
$right-drawer-width: 320px;
150
 
151
[data-region=right-hand-drawer] {
152
    display: flex;
153
    flex-direction: column;
154
    transition: all 350ms ease-in-out;
155
 
156
    &.drawer {
157
        position: fixed;
158
        top: 0;
159
        right: 0;
160
        height: 100%;
161
        width: $right-drawer-width;
162
        border-left: 1px solid $border-color;
163
        padding: 0;
164
        visibility: visible;
165
        opacity: 1;
166
 
167
        overflow: hidden;
168
        z-index: 1230;
169
 
170
        .theme-dark & {
171
            border-color: $dm-border-color;
172
        }
173
    }
174
 
175
    &.hidden {
176
        display: block;
177
        right: $right-drawer-width * -1;
178
        // Turn off visibility so that nothing in the drawer can receive focus when
179
        // it is hidden.
180
        visibility: hidden;
181
        opacity: 0;
182
        // Delay visibility changes until after the slide right animation has completed.
183
        @include transition(right 350ms ease-in-out, visibility 0s ease-in-out 350ms, opacity 0s ease-in-out 350ms);
184
    }
185
}
186
 
187
@include media-breakpoint-between(xs, sm) {
188
    [data-region=right-hand-drawer] {
189
        .closewidget {
190
            display: block;
191
            padding: 0 0.2rem;
192
        }
193
    }
194
}
195
 
196
 
197
.message-drawer-backdrop {
198
    position: fixed;
199
    top: 0;
200
    bottom: 0;
201
    left: 0;
202
    right: 0;
203
    z-index: 1240;
204
 
205
    background-color: rgba(#000, .6);
206
 
207
    cursor: e-resize;
208
 
209
    .layout.fullscreen & {
210
        display: none;
211
        z-index: -1;
212
        height: calc(100vh - 60px);
213
    }
214
}
215
 
216
.rui-flatnavigation {
217
    list-style: none;
218
    padding: $drawer-box-inner-padding 0;
219
    margin: 0;
220
}
221
 
222
.rui-flatnavigation-box {
223
    padding-bottom: 10px;
224
    margin-bottom: 10px;
225
    border-bottom: 1px solid $drawer-border;
226
}
227
 
228
.rui-sidebar-nav-item {
229
    margin-bottom: 2px;
230
 
231
    &:last-child {
232
        margin-bottom: 0;
233
    }
234
}
235
 
236
.rui-sidebar-nav-item-link {
237
    padding: .35rem .65rem;
238
 
239
    display: inline-flex;
240
    width: 100%;
241
    align-items: center;
242
 
243
    font-size: $font-size-md;
244
    font-weight: $font-weight-medium;
245
    color: $drawer-nav-btn-text;
246
    word-break: break-word;
247
 
248
    background-color: transparent;
249
    border: none;
250
    border-radius: $btn-border-radius;
251
 
252
    transition: color 350ms ease;
253
 
254
    .rui-sidebar-nav-icon {
255
        display: flex;
256
        align-items: center;
257
        justify-content: center;
258
 
259
        width: 30px;
260
        height: 30px;
261
        margin-right: 5px;
262
        color: $drawer-nav-btn-icon;
263
        opacity: $drawer-icon-opacity;
264
 
265
        .theme-dark & {
266
            color: $drawer-nav-btn-text;
267
        }
268
    }
269
 
270
    &.active,
271
    &:hover {
272
        border: none;
273
        background-color: $drawer-nav-btn-bg-hover;
274
        color: $drawer-nav-btn-text-hover;
275
 
276
        text-decoration: none;
277
 
278
        .theme-dark & {
279
            background-color: var(--primary-color-800);
280
            color: var(--primary-color-100);
281
        }
282
 
283
        .rui-sidebar-nav-icon {
284
            color: $drawer-nav-btn-text-hover;
285
            opacity: $drawer-icon-opacity;
286
 
287
            .theme-dark & {
288
                color: $drawer-nav-btn-text;
289
            }
290
        }
291
    }
292
 
293
}
294
 
295
.rui-drawer-course-nav {
296
    margin-bottom: 10px;
297
    padding-top: 10px;
298
    padding-bottom: 10px;
299
    border-bottom: 1px solid $drawer-border;
300
 
301
    .rui-sidebar-nav-item-link {
302
        margin-bottom: 2px;
303
        padding-top: 4px;
304
        padding-bottom: 4px;
305
        font-size: $font-size-xs;
306
    }
307
}
308
 
309
.rui-sidebar-nav-item-link--sm {
310
    font-size: $font-size-xs;
311
}
312
 
313
.rui-sidebar-nav-text,
314
.rui-course-menu-list-text {
315
    width: calc(100% - 35px);
316
}
317
 
318
.rui-sidebar-nav-text {
319
    display: inline-flex;
320
    align-items: center;
321
    justify-content: space-between;
322
}
323
 
324
.rui-sidebar-mycourses {
325
    margin: 0;
326
    padding: $drawer-box-inner-padding;
327
    background-color: $drawer-nav-box-bg;
328
    border-radius: $btn-border-radius;
329
    overflow: hidden;
330
}
331
 
332
.rui-sidebar-hr {
333
    margin: 0;
334
    padding: 0;
335
    display: block;
336
    margin: 3px -3px;
337
    width: calc(100% + 6px);
338
    height: 1px;
339
 
340
    .theme-dark & {
341
        background-color: $dm-border-color;
342
    }
343
}
344
 
345
// TODO: variables
346
.rui-sidebar-abtn {
347
    width: 100%;
348
    padding: .35rem .45rem;
349
    background-color: transparent;
350
    border-width: 0;
351
    display: inline-flex;
352
    justify-content: space-between;
353
    align-items: center;
354
 
355
    font-size: $font-size-md;
356
    font-weight: $font-weight-medium;
357
    color: $drawer-nav-btn-text;
358
 
359
    .theme-dark & {
360
        color: $dm-body-color;
361
        border-color: $dm-border-color;
362
    }
363
 
364
    .rui-drawer-badge {
365
        min-width: 20px;
366
        height: 20px;
367
        border-radius: 20px;
368
        background-color: $drawer-bg;
369
 
370
        display: flex;
371
        align-items: center;
372
        justify-content: center;
373
 
374
        font-size: 11px;
375
        font-weight: $font-weight-medium;
376
        color: $drawer-text;
377
    }
378
 
379
    &:hover,
380
    &[aria-expanded="true"] {
381
        background-color: $drawer-nav-btn-bg-hover;
382
        color: $drawer-nav-btn-text-hover;
383
 
384
        .theme-dark & {
385
            background-color: $drawer-nav-btn-bg;
386
            color: $drawer-nav-btn-text;
387
        }
388
 
389
        .rui-drawer-badge {
390
            background-color: $drawer-nav-box-bg;
391
            color: $drawer-text;
392
        }
393
 
394
        .rui-sidebar-nav-icon {
395
            color: $drawer-nav-btn-text-hover;
396
        }
397
    }
398
 
399
}
400
 
401
.rui-course-wrapper {
402
    max-height: 200px;
403
    overflow-y: auto;
404
 
405
    @include thin-scrolls($drawer-scroll-bg-track);
406
 
407
    .theme-dark & {
408
        @include thin-scrolls($dm-drawer-scroll-bg-track);
409
    }
410
}
411
 
412
.rui-course-menu-list--more {
413
    width: 100%;
414
    display: inline-flex;
415
    justify-content: space-between;
416
    align-items: center;
417
 
418
    margin: 0;
419
    padding: .35rem 1rem;
420
 
421
    border-radius: $btn-border-radius;
422
 
423
    font-size: $font-size-xs;
424
    color: $drawer-nav-btn-text-light;
425
    text-align: right;
426
 
427
    .theme-dark & {
428
        color: $dm-body-color;
429
    }
430
 
431
    &:hover {
432
        background-color: $drawer-nav-btn-bg-hover;
433
        color: $drawer-nav-btn-text-hover;
434
        text-decoration: none;
435
 
436
        .theme-dark & {
437
            background-color: var(--main-theme-color);
438
            color: var(--primary-color-100);
439
        }
440
    }
441
}
442
 
443
.rui-flatnavigation-sm {
444
    padding: 3px 1px;
445
 
446
    .rui-sidebar-nav-icon svg {
447
        width: 18px;
448
        height: 18px;
449
    }
450
 
451
    .rui-list-group-item {
452
        padding-top: 3px;
453
        padding-bottom: 3px;
454
 
455
        font-size: $font-size-xs;
456
        color: $drawer-nav-btn-text-light;
457
 
458
        .theme-dark & {
459
            color: $dm-body-color-light;
460
        }
461
    }
462
}
463
 
464
.rui-drawer-nav-title {
465
    padding: 0 12px;
466
    font-size: 11px;
467
    font-weight: $font-weight-medium;
468
    text-transform: uppercase;
469
    opacity: .6;
470
}
471
 
472
.rui-nav-item-container {
473
    display: flex;
474
    align-items: start;
475
}
476
 
477
.rui-nav-list-group {
478
    font-size: $font-size-md;
479
    font-weight: $font-weight-medium;
480
    color: $drawer-nav-btn-text;
481
 
482
    .theme-dark & {
483
        color: $dm-body-color-secondary;
484
    }
485
}
486
 
487
 
488
.nav-drawer-header {
489
    position: sticky;
490
    top: 0;
491
    margin: -15px -15px 30px;
492
    padding: $drawer-padding-x $drawer-padding-x 0 $drawer-padding-x;
493
    z-index: $zindex-sticky;
494
}
495
 
496
 
497
@include media-breakpoint-between(xs, sm) {
498
 
499
    body.drawer-open-left,
500
    body.drawer-open-right {
501
        overflow: hidden;
502
    }
503
}
504
 
505
.rui-custom-sidebar-content {
506
    font-size: $font-size-md;
507
    color: $drawer-nav-btn-text;
508
 
509
    .theme-dark & {
510
        color: $dm-body-color-light;
511
    }
512
}
513
 
514
/* Course Index */
515
.drawer-course-index {
516
    overflow: hidden;
517
    position: fixed;
518
 
519
    @include media-breakpoint-up(lg) {
520
        padding: 20px 10px 20px 20px;
521
        top: 60px;
522
    }
523
 
524
    @include media-breakpoint-between(xs, md) {
525
        top: 0;
526
        padding: 10px;
527
    }
528
 
529
    background-color: $container-bg;
530
 
531
    z-index: $zindex-fixed +91;
532
    transition: left 350ms ease,
533
    left 350ms ease;
534
 
535
    @include media-breakpoint-up(lg) {
536
        width: $drawer-left-width;
537
        height: 100%;
538
        left: -100%;
539
        max-height: calc(100vh - 60px);
540
    }
541
 
542
    @include media-breakpoint-between(xs, md) {
543
        width: 100%;
544
        height: 100%;
545
        left: -100%;
546
        border: 0;
547
        z-index: 99999;
548
    }
549
 
550
    .theme-dark & {
551
        background-color: $dm-body-bg;
552
        border-color: $dm-border-color;
553
    }
554
 
555
    &.show {
556
        left: 0;
557
    }
558
}
559
 
560
.btn-drawer {
561
    position: fixed;
562
    z-index: $zindex-fixed;
563
    top: 100px;
564
 
565
    @include media-breakpoint-up(md) {
566
        left: 40px;
567
    }
568
 
569
    @include media-breakpoint-between(xs, sm) {
570
        left: 10px;
571
        top: auto;
572
        bottom: 90px;
573
    }
574
 
575
    display: flex;
576
    align-items: center;
577
    justify-content: center;
578
 
579
    padding: 0;
580
    width: 40px;
581
    height: 40px;
582
 
583
    background-color: $gray-900;
584
    border: 1px solid $gray-900;
585
    color: $gray-100;
586
    border-radius: $btn-border-radius;
587
 
588
    transition: $transition-base;
589
 
590
    &:hover {
591
        background-color: $primary-color-600;
592
        border-color: $primary-color-600;
593
        color: $primary-color-100;
594
 
595
        .theme-dark & {
596
            background-color: $primary-color-600;
597
            border-color: $primary-color-600;
598
            color: $primary-color-100;
599
        }
600
    }
601
 
602
 
603
    @include media-breakpoint-between(xs, md) {
604
        right: auto;
605
    }
606
 
607
    .theme-dark & {
608
        background-color: $dm-gray-100;
609
        border-color: $dm-gray-100;
610
        color: $dm-body-color;
611
    }
612
}
613
 
614
.rui-lang-btn {
615
    display: flex;
616
    align-items: center;
617
    justify-content: center;
618
 
619
    padding: 0;
620
 
621
    min-width: 30px;
622
    width: 30px;
623
    min-height: 30px;
624
 
625
    border: none;
626
    border-radius: 30px;
627
    font-size: $font-size-xs;
628
    font-weight: $font-weight-medium;
629
 
630
    background-color: transparent;
631
    color: $topbar-btn-text;
632
 
633
    .theme-dark & {
634
        background-color: $dm-topbar-btn;
635
        color: $dm-topbar-btn-text;
636
    }
637
 
638
    &:hover {
639
        background-color: $topbar-btn-hover;
640
        color: $topbar-btn-hover-text;
641
 
642
        .theme-dark & {
643
            background-color: $dm-topbar-btn-hover;
644
            color: $dm-topbar-btn-hover-text;
645
        }
646
    }
647
}
648
 
649
@mixin drawer() {
650
    background-color: $drawer-bg-color;
651
    z-index: $zindex-modal;
652
    position: fixed;
653
    height: calc(100vh - #{$navbar-height});
654
    transition: opacity 150ms ease;
655
 
656
    .theme-dark & {
657
        background-color: $dm-drawer-bg-color;
658
    }
659
 
660
    &.not-initialized {
661
        display: none;
662
    }
663
}
664
 
665
@mixin drawertypes() {
666
    &.drawer-right {
667
        @include media-breakpoint-up(lg) {
668
            top: $navbar-height;
669
            //border-left: 1px solid $border-color;
670
            // .theme-dark & {
671
            //     border-color: $dm-border-color;
672
            // }
673
        }
674
 
675
        @include media-breakpoint-between(xs, md) {
676
            top: 10px;
677
            border-radius: $btn-border-radius;
678
        }
679
 
680
        @include media-breakpoint-up(md) {
681
            width: $drawer-right-width;
682
        }
683
 
684
        @include media-breakpoint-between(xs,sm) {
685
            width: calc(100% - 20px);
686
            max-width: 410px;
687
        }
688
 
689
        max-width: 100%;
690
        right: calc(-#{$drawer-right-width} - 10px);
691
        visibility: hidden;
692
        @include box-shadow($box-shadow-drawer-right);
693
 
694
        &.show {
695
            right: 0;
696
            visibility: visible;
697
 
698
            @include media-breakpoint-between(xs, md) {
699
                right: 10px;
700
            }
701
        }
702
 
703
        .drawertoggle {
704
            margin-left: auto;
705
            margin-right: 0;
706
        }
707
    }
708
 
709
    &.drawer-left {
710
        width: $drawer-left-width;
711
        max-width: $drawer-left-width;
712
        left: calc(-#{$drawer-left-width} - 10px);
713
        visibility: hidden;
714
        @include box-shadow($box-shadow-drawer-left);
715
 
716
        border-radius: 40px;
717
 
718
        &.show {
719
            visibility: visible;
720
 
721
            @include media-breakpoint-up(lg) {
722
                left: 0;
723
            }
724
 
725
            @include media-breakpoint-only(md) {
726
                top: 30px;
727
                left: 30px;
728
                border-radius: $btn-border-radius;
729
            }
730
 
731
            @include media-breakpoint-between(xs, sm) {
732
                top: 0;
733
                left: 0;
734
                padding: 10px 10px 80px;
735
                width: 100%;
736
                height: 100%;
737
                border-radius: 0;
738
            }
739
        }
740
 
741
        .drawertoggle {
742
            margin-right: auto;
743
            margin-left: 5px;
744
        }
745
    }
746
 
747
    &.drawer-bottom {
748
        bottom: -110%;
749
 
750
        &.show {
751
            bottom: 0;
752
        }
753
    }
754
}
755
 
756
.drawer {
757
    @include drawer();
758
    @include drawertypes();
759
 
760
    &.message-drawer {
761
 
762
        @include media-breakpoint-up(md) {
763
            border-radius: $btn-border-radius;
764
        }
765
 
766
        right: 10px;
767
    }
768
}
769
 
770
.drawer-right,
771
.drawer-left {
772
    top: $navbar-height;
773
 
774
    @include media-breakpoint-between(xs, md) {
775
        box-shadow: $box-shadow-lg;
776
    }
777
}
778
 
779
@include media-breakpoint-up(lg) {
780
    .drawer {
781
        padding: 40px 30px 30px 30px;
782
        z-index: 1230;
783
 
784
        // Workaround to display the skip link elements from the blocks drawer infront of the navbar.
785
        &#theme-drawers-blocks:focus-within {
786
            position: absolute;
787
 
788
            .drawercontent {
789
                z-index: auto;
790
            }
791
        }
792
 
793
        &.not-initialized {
794
            display: block;
795
        }
796
    }
797
}
798
 
799
@include media-breakpoint-down(lmd) {
800
    .drawer {
801
        padding: 30px;
802
    }
803
}
804
 
805
@include media-breakpoint-between(xs, sm) {
806
    .drawer {
807
        border-radius: 0;
808
    }
809
}