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

619 lines
12 KiB
SCSS

@charset "utf-8";
@import "../initial";
// // 選單樣式2
// .modules-menu{
// @media (min-width: $screen-sm){
// li{
// padding-left: 0!important;
// }
// .modules-menu-level-1 > li > a{
// color: $theme-color-second!important;
// }
// }
// .modules-menu-level-0 > li{
// @media (min-width: $screen-sm){
// position: static!important;
// }
// }
//
// .modules-menu-level-1{
//
// @media (min-width: $screen-sm){
// min-width:unset;
// flex-wrap: wrap;
// justify-content: flex-start;
// left:0!important;
// display: flex!important;
// visibility: hidden;
// opacity: 0;
// width: 100vw!important;
// box-shadow: 2px 2px 5px #00000033;
// margin:0;
// padding:1em 13% 3em!important;
// transition-duration: 0.5s;
// background: #f0f0f0;
// }
// }
// .modules-menu-level-0 > li:hover .modules-menu-level-1, .modules-menu .modules-menu-level-0 > li.hover-class .modules-menu-level-1{
// visibility: visible!important;
// opacity: 1!important;
// }
//
// .modules-menu-level-2 {
// right:auto!important;
// display: block;
// top: auto!important;
// left: auto!important;
// background-color: transparent!important;
// position: relative!important;
// }
// .modules-menu-level-1{
// @media (min-width: $screen-sm) {
// & > li {
// width: 25%;
// & > a {
// padding-left: 1em;
// padding: 5px 0;
// }
//
// &:hover {
// .modules-menu-level-2 {
// display: block;
// }
// }
// }
// .modules-menu-level-2{
// display: block;
// }
// }
// }
// }
//固定選單
.navFixed {
.header-nav{
display: none!important;
-webkit-transition: all .3s ease;
-moz-transition: all .3s ease;
-ms-transition: all .3s ease;
-o-transition: all .3s ease;
transition: all .3s ease;
}
z-index: 10;
position: fixed;
left: 0;
top:0;
margin-top: 0;
min-width: 100%;
-webkit-backdrop-filter: saturate(180%) blur(20px);
backdrop-filter: saturate(180%) blur(20px);
background-color: #ffffffd9;
-webkit-transition: all .3s ease;
-moz-transition: all .3s ease;
-ms-transition: all .3s ease;
-o-transition: all .3s ease;
transition: all .3s ease;
}
// //直式選單更改css
// .navbar-brand{
// h1{
// @media(min-width: 769px){
// margin-top:0.5em;
// }
// }
// }
// #layout-navigation{
// @media(min-width: 769px){
// position: absolute;
// width: 20%!important;
// left: 0;
// background-color: #fff;
// margin-top: 5em;
// padding-right: 0;
// #main-nav{
// padding: 0;
// }
// .modules-menu-level-0{
// width: 100%!important;
// }
// .modules-menu-level-0 > li{
// width: 100%;
// }
// .modules-menu-level-1{
// min-width: 100%;
// left: 100%;
// top: 0;
// }
// }
// }
// .verticalhome{
// .layout-content{
// @media(min-width: 769px){
// float: right!important;
// width: 80%!important;
// }
// }
// }
// .homebanner{
// @media(min-width: 769px){
// float: right!important;
// width: 80%!important;
// .ba-banner-widget-0 img{
// transform: none!important;
// }
// }
// }
// .container{
// @media(min-width: 1200px){
// width: 95%!important;
// max-width: unset!important;
// }
// }
// .layout-header .navbar-header .navbar-brand{
// @media(min-width: 1200px){
// padding-left: 0;
// }
// }
#layout-navigation{
@media(min-width: 769px){
width: 100%;
}
}
.navbar-collapse.in {
overflow-y: unset;
}
.modules-menu {
font-family: $sub-font;
max-height: none;
z-index: 1020;
li {
padding: 1em;
list-style: none;
}
.menu-drop.opened {
transform: rotateX(180deg);
}
.modules-menu-level-0 {
width: 100%;
padding: 0;
@media (min-width:769px)and(max-width: 1025px){
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding: 0;
width: 100%;
}
@media (min-width: 1025px) {
margin: 0;
padding: 2em 0 0;
list-style: none;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
width: 70%;
}
.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;
right: 0.3em;
width: 2.5em;
height: 2.5em;
cursor: pointer;
line-height: 2.5em;
font-size: 0.5em;
text-align: center;
border-radius: 0.13em;
top: 2em;
@media(max-width: 769px){
top: 1em;
font-size: 1em;
}
}
// .dropdown-toggle-icon.level-1 {
// background-color: lighten($theme-gray, 10%);
// }
// .dropdown-toggle-icon.level-2 {
// background-color: lighten($theme-gray, 10%);
// }
& > li {
list-style: none;
position:relative;
margin: 0;
padding: 0.5em;
border-bottom: 0.0625em solid lighten($theme-gray, 5%);
& > a {
display: block;
padding: 1em 0.1em;
font-family: $main-font;
font-size: 1.1em;
&:after{
content:'';
position:absolute;
top:0;
right:0;
height:3px;
width:0;
background: $theme-color-second;
transition: all 0.3s;
}
&:after{
right:inherit;
top:inherit;
left:0;
bottom:0;
}
&.active {
color: $theme-color-second;
background: none;
&:after{
width:100%;
transition: all 0.3s;
}
}
}
&:hover {
& > a {
color: $theme-color-second;
background: transparent;
box-shadow:none;
&:after{
width:100%;
transition: all 0.3s;
}
}
@media (min-width: $screen-sm) {
// background-color: $theme-color-second;
// border-radius: 0.5em;
}
}
@media (min-width: $screen-sm) {
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 {
font-size:1.1em;
color:#686868;
font-weight: bold;
position: relative;
}
&:hover {
.modules-menu-level-1 {
display: block;
transition-duration: opacity 0.3s cubic-bezier(0.48, 0.01, 0.5, 0.99),visibility 0.1s linear;
}
}
}
}
}
.modules-menu-level-1 {
display: none;
list-style: none;
z-index: 1;
padding:0;
left: auto;
@media(min-width:769px){
min-width: 180px;
width:fit-content;
box-shadow: 2px 2px 5px #00000033;
margin:0;
transition-duration: 0.5s;
background: #f0f0f0;
& > a {
padding: 1em 1.5em;
}
}
& > li {
position: relative;
padding: 1em;
// & + li {
// border-top: 0.0625em solid lighten($theme-gray, 5%);
// }
& > a {
display: block;
font-family: $main-font;
font-weight: 600;
color: #686868;
font-size: 1.1em;
}
&:hover {
background-color: $theme-color-second;
@media(max-width: 769px){
a,i {
color: #fff;
}
}
&>a {
color: #fff;
}
}
}
@media (min-width: $screen-sm) {
position: absolute;
& > li {
& > a {
padding:0;
}
&:hover {
.modules-menu-level-2 {
display: block;
position: absolute;
}
}
}
}
}
.modules-menu-level-2 {
margin: 0;
padding: 0;
list-style: none;
display: none;
& > li {
& + li {
// border-top: 0.0625em solid lighten($theme-gray, 5%);
}
& > a {
display: block;
font-family: $main-font;
color:#686868;
font-weight: 500;
font-weight: bold;
}
&:hover {
a{
transition: all 0.3s ease-in-out;
color: $theme-color-second;
margin-left: 0.5rem;
}
}
}
@media (min-width: $screen-sm) {
top: 0;
left: 100%;
background-color: #dbdbdb;
position: absolute;
min-width: 150px;
}
}
}
.has-mobile-dropdown {
.modules-menu {
.dropdown-toggle-icon {
display: block;
}
}
}
@media (max-width: 767px) {
.modules-menu .modules-menu-level-0 {
flex-direction: column;
width: 100%;
padding: 0;
}
}
@media (max-width: 769px) {
.modules-menu .modules-menu-level-0 {
width: 100%;
padding: 0;
}
}
//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: #ffffff;
height: 100%;
top: 0;
padding-top: 40px;
}
.modules-menu .modules-menu-level-0 > li > a, .modules-menu .modules-menu-level-0 ,.modules-menu .modules-menu-level-0 > li {
font-weight:bold;
}
.menu-drop{
}
.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%);
}
.display-on{
display:block!important;
transition-duration: 0.9s;
}
.drop-down > a:after{
content:"\f103";
color:#fff;
font-family: FontAwesome;
font-style: normal;
margin-left: 5px;
}
.dropdown-arrow{
align-self: center;
margin-left: 10px;
z-index: 999;
@media(max-width: 769px){
position: absolute;
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;
display: none!important;
}
}
.fa-chevron-right{
align-self: center;
margin-left: 10px;
font-weight: 100!important;
}
.show{
opacity: 1!important;
display: block!important;
visibility: visible!important;
}
.mobile-menu2{
&>a{
padding-right: 1em;
}
.menu-drop{
top: 0.6em!important;
}
}