/* Anchor link offset fix. This makes hash links scroll 60px down to account for the fixed header. */ $fixed-header-y: $navbar-height; $drawer-width: 285px !default; $drawer-left-width: 285px !default; $drawer-right-width: 315px !default; $drawer-padding-x: 20px !default; $drawer-padding-y: 20px !default; $drawer-offscreen-gutter: 20px !default; $drawer-bg-color: $gray-100 !default; $drawer-scroll-bg-track: $gray-100 !default; $drawer-shadow-color: rgba(0, 0, 0, .25) !default; :target { scroll-margin-top: $fixed-header-y + 10px; } .pagelayout-embedded :target { padding-top: initial; margin-top: initial; } #nav-drawer.closed { left: -($drawer-width + $drawer-offscreen-gutter); @include media-breakpoint-between(xs, sm) { left: -100%; } } #nav-drawer[aria-hidden=true] .list-group-item { display: none; } [data-region="drawer"] { position: fixed; width: $drawer-width; top: $fixed-header-y; height: calc(100% - #{$navbar-height}); overflow-y: initial; -webkit-overflow-scrolling: touch; z-index: $zindex-dropdown - 1; @include transition(right 350ms ease, left 350ms ease); } @include media-breakpoint-up(sm) { .jsenabled .btn-footer-popover { @include transition(0350ms); } } #nav-drawer { position: fixed; z-index: $zindex-fixed; width: $drawer-width; top: 0; right: auto; left: 0; height: 100%; background-color: $drawer-bg; transition: right 350ms ease, left 350ms ease; @include media-breakpoint-down(md) { top: $navbar-height; z-index: $zindex-fixed + 100; } @include media-breakpoint-between(xs, sm) { width: 100%; } .theme-dark & { background-color: $dm-gray-100; // todo: variable } .nav-drawer-container { max-height: 100vh; overflow-y: auto; overflow-x: hidden; padding-right: 25px; margin: 0 0 0 25px; @include media-breakpoint-down(md) { max-height: calc(100vh - 55px); } @include thin-scrolls($drawer-scroll-bg-track); .theme-dark & { @include thin-scrolls($dm-drawer-scroll-bg-track); } } .rui-custom-sidebar-content { a { color: $drawer-link; &:after { background-color: $drawer-link-h; } .theme-dark & { color: $dm-link-hover-color; &:after { background-color: $dm-link-hover-color; } } &:hover { color: $drawer-link-h; .theme-dark & { color: $dm-link-hover-color; } } } } /* Override the z-indexes defined in bootstrap/_list-group.scss that lead to side effects on the user tours positioning. */ .list-group-item-action.active, .list-group-item.active { z-index: inherit; } .list-group-item-action.active+.list-group-item, .list-group-item.active+.list-group-item { border-top: none; } .list-group { // Remove default list styling in nav menus. ul { list-style: none; padding: 0; margin: 0; } // Add margin to be consistent with `.list-group-item` spacing. li { margin-bottom: -1px; } li:last-child { margin-bottom: 0; } } } body.drawer-ease { @include transition(margin-left 350ms ease, margin-right 350ms ease); } body:not(.uses-drawers).drawer-open-left { @include media-breakpoint-up(lmd) { margin-left: $drawer-left-width; } } body.drawer-open-left, body.drawer-courseindex--open, body.drawer-open-index--open { @include media-breakpoint-up(lmd) { margin-left: $drawer-width; overflow-x: hidden; } } body.drawer-open-right #page.drawers { @include media-breakpoint-up(xl) { margin-right: $drawer-right-width; } } $right-drawer-width: 320px; [data-region=right-hand-drawer] { display: flex; flex-direction: column; @include transition(right 350ms ease); &.drawer { position: fixed; top: $navbar-height; right: 0; height: calc(100% - #{$navbar-height}); width: $right-drawer-width; box-shadow: -2px 2px 4px $drawer-shadow-color; padding: 0; visibility: visible; opacity: 1; } &.hidden { display: block; right: $right-drawer-width * -1; // Turn off visibility so that nothing in the drawer can receive focus when // it is hidden. visibility: hidden; opacity: 0; // Delay visibility changes until after the slide right animation has completed. @include transition(right 350ms ease, visibility 0s ease 350ms, opacity 0s ease 350ms); } } @include media-breakpoint-down(sm) { [data-region=right-hand-drawer] { &.drawer { top: 0; height: 100%; } } body.drawer-open-left, body.drawer-open-right { overflow: hidden; } } .dir-rtl { [data-region=right-hand-drawer] { box-shadow: 2px 2px 4px $drawer-shadow-color; } } @mixin drawer() { @include transition(left 350ms ease, right 350ms ease, top 350ms ease, bottom 350ms ease, visibility 350ms ease); z-index: $zindex-modal; position: fixed; @include media-breakpoint-down(lmd) { top: 0; height: 100vh; } @include media-breakpoint-down(md) { top: $navbar-height; height: calc(100% - #{$navbar-height}); } &.not-initialized { display: none; } } @mixin drawertypes() { &.drawer-right { width: $drawer-right-width; max-width: $drawer-right-width; right: calc(-#{$drawer-right-width} - 10px); visibility: hidden; @include box-shadow($box-shadow-drawer-right); @include media-breakpoint-up(lg) { z-index: $zindex-fixed + 29; } @include media-breakpoint-between(xs, lmd) { z-index: $zindex-fixed + 29; } &.show { right: 0; visibility: visible; } .drawertoggle { margin-left: auto; } } &.drawer-left { width: $drawer-left-width; max-width: $drawer-left-width; left: calc(-#{$drawer-left-width} + -10px); background-color: $drawer-bg; visibility: hidden; @include box-shadow($box-shadow-drawer-left); .theme-dark & { background-color: $dm-drawer-bg; } &.show { left: 0; visibility: visible; } .drawertoggle { margin-right: auto; margin-left: 5px; } } &.drawer-bottom { bottom: -110%; &.show { bottom: 0; } } } .drawer { @include drawer(); @include drawertypes(); } .path-mod-quiz, #page-calendar-view { .drawer.drawer-right { @include media-breakpoint-down(lmd) { height: auto; } } } @include media-breakpoint-up(lg) { .drawer { z-index: 3; // Workaround to display the skip link elements from the blocks drawer infront of the navbar. &#theme_space-drawers-blocks:focus-within { position: absolute; .drawercontent { z-index: auto; } } &.not-initialized { display: block; } } } .drawer-md, .drawer-sm { display: none; } .drawerheader { padding: 0; height: $navbar-height; display: flex; align-items: center; } .drawer.scrolled .drawerheader { box-shadow: 0 8px 11px -7px $drawer-shadow-color; } @include media-breakpoint-down(md) { .drawer-md { display: block; @include drawer(); @include drawertypes(); } } @include media-breakpoint-down(sm) { .drawer-sm { display: block; @include drawer(); @include drawertypes(); } } .drawercontent { position: relative; z-index: 3; height: calc(100% - #{$navbar-height}); display: flex; flex-direction: column; flex-wrap: nowrap; overflow-y: auto; padding: 0 1rem 1rem 1rem; .dropdown-menu .dropdown-item { width: 220px; white-space: normal; } @include thin-scrolls($drawer-scroll-bg-track); } .rui-drawer-logo { padding: 10px 16px; margin: $topbar-padding-x 0 20px; } .nav-drawer-wrapper { margin: 40px 0; } .message-drawer-backdrop { position: fixed; top: 0; bottom: 0; left: 0; right: 0; z-index: $zindex-fixed + 100; background-color: rgba(#000, .6); cursor: e-resize; .layout.fullscreen & { display: none; z-index: -1; } } .rui-flatnavigation { list-style: none; padding: $drawer-box-inner-padding; margin: 0; } .rui-flatnavigation-box { background-color: $drawer-nav-container; border-radius: $border-radius; .theme-dark & { background-color: $dm-gray-200; } } $mycourses-wrapper-height: 249px !default; .rui-course-wrapper { max-height: $mycourses-wrapper-height; overflow-y: auto; .alert { font-size: $font-size-xs; } } .rui-sidebar-nav-item { margin-bottom: 2px; &:last-child { margin-bottom: 0; } } .rui-sidebar-nav-item-link { padding: .35rem; margin-bottom: 2px; display: inline-flex; width: 100%; align-items: center; font-size: $font-size-xs; font-weight: $font-weight-medium; color: $drawer-nav-btn-text; word-break: break-word; background-color: transparent; border: none; border-radius: $border-radius; &:last-of-type { margin-bottom: 0; } .theme-dark & { color: $dm-body-color; } .rui-sidebar-nav-icon { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-right: 5px; color: $drawer-nav-btn-icon; opacity: $drawer-icon-opacity; transition: color 350ms ease; .theme-dark & { color: $dm-body-color; } } &.rui-course-list-past .rui-sidebar-nav-icon { color: $green-600; .theme-dark & { color: $green-100; } } &.active, &:hover { border: none; background-color: $drawer-nav-btn-bg-hover; color: $drawer-nav-btn-text-hover; text-decoration: none; .theme-dark & { background-color: $primary-color-600; color: $primary-color-100; } .rui-sidebar-nav-icon { color: $drawer-nav-btn-icon-hover; .theme-dark & { color: $primary-color-100 !important; } } } } .rui-sidebar-nav-item-link--sm { font-size: $font-size-xs; } .rui-sidebar-nav-text, .rui-course-menu-list-text { width: calc(100% - 35px); } .rui-sidebar-nav-text { display: inline-flex; font-size: $font-size-sm; align-items: center; justify-content: space-between; } .rui-sidebar-mycourses { margin: $topbar-padding-x 0; padding: $drawer-box-inner-padding; background-color: $drawer-nav-container; border-radius: $border-radius; overflow: hidden; .theme-dark & { background-color: $dm-gray-200; } } a.rui-course-list-past { background-color: $green-100; color: $green-600; .mycourses-inprogress-on & { display: none; } .theme-dark & { background-color: $green-800; color: $green-100; } } .rui-course-list-hidden { display: none; opacity: .7; filter: grayscale(1); .mycourses-hidden-on & { display: flex; } } .rui-course-list-future { .mycourses-inprogress-on & { display: none; } } .mycourses-filter { label { min-height: 20px; } } .rui-sidebar-hr { margin: 0; padding: 0; display: block; margin: 3px -3px; width: calc(100% + 6px); height: 1px; border: 0; background-color: rgba($drawer-text, .1); .theme-dark & { border: 0; background-color: rgba($dm-drawer-text, .1); } } .rui-sidebar-abtn { width: 100%; padding: .35rem .45rem; background-color: transparent; border-width: 0; display: inline-flex; justify-content: space-between; align-items: center; font-size: $font-size-sm; font-weight: $font-weight-medium; color: $drawer-nav-btn-text; .theme-dark & { color: $dm-body-color; border-color: $dm-border-color; } .rui-drawer-badge { padding: 0 5px; min-width: 20px; height: 20px; border-radius: $btn-border-radius; background-color: rgba($drawer-text, .09); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: $font-weight-medium; color: $drawer-text; .theme-dark & { background-color: $dm-gray-100; color: $dm-gray-700; } } &:hover, &[aria-expanded="true"] { background-color: $drawer-nav-btn-bg-hover; color: $drawer-nav-btn-text-hover; .theme-dark & { background-color: $primary-color-600; color: $primary-color-100; } .rui-sidebar-nav-icon { color: $drawer-nav-btn-icon-hover; .theme-dark & { color: $primary-color-100; } } } } .rui-course-menu-list--more { width: 100%; display: inline-flex; justify-content: space-between; align-items: center; margin: 0; padding: .35rem .5rem .35rem 1rem; border-radius: $border-radius; font-size: $font-size-xs; color: $drawer-nav-btn-text-light; text-align: right; svg { .dir-rtl & { transform: rotate(180deg); } } .theme-dark & { color: $dm-body-color; } &:hover { background-color: $drawer-nav-btn-bg-hover; color: $drawer-nav-btn-text-hover; text-decoration: none; .theme-dark & { background-color: $primary-color-600; color: $primary-color-100; } } } .rui-flatnavigation-sm { padding: 3px; .rui-sidebar-nav-icon svg { width: 18px; height: 18px; } .rui-list-group-item { padding-top: 3px; padding-bottom: 3px; font-size: $font-size-xs; color: $drawer-nav-btn-text-light; .theme-dark & { color: $dm-body-color-light; } } } .rui-nav-item-container { display: flex; align-items: flex-start; } .rui-nav-list-group { font-size: $font-size-sm; font-weight: $font-weight-medium; color: $drawer-nav-btn-text; .theme-dark & { color: $dm-body-color-secondary; } } .nav-drawer-header { background-color: $drawer-nav-container; position: sticky; top: 0; margin: -15px -15px 30px; padding: $drawer-padding-x $drawer-padding-x 0 $drawer-padding-x; z-index: $zindex-sticky; .theme-dark & { background-color: $dm-container-bg; } } .rui-custom-sidebar-content { font-size: $font-size-sm; color: $drawer-nav-btn-text; .theme-dark & { color: $dm-body-color-secondary; } } .btn-drawer { position: fixed; top: 69px; left: $topbar-padding-x; z-index: $zindex-fixed; display: flex; align-items: center; justify-content: center; padding: 0; width: 40px; height: 40px; background-color: $gray-100; border: 1px solid $gray-100; color: $gray-800; border-radius: $btn-border-radius; transition: all ease 350ms; @include media-breakpoint-down(md) { top: 70px; } &:hover { background-color: $primary-color-100; border-color: $primary-color-100; color: $primary-color-600; .theme-dark & { background-color: $primary-color-600; border-color: $primary-color-600; color: $primary-color-100; } } .drawer-open-left & { @include media-breakpoint-up(lmd) { left: $drawer-width + $topbar-padding-x; } } .drawer-courseindex--open &, .drawer-open-index--open & { display: none; } @include media-breakpoint-only(md) { left: 16px; right: auto; } @include media-breakpoint-between(xs, sm) { left: 10px; right: auto; } .theme-dark & { background-color: $black; border-color: $black; color: $dm-body-color; } } /* Space 2.5 */ #topbarLeft { opacity: 1; transform: $transition-base; } .drawer-courseindex--open, .drawer-open-index--open { .rui-drawer-toggle { display: none; opacity: .0; } } .rui-sidebar-filter { margin-bottom: 5px; border: 1px solid rgba($drawer-text, .1); border-radius: $border-radius; .theme-dark & { border-color: rgba($dm-drawer-text, .1); } }