'menu'
This commit is contained in:
parent
718f665d89
commit
bcd65bd164
|
|
@ -1137,9 +1137,9 @@ $(document).ready(function () {
|
|||
$('.searchclass').appendTo('.header-nav');
|
||||
}
|
||||
} else {
|
||||
if (!$('.navbar-header .searchclass').length) {
|
||||
|
||||
$('.navbar-brand').after($('.searchclass'));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1569,6 +1569,31 @@ $(document).ready(function () {
|
|||
$(this).find('span').text(selectedText + '(已選取)');
|
||||
});
|
||||
});
|
||||
//選單li加上fa-chevron-down
|
||||
$(document).ready(function () {
|
||||
function addDropdownIcons() {
|
||||
if ($(window).width() > 769) {
|
||||
$('#main-nav.modules-menu-level-0 > li').each(function () {
|
||||
if ($(this).children('ul').length > 0) {
|
||||
const $toggle = $(this).children('a.dropdown-toggle');
|
||||
if ($toggle.find('i.fa-chevron-down').length === 0) {
|
||||
$toggle.append(' <i class="kenmenu-drop fa-solid fa-chevron-down"></i>');
|
||||
}
|
||||
}
|
||||
});
|
||||
}else {
|
||||
// 螢幕寬度小於等於 768 時,移除所有 chevron-down icon
|
||||
$('#main-nav.modules-menu-level-0 .kenmenu-drop').remove();
|
||||
}
|
||||
}
|
||||
|
||||
addDropdownIcons();
|
||||
|
||||
$(window).resize(function () {
|
||||
addDropdownIcons();
|
||||
});
|
||||
});
|
||||
|
||||
// //選單樣式2
|
||||
// $(document).ready(function() {
|
||||
// "use strict";
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
}
|
||||
@media(max-width: 767px) {
|
||||
.modules-menu .modules-menu-level-0>li { margin: 0; }
|
||||
.modules-menu .modules-menu-level-0>li:hover { background: transparent; }
|
||||
}
|
||||
|
||||
@media(max-width: $screen-xs) {
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@
|
|||
background-color: #fff;
|
||||
position: relative;
|
||||
padding:0;
|
||||
@media(max-width:768px){
|
||||
padding: 0.5em 0;
|
||||
}
|
||||
}
|
||||
.header-nav {
|
||||
display: flex !important;
|
||||
|
|
|
|||
|
|
@ -165,11 +165,14 @@
|
|||
|
||||
|
||||
|
||||
.modules-menu{
|
||||
#layout-navigation{
|
||||
background-color: $theme-color-second;
|
||||
// border-top: 5px solid #9f9f9fcc;
|
||||
}
|
||||
|
||||
.kenmenu-drop{
|
||||
padding-left: 0.5em;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
#layout-navigation{
|
||||
@media(min-width: 769px){
|
||||
|
|
@ -249,7 +252,7 @@
|
|||
border-radius: 0.13em;
|
||||
top: 2em;
|
||||
@media(max-width: 769px){
|
||||
top: 1em;
|
||||
top: 0.5em;
|
||||
font-size: 1em;
|
||||
}
|
||||
}
|
||||
|
|
@ -266,14 +269,15 @@
|
|||
list-style: none;
|
||||
position:relative;
|
||||
margin: 0;
|
||||
padding: 0.5em;
|
||||
border-bottom: 0.0625em solid lighten($theme-gray, 5%);
|
||||
padding:0;
|
||||
// border-bottom: 0.0625em solid lighten($theme-gray, 5%);
|
||||
|
||||
& > a {
|
||||
display: block;
|
||||
padding: 1em;
|
||||
font-family: $main-font;
|
||||
font-size: 1.1em;
|
||||
color: #fff;
|
||||
&:after{
|
||||
content:'';
|
||||
position:absolute;
|
||||
|
|
@ -291,7 +295,7 @@
|
|||
bottom:0;
|
||||
}
|
||||
&.active {
|
||||
color: $theme-color-second;
|
||||
color: #fff;
|
||||
background: none;
|
||||
&:after{
|
||||
width:100%;
|
||||
|
|
@ -301,9 +305,9 @@
|
|||
}
|
||||
|
||||
&:hover {
|
||||
background: rgba(darken($theme-color-second, 10%), 1);
|
||||
& > a {
|
||||
// color: $theme-color-second;
|
||||
background: rgba(darken($theme-color-second, 10%), 1);
|
||||
box-shadow:none;
|
||||
&:after{
|
||||
width:100%;
|
||||
|
|
@ -531,10 +535,13 @@
|
|||
width: 80%;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
background: #ffffff;
|
||||
background:$theme-color-second;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
padding-top: 40px;
|
||||
color: #fff;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
.modules-menu .modules-menu-level-0 > li > a, .modules-menu .modules-menu-level-0 ,.modules-menu .modules-menu-level-0 > li {
|
||||
font-weight:bold;
|
||||
|
|
|
|||
Loading…
Reference in New Issue