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

540 lines
11 KiB
SCSS

@charset "utf-8";
@import "../initial";
//固定選單
.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;
}
#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 {
white-space: nowrap;
list-style: none;
@media(max-width: 768px){
padding: 1em;
}
}
.menu-drop.opened {
transform: rotateX(180deg);
}
.modules-menu-level-0 {
width: 100%;
padding: 0;
@media (min-width:769px) {
margin: 0 0 0.8em 0;
-webkit-flex-flow: row wrap;
list-style: none;
float: left !important;
padding-top: 10px;
display: flex;
width: 100%;
justify-content: start;
padding-left: 0;
padding-left: 6em;
padding-right: 3em;
}
.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: 768px){
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%);
i{
color: #fff;
@media(max-width: 768px){
color: $theme-color-main;
}
}
& > a {
display: block;
padding: 1.125em 0;
font-family: $main-font;
font-size: 1.1em;
color: #fff;
@media(max-width: 768px){
color: $theme-color-main;
}
&: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 {
text-decoration: revert;
background: none;
&:after{
width:100%;
transition: all 0.3s;
}
}
}
&:hover {
& > a {
text-decoration: revert;
background: transparent;
box-shadow:none;
&:after{
width:100%;
transition: all 0.3s;
}
}
@media (min-width: $screen-sm) {
// background-text-decoration: revert;
// border-radius: 0.5em;
}
}
@media (min-width: $screen-sm) {
margin: 0;
padding: 0;
border-bottom: none;
width: 30%;
&:first-child {
margin-left: 0;
}
&:last-child {
margin-right: 0;
.modules-menu-level-1 {
left: auto;
&:before {
right: 0.625em;
left: auto;
}
& > li {
& > a {
padding-left: 0;
}
}
.modules-menu-level-2 {
right: 100%;
left: auto;
}
}
}
& > a {
font-size:1.2em;
color:#fff;
font-weight: 900;
position: relative;
border-bottom: 2px solid #f8f9fa;
margin-right: 1em;
}
&: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 {
list-style: none;
z-index: 1;
padding:0;
left: auto;
@media(min-width:769px){
display: block !important;
margin:0;
transition-duration: 0.5s;
padding-right: 1em;
& > a {
padding: 1em 1.5em;
}
}
& > li {
position: relative;
padding-top: 1em;
padding-left: 0;
list-style: none;
// & + li {
// border-top: 0.0625em solid lighten($theme-gray, 5%);
// }
& > a {
display: block;
font-family: $main-font;
font-weight: 600;
color: #fff;
font-size: 1.1em;
@media(max-width: 768px){
color: $theme-color-main;
}
}
&:hover {
// background-text-decoration: revert;
& > a {
text-decoration: revert;
}
}
}
@media (min-width: $screen-sm) {
& > li {
& > a {
padding:0;
}
&:hover {
.modules-menu-level-2 {
}
}
}
}
}
.modules-menu-level-2 {
margin: 0;
padding: 0;
list-style: none;
& > li {
& + li {
list-style: none;
// border-top: 0.0625em solid lighten($theme-gray, 5%);
}
& > a {
display: block;
color:#fff;
font-weight: 500;
font-weight: bold;
padding-top: 1em;
@media(max-width: 768px){
color: $theme-color-main;
}
}
&:hover {
a{
transition: all 0.3s ease-in-out;
text-decoration: revert;
margin-left: 0.5rem;
}
}
}
@media (min-width: $screen-sm) {
}
}
}
.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;
}
}
.navbar-toggle{
@media(min-width: 769px){
margin-top: 1em;
right:6%;
position: absolute;
display: block;
}
}
//mobile
.mobile-menu {
z-index: 1051;
width: 100vw;
position: fixed;
top: 0;
right: 0;
bottom: 0;
display: none;
&.active {
display: block;
}
.modules-menu {
width: 100%;
position: absolute;
right: 0;
background: #222222a6;
height: 100%;
top: 40px;
padding-top: 0;
@media(max-width: 768px){
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{
font-size: 10px ;
}
.navbar-toggle {
@media(max-width: 768px){
display: block!important;
position: absolute;
left: 0;
background: transparent;
top: 40px;
z-index: 1;
height: 100vh;
margin: 0;
width: 20%;
border: 0;
}
@media(min-width: 769px){
position: absolute;
right: 3%;
background: transparent;
top: 3.5em;
z-index: 11111;
height: 40px;
margin: 0;
border: 0;
-webkit-transition: -webkit-transform 0.3s;
transition: -webkit-transform 0.3s;
transition: transform 0.3s;
transition: transform 0.3s, -webkit-transform 0.3s;
}
}
.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 {
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: 768px){
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-size: 3px;
font-weight: 100!important;
}
.show{
opacity: 1!important;
display: block!important;
visibility: visible!important;
}
.mobile-menu .collapse.navbar-collapse.modules-menu{
@media(min-width: 769px){
// overflow-y: scroll !important;
height: 100% !important;
padding: 0;
}
}
.mobile-menu1{
@media(min-width: 769px){
&>.menu-drop{
display: none;
}
}
}
.navbar-toggle0{
@media(min-width: 769px){
position: absolute;
right: 0;
.navbar-toggle{
transform: translateX(-100%);
}
}
}