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

375 lines
7.5 KiB
SCSS

@charset "utf-8";
@import "../initial";
.navbar-collapse.in {
overflow-y: unset;
}
.modules-menu {
font-family: $sub-font;
max-height: none;
z-index: 1020;
li {
white-space: nowrap;
}
.menu-drop.opened {
transform: rotateX(180deg);
}
.modules-menu-level-0 {
margin: 0 0 0.5em 0;
padding-top: 25px;
list-style: none;
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: space-around;
.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: 0.5em;
// right: 0.3em;
// width: 2.5em;
// height: 2.5em;
// cursor: pointer;
// line-height: 2.5em;
// font-size: 1em;
// text-align: center;
// border-radius: 0.13em;
// }
.menu-drop {
position: absolute;
top: 0.5em;
right: 0.3em;
width: 2.5em;
height: 2.5em;
cursor: pointer;
line-height: 2.5em;
font-size: 1em;
text-align: center;
border-radius: 0.13em;
}
// .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;
margin: 0;
padding: 0 1em;
border-bottom: 0.0625em solid lighten($theme-gray, 5%);
& > a {
display: block;
padding: 1.125em 0;
font-family: $main-font;
}
&:hover {
// background-color: $theme-color-second;
// border-radius: 0.5em;
& > a {
color: #4e55c0;
}
@media (min-width: $screen-sm) {
// background-color: $theme-color-second;
// border-radius: 0.5em;
}
}
@media (min-width: $screen-sm) {
position: relative;
margin: 0;
padding: 0;
border-bottom: none;
&:first-child {
margin-left: 0;
}
&:last-child {
margin-right: 0;
.modules-menu-level-1 {
left: auto;
&:before {
right: 0.625em;
left: auto;
}
& > li {
padding-right: 1em;
padding-left: 1em;
& > a {
padding-left: 0;
}
}
.modules-menu-level-2 {
right: 100%;
left: auto;
}
}
}
& > a {
padding: 0.5rem;
color: $theme-color-main;
font-size: 17px;
}
&:hover {
.modules-menu-level-1 {
top: 63px;
opacity: 1;
transition: all 0.35s ease-in-out;
-moz-transition: all 0.35s ease-in-out;
-webkit-transition: all 0.35s ease-in-out;
}
}
}
}
}
@media (min-width: $screen-sm) {
.modules-menu-level-1 {
opacity: 0;
visibility: hidden;
}
.nav-level-0>li:hover .modules-menu-level-1{
visibility: visible;
}
.nav-level-0>li:hover>a{
padding-bottom: 2em;
}
.nav-level-0>li:hover{
margin-bottom: -2em;
}
}
.modules-menu-level-1 {
min-width: 100%;
margin: 0;
padding: 0;
background-color:#cdcdcd;
list-style: none;
z-index: 1;
box-shadow: 0 2px 4px #0000004d;
-moz-box-shadow: 0 2px 4px #0000004d;
-webkit-box-shadow: 0 2px 4px #0000004d;
// transition: all 0.35s ease-in-out;
// -moz-transition: all 0.35s ease-in-out;
// -webkit-transition: all 0.35s ease-in-out;
filter: alpha(opacity=0);
top: 100px;
& > li {
position: relative;
& + li {
border-top: 0.0625em solid lighten($theme-gray, 5%);
}
& > a {
display: block;
padding: 1em 1.5em;
font-family: $main-font;
font-size: 0.938em;
color: #000;
font-weight: 600;
@media(max-width: $screen-xs){
font-weight:initial;
}
}
&:hover {
background: #efefef;
border-bottom: 1px solid rgba(0,0,0,.3);
transition: all 0.5s;
-moz-transition: all 0.5s;
-webkit-transition: all 0.5s;
& > a {
color: $theme-color-main;
}
}
}
@media(max-width: $screen-xs){
box-shadow:none;
}
@media (min-width: $screen-sm) {
position: absolute;
& > li {
padding-right: 2em;
border-bottom: 1px solid #00000033;
box-shadow: inset 0 -1px 0 #ffffffb3;
-moz-box-shadow: inset 0 -1px 0 #ffffffb3;
-webkit-box-shadow: inset 0 -1px 0 #ffffffb3;
& > a {
padding-left: 1em;
text-shadow: 1px 1px 0 #ffffffb3;
}
&:hover {
.modules-menu-level-2 {
display: block;
}
}
}
}
}
.modules-menu-level-2 {
display: none;
margin: 0;
padding: 0;
background-color: $theme-gray;
list-style: none;
& > li {
& + li {
border-top: 0.0625em solid lighten($theme-gray, 5%);
}
& > a {
display: block;
padding: 0.9em 3em;
font-family: $main-font;
color: #fff;
}
&:hover {
background-color: $theme-color-second;
}
}
@media (min-width: $screen-sm) {
position: absolute;
top: 0;
left: 100%;
& > li > a {
padding-left: 1em;
}
}
}
}
.has-mobile-dropdown {
.modules-menu {
.dropdown-toggle-icon {
display: block;
}
}
}
@media (max-width: 767px) {
.modules-menu .modules-menu-level-0 {
flex-direction: column;
}
}
//mobile
.mobile-menu {
z-index: 1051;
width: 100vw;
position: fixed;
top: 0;
right: 0;
bottom: 0;
display: none;
&.active {
display: block;
}
.modules-menu {
width: 80%;
position: absolute;
right: 0;
background: #cdcdcd;
height: 100%;
top: 0;
padding-top: 40px;
}
.modules-menu .modules-menu-level-0 > li > a, .modules-menu .modules-menu-level-0 .menu-drop,.modules-menu .modules-menu-level-0 > li { color: #000000cc; }
.navbar-toggle {
position: absolute;
left: 0;
background: transparent;
top: 40px;
z-index: 1;
height: 100vh;
margin: 0;
width: 20%;
border: 0;
}
.cover {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: rgba(0,0,0,0.8);
z-index: 0;
}
}
//覆蓋bootstrap nav設定
.mobile-menu .modules-menu.collapsing {
overflow:unset !important;
transform: translateX(100%);
-webkit-transition-timing-function:ease;
-o-transition-timing-function:ease;
transition-timing-function:ease;
-webkit-transition-duration:.35s;
-o-transition-duration:.35s;
transition-duration:.35s;
-webkit-transition-property:transform;
-o-transition-property:transform;
transition-property:transform;
}
.mobile-menu .modules-menu.collapse.in {
transform: translateX(100%);
-webkit-transition-timing-function:ease;
-o-transition-timing-function:ease;
transition-timing-function:ease;
-webkit-transition-duration:.35s;
-o-transition-duration:.35s;
transition-duration:.35s;
-webkit-transition-property:transform;
-o-transition-property:transform;
transition-property:transform;
}
.mobile-menu .collapse.navbar-collapse.modules-menu {
overflow-y: scroll;
transform: translateX(0%);
}