update
This commit is contained in:
parent
232bf44850
commit
b763199510
|
|
@ -292,80 +292,103 @@
|
|||
}
|
||||
},
|
||||
|
||||
ClickMenuHandler: function() {
|
||||
// 處理主選單切換(漢堡 icon)
|
||||
$(document).on('click', '.navbar-toggle', function (e) {
|
||||
e.preventDefault();
|
||||
ClickMenuHandler: function() {
|
||||
// 處理主選單切換(漢堡 icon)
|
||||
$(document).on('click', '.navbar-toggle', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
// 確保 .navbar-toggle 放到 .modules-menu 後面
|
||||
$('.mobile-menu').each(function () {
|
||||
var $menu = $(this);
|
||||
if ($menu.find('.modules-menu').length && !$menu.find('.modules-menu + .navbar-toggle').length) {
|
||||
$menu.find('.modules-menu').after($menu.find('.navbar-toggle'));
|
||||
// 確保 .navbar-toggle 放到 .modules-menu 後面
|
||||
$('.mobile-menu').each(function () {
|
||||
var $menu = $(this);
|
||||
if ($menu.find('.modules-menu').length && !$menu.find('.modules-menu + .navbar-toggle').length) {
|
||||
$menu.find('.modules-menu').after($menu.find('.navbar-toggle'));
|
||||
}
|
||||
});
|
||||
|
||||
$('.mobile-menu').toggleClass('active');
|
||||
$('body').toggleClass('noscroll');
|
||||
|
||||
// ★ 修正:依據 active 狀態決定 collapsed 的加/移除
|
||||
if ($('.mobile-menu').hasClass('active')) {
|
||||
$('.mobile-menu .navbar-toggle').removeClass('collapsed'); // 打開 → 叉叉
|
||||
} else {
|
||||
$('.mobile-menu .navbar-toggle').addClass('collapsed'); // 關閉 → 三條橫線
|
||||
}
|
||||
|
||||
// 關閉所有下拉選單
|
||||
$('.mobile-menu1 > ul, .mobile-menu2 > ul').slideUp(500);
|
||||
$('.mobile-menu1 > .menu-drop, .mobile-menu2 > .menu-drop').removeClass('opened');
|
||||
|
||||
// 無障礙:聚焦第一個互動元素
|
||||
if ($('.mobile-menu').hasClass('active')) {
|
||||
setTimeout(function () {
|
||||
$('.modules-menu').find('input, button, select, textarea, a').first().focus();
|
||||
}, 100);
|
||||
}
|
||||
});
|
||||
|
||||
$('.mobile-menu').toggleClass('active');
|
||||
$('body').toggleClass('noscroll');
|
||||
$('.mobile-menu .navbar-toggle').removeClass('collapsed');
|
||||
|
||||
// 關閉所有下拉選單
|
||||
$('.mobile-menu1 > ul, .mobile-menu2 > ul').slideUp(500);
|
||||
$('.mobile-menu1 > .menu-drop, .mobile-menu2 > .menu-drop').removeClass('opened');
|
||||
|
||||
// 無障礙:聚焦第一個互動元素
|
||||
if ($('.mobile-menu').hasClass('active')) {
|
||||
setTimeout(function () {
|
||||
$('.modules-menu').find('input, button, select, textarea, a').first().focus();
|
||||
}, 100);
|
||||
}
|
||||
});
|
||||
// ✅ Tab 鍵跳過 .navbar-toggle 時,觸發與點擊相同的收合邏輯
|
||||
$(document).on('focusout', '.mobile-menu', function(e) {
|
||||
// ✅ Tab 鍵跳過 .mobile-menu 時,觸發收合邏輯
|
||||
$(document).on('focusout', '.mobile-menu', function(e) {
|
||||
setTimeout(function() {
|
||||
var $newFocus = $(document.activeElement);
|
||||
// 焦點已離開 .mobile-menu 且選單是展開狀態
|
||||
if ($('.mobile-menu').hasClass('active') && $newFocus.closest('.mobile-menu').length === 0) {
|
||||
// ✅ 直接 trigger click,與按下 .navbar-toggle 執行完全相同的動作
|
||||
$('.navbar-toggle').first().trigger('click');
|
||||
var $newFocus = $(document.activeElement);
|
||||
|
||||
// 焦點在 body 時代表滑鼠正在點擊中,不處理
|
||||
if ($newFocus.is('body')) return;
|
||||
|
||||
if ($('.mobile-menu').hasClass('active') && $newFocus.closest('.mobile-menu').length === 0) {
|
||||
|
||||
var $btn = $('.navbar-toggle').first();
|
||||
|
||||
if ($btn.attr('data-bs-toggle')) {
|
||||
var target = $btn.attr('data-bs-target');
|
||||
var bsCollapse = window.bootstrap && bootstrap.Collapse.getInstance($(target)[0]);
|
||||
if (bsCollapse) bsCollapse.hide();
|
||||
$('.mobile-menu').removeClass('active');
|
||||
$('body').removeClass('noscroll');
|
||||
$('.mobile-menu .navbar-toggle').addClass('collapsed');
|
||||
$('.mobile-menu1 > ul, .mobile-menu2 > ul').slideUp(500);
|
||||
$('.mobile-menu1 > .menu-drop, .mobile-menu2 > .menu-drop').removeClass('opened');
|
||||
} else {
|
||||
$btn.trigger('click');
|
||||
}
|
||||
}
|
||||
}, 50);
|
||||
});
|
||||
});
|
||||
|
||||
$('.mobile-menu1 > .menu-drop').click(function(){
|
||||
var $that = $(this);
|
||||
var opencheck1 = $that.hasClass('opened');
|
||||
if ( opencheck1 == 0 ) {
|
||||
$('.mobile-menu1 > ul').not($that.siblings('ul')).slideUp(500);
|
||||
$('.mobile-menu1 > .menu-drop').not($that).removeClass('opened');
|
||||
$('.mobile-menu2 > ul').slideUp(500);
|
||||
$('.mobile-menu2 > .menu-drop').removeClass('opened');
|
||||
$that.siblings('ul').slideDown(500);
|
||||
$that.addClass('opened');
|
||||
$('.mobile-menu1 > .menu-drop').click(function(){
|
||||
var $that = $(this);
|
||||
var opencheck1 = $that.hasClass('opened');
|
||||
if ( opencheck1 == 0 ) {
|
||||
$('.mobile-menu1 > ul').not($that.siblings('ul')).slideUp(500);
|
||||
$('.mobile-menu1 > .menu-drop').not($that).removeClass('opened');
|
||||
$('.mobile-menu2 > ul').slideUp(500);
|
||||
$('.mobile-menu2 > .menu-drop').removeClass('opened');
|
||||
$that.siblings('ul').slideDown(500);
|
||||
$that.addClass('opened');
|
||||
|
||||
} else if (opencheck1 == 1) {
|
||||
$that.siblings('ul').slideUp(500);
|
||||
$('.mobile-menu2 > ul').slideUp(500);
|
||||
$('.mobile-menu2 > .menu-drop').removeClass('opened');
|
||||
$that.removeClass('opened');
|
||||
} else if (opencheck1 == 1) {
|
||||
$that.siblings('ul').slideUp(500);
|
||||
$('.mobile-menu2 > ul').slideUp(500);
|
||||
$('.mobile-menu2 > .menu-drop').removeClass('opened');
|
||||
$that.removeClass('opened');
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
$('.mobile-menu2 > .menu-drop').click(function(){
|
||||
var $that = $(this);
|
||||
var opencheck2 = $that.hasClass('opened');
|
||||
if ( opencheck2 == 0 ) {
|
||||
$('.mobile-menu2 > ul').not($that.siblings('ul')).slideUp(500);
|
||||
$('.mobile-menu2 > .menu-drop').not($that).removeClass('opened');
|
||||
$that.siblings('ul').slideDown(500);
|
||||
$that.addClass('opened');
|
||||
} else if (opencheck2 == 1) {
|
||||
$that.siblings('ul').slideUp(500);
|
||||
$that.removeClass('opened');
|
||||
}
|
||||
})
|
||||
}
|
||||
$('.mobile-menu2 > .menu-drop').click(function(){
|
||||
var $that = $(this);
|
||||
var opencheck2 = $that.hasClass('opened');
|
||||
if ( opencheck2 == 0 ) {
|
||||
$('.mobile-menu2 > ul').not($that.siblings('ul')).slideUp(500);
|
||||
$('.mobile-menu2 > .menu-drop').not($that).removeClass('opened');
|
||||
$that.siblings('ul').slideDown(500);
|
||||
$that.addClass('opened');
|
||||
} else if (opencheck2 == 1) {
|
||||
$that.siblings('ul').slideUp(500);
|
||||
$that.removeClass('opened');
|
||||
}
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
// 把orbit物件加到window物件裡面並改名為ORBITFRONT來減少名稱衝突的機會
|
||||
|
|
@ -2141,8 +2164,7 @@ $(document).ready(function () {
|
|||
$(document).on('click touchstart', function (e) {
|
||||
if (
|
||||
!$searchBox.is(e.target) &&
|
||||
$searchBox.has(e.target).length === 0 &&
|
||||
!$input.val().trim()
|
||||
$searchBox.has(e.target).length === 0
|
||||
) {
|
||||
$searchBox.removeClass('searching');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
font-family: "Font Awesome 6 Free", FontAwesome !important;
|
||||
}
|
||||
.fa-classic, .fa-regular, .fa-solid, .far, .fas ,.fa{
|
||||
font-family: var(--fa-style-family, "FontAwesome");
|
||||
font-family: "FontAwesome";
|
||||
}
|
||||
#orbit-bar .orbit-bar-inner > label:focus, #orbit-bar .orbit-bar-inner > label.focus{
|
||||
.orbit-bar-search-sign-language{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
@charset "utf-8";
|
||||
|
||||
@import "../initial";
|
||||
.line-it-button{
|
||||
.label{
|
||||
color: #333!important;
|
||||
}
|
||||
}
|
||||
.col-lg-1, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-md-1, .col-md-10, .col-md-11, .col-md-12, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-sm-1, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-xs-1, .col-xs-10, .col-xs-11, .col-xs-12, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9{
|
||||
@media(max-width: $screen-xs){
|
||||
padding: 0;
|
||||
|
|
|
|||
|
|
@ -30,9 +30,11 @@ ul.button-mid{
|
|||
}
|
||||
}
|
||||
}
|
||||
ul.button-mid{
|
||||
margin:0;
|
||||
z-index: 201;
|
||||
.button-mid {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
top: 50%;
|
||||
}
|
||||
.banner-pager .active-slide button{
|
||||
background: $theme-color-second!important;
|
||||
|
|
|
|||
|
|
@ -2595,12 +2595,6 @@
|
|||
.i-annc__entry-title {
|
||||
margin-bottom: 0;
|
||||
margin-top: 0;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
// clear: both;
|
||||
}
|
||||
|
||||
.i-annc__title {
|
||||
|
|
@ -2608,6 +2602,11 @@
|
|||
color: $theme-color-main;
|
||||
text-decoration: none;
|
||||
@extend .i-title;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
&:hover {
|
||||
color: $theme-color-second;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,9 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
<ul class="w-ba-banner__pager-2 banner-pager banner_caption_{{subpart-id}}"></ul>
|
||||
<div class="w-ad-banner__pager-2 w-ba-banner__caption banner-pager banner_caption_{{subpart-id}}" data-list="images" data-level="0">
|
||||
<li><button title="Slide {{slide_number}}" aria-label="Pager"><span style="display: none;">Slide {{slide_number}}</span></button></li>
|
||||
</div>
|
||||
<ul class="controlplay" role="radiogroup" aria-label="播放控制選項">
|
||||
<a role="radio" aria-checked="true" href="javascript:;" class="resume-slide active" title="繼續播放" aria-label="繼續播放" aria-live="assertive">
|
||||
<i aria-hidden="true"></i>
|
||||
|
|
|
|||
Loading…
Reference in New Issue