ydu_confs_rwd/assets/stylesheets/template/modules/menu.scss

221 lines
4.8 KiB
SCSS
Raw Normal View History

2023-07-17 03:48:05 +00:00
.modules-menu {
max-height: none;
li {
white-space: nowrap;
& > a, & > .fa {
color: #ffffff;
}
&:hover {
& > a, & > .fa {
color: $brand-primary;
text-decoration: none;
}
}
}
.modules-menu-level-0 {
margin: 0;
padding: 0;
list-style: none;
& > li {
margin: 0 -15px;
padding: 0 15px;
border-bottom: 1px solid lighten($theme-gray, 5%);
& > a {
display: inline-block;
padding: 1rem 0;
}
& > .fa {
position: absolute;
right: 10px;
@include size(45px, 45px);
cursor: pointer;
line-height: 45px;
font-size: 1.5em;
text-align: center;
}
&:hover {
& > a {
background-color: transparent;
}
}
@media (min-width: $screen-sm) {
position: relative;
margin: 0 10px;
padding: 0;
border-bottom: none;
&:first-child {
margin-left: 0;
}
&:last-child {
margin-right: 0;
.modules-menu-level-1 {
right: 15px;
left: auto;
&:before {
right: 10px;
left: auto;
}
& > li {
padding-right: 15px;
padding-left: 15px;
& > a {
padding-left: 0;
}
}
.modules-menu-level-2 {
right: 100%;
left: auto;
&:before {
right: -6px;
left: auto;
@include arrow('left', 6px, 6px, $theme-gray-darker);
}
}
}
}
& > a {
padding: 2rem 0;
border-bottom: 0.5rem solid transparent;
}
& > .fa {
position: static;
@include size(auto, auto);
padding: 0;
line-height: 1;
font-size: 1em;
cursor: default;
}
&:hover {
& > a {
padding: 2rem 0;
border-bottom-color: $brand-primary;
}
.modules-menu-level-1 {
display: block;
}
}
}
}
}
.modules-menu-level-1 {
display: none;
min-width: 100%;
margin: 0 -15px;
padding: 0;
background-color: $theme-gray-dark;
list-style: none;
z-index: 1;
& > li {
position: relative;
& + li {
border-top: 1px solid lighten($theme-gray-dark, 5%);
}
& > a {
display: inline-block;
padding: 0.7em 0 0.7em 30px;
}
& > .fa {
position: absolute;
right: 15px;
@include size(38px, 38px);
line-height: 38px;
font-size: 1.2em;
text-align: center;
cursor: pointer;
}
&:hover {
background-color: darken($brand-primary, 10%);
& > a, & > .fa {
color: #FFF;
}
}
}
@media (min-width: $screen-sm) {
position: absolute;
left: 15px;
margin-top: -0.5rem;
border-top: 0.5rem solid $brand-primary;
&:before {
content: "";
display: block;
position: absolute;
top: -16px;
left: 10px;
@include arrow('bottom', 10px, 8px, $brand-primary);
}
& > li {
padding-right: 30px;
& > a {
padding-left: 15px;
}
& > .fa {
position: static;
@include size(auto, auto);
padding: 0;
margin-right: 0;
line-height: 1;
float: none;
font-size: 1em;
cursor: default;
}
&:hover {
.modules-menu-level-2 {
display: block;
}
}
}
.fa {
&:before {
content: "\f105";
}
}
}
}
.modules-menu-level-2 {
display: none;
margin: 0;
padding: 0;
background-color: $theme-gray-darker;
list-style: none;
& > li {
& + li {
border-top: 1px solid lighten($theme-gray-darker, 5%);
}
& > a {
display: inline-block;
padding: 0.5em 0 0.5em 45px;
}
&:hover {
background-color: darken($brand-primary, 20%);
& > a {
color: #FFF;
}
}
}
@media (min-width: $screen-sm) {
position: absolute;
top: 0;
left: 100%;
&:before {
content: "";
display: block;
position: absolute;
top: 13px;
left: -6px;
@include arrow('right', 6px, 6px, $theme-gray-darker);
}
& > li {
padding-right: 15px;
& > a {
padding-left: 15px;
padding: 0.7em 0 0.7em 15px;
}
}
.fa {
&:before {
content: "\f105";
}
}
}
}
}