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

280 lines
4.6 KiB
SCSS
Raw Normal View History

2021-04-19 03:12:43 +00:00
@charset "utf-8";
@import "../initial";
.modules-menu {
overflow: hidden;
font-family: $sub-font;
font-size: $font-13;
max-height: none;
padding: 0;
margin: auto;
font-weight: 300;
border: none;
box-shadow: none;
li {
white-space: nowrap;
& > a,
& > .fa {
color: $theme-white;
}
&:hover {
& > a,
& > .fa {
color: $theme-white;
text-decoration: none;
}
}
}
.modules-menu-level-0 {
margin: 0;
padding: 0;
list-style: none;
float: none;
.has-dropdown.level-1.active {
.modules-menu-level-1 {
display: block;
}
}
.has-dropdown.level-2.active {
.modules-menu-level-2 {
display: block;
}
}
.dropdown-toggle-icon {
position: absolute;
top: -10px;
right: -12px;
width: 40px;
cursor: pointer;
line-height: 40px;
font-size: 1em;
text-align: center;
border-radius: 2px;
z-index: 1;
}
// .dropdown-toggle-icon.level-1 {
// background-color: lighten($theme-gray, 10%);
// }
// .dropdown-toggle-icon.level-2 {
// background-color: lighten($theme-gray, 10%);
// }
& > li {
position: relative;
padding: 0;
float: none;
margin: 1.5em 0;
& > a {
display: block;
padding: 0;
text-align: center;
position: relative;
z-index: 0;
}
&:hover > a {
color: $theme-color-main;
}
@media (min-width: $screen-sm) {
.modules-menu-level-1 {
top: 0;
right: -120%;
left: auto;
@media (min-width: $screen-md) {
right: -90%;
}
& > li {
& > a {
padding-left: 0;
}
}
.modules-menu-level-2 {
right: 100%;
left: auto;
}
}
& > a {
padding: 0;
margin: .5em auto;
text-align: center;
}
& > .fa {
position: static;
@include size(auto, auto);
padding: 0;
line-height: 1;
font-size: 1em;
cursor: default;
}
&:hover {
& > a {
}
.modules-menu-level-1 {
display: block;
}
}
}
}
}
.modules-menu-level-1 {
display: none;
min-width: 100%;
padding: 0;
background-color: $theme-gray-dark;
list-style: none;
z-index: 1;
box-shadow: 0 0 8px rgba(black,.6);
& > li {
position: relative;
padding: .8em 30px;
&:first-child{
padding-top: 1.5em;
}
&:last-child{
padding-bottom: 1.5em;
}
& > a {
display: block;
@media(max-width:$screen-sm) {
text-align: center;
}
}
&:hover {
background-color: lighten($theme-gray-darker, 5%);
& > a,
& > .fa {
color: $theme-white;
}
}
}
@media (min-width: $screen-sm) {
position: absolute;
left: 15px;
margin-top: -0.5rem;
& > li {
& > a {
padding-left: 15px;
}
& > .fa {
position: static;
@include size(auto, auto);
padding: 0;
margin-right: 0;
line-height: 1;
float: none;
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 {
& > a {
display: block;
padding: 15px 50px;
}
&:hover {
background-color: lighten($theme-gray-darker, 10%);
& > a {
color: $theme-white;
}
}
}
@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 {
font-weight: 300;
content: "\f105";
}
}
}
}
}
.has-mobile-dropdown {
.modules-menu {
.dropdown-toggle-icon {
display: block;
}
}
}