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