This commit is contained in:
parent
6bf537f131
commit
9f5d01dbcd
|
|
@ -292,80 +292,103 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
ClickMenuHandler: function() {
|
ClickMenuHandler: function() {
|
||||||
// 處理主選單切換(漢堡 icon)
|
// 處理主選單切換(漢堡 icon)
|
||||||
$(document).on('click', '.navbar-toggle', function (e) {
|
$(document).on('click', '.navbar-toggle', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
// 確保 .navbar-toggle 放到 .modules-menu 後面
|
// 確保 .navbar-toggle 放到 .modules-menu 後面
|
||||||
$('.mobile-menu').each(function () {
|
$('.mobile-menu').each(function () {
|
||||||
var $menu = $(this);
|
var $menu = $(this);
|
||||||
if ($menu.find('.modules-menu').length && !$menu.find('.modules-menu + .navbar-toggle').length) {
|
if ($menu.find('.modules-menu').length && !$menu.find('.modules-menu + .navbar-toggle').length) {
|
||||||
$menu.find('.modules-menu').after($menu.find('.navbar-toggle'));
|
$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');
|
// ✅ Tab 鍵跳過 .mobile-menu 時,觸發收合邏輯
|
||||||
$('body').toggleClass('noscroll');
|
$(document).on('focusout', '.mobile-menu', function(e) {
|
||||||
$('.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) {
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
var $newFocus = $(document.activeElement);
|
var $newFocus = $(document.activeElement);
|
||||||
// 焦點已離開 .mobile-menu 且選單是展開狀態
|
|
||||||
if ($('.mobile-menu').hasClass('active') && $newFocus.closest('.mobile-menu').length === 0) {
|
// 焦點在 body 時代表滑鼠正在點擊中,不處理
|
||||||
// ✅ 直接 trigger click,與按下 .navbar-toggle 執行完全相同的動作
|
if ($newFocus.is('body')) return;
|
||||||
$('.navbar-toggle').first().trigger('click');
|
|
||||||
|
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);
|
}, 50);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.mobile-menu1 > .menu-drop').click(function(){
|
$('.mobile-menu1 > .menu-drop').click(function(){
|
||||||
var $that = $(this);
|
var $that = $(this);
|
||||||
var opencheck1 = $that.hasClass('opened');
|
var opencheck1 = $that.hasClass('opened');
|
||||||
if ( opencheck1 == 0 ) {
|
if ( opencheck1 == 0 ) {
|
||||||
$('.mobile-menu1 > ul').not($that.siblings('ul')).slideUp(500);
|
$('.mobile-menu1 > ul').not($that.siblings('ul')).slideUp(500);
|
||||||
$('.mobile-menu1 > .menu-drop').not($that).removeClass('opened');
|
$('.mobile-menu1 > .menu-drop').not($that).removeClass('opened');
|
||||||
$('.mobile-menu2 > ul').slideUp(500);
|
$('.mobile-menu2 > ul').slideUp(500);
|
||||||
$('.mobile-menu2 > .menu-drop').removeClass('opened');
|
$('.mobile-menu2 > .menu-drop').removeClass('opened');
|
||||||
$that.siblings('ul').slideDown(500);
|
$that.siblings('ul').slideDown(500);
|
||||||
$that.addClass('opened');
|
$that.addClass('opened');
|
||||||
|
|
||||||
} else if (opencheck1 == 1) {
|
} else if (opencheck1 == 1) {
|
||||||
$that.siblings('ul').slideUp(500);
|
$that.siblings('ul').slideUp(500);
|
||||||
$('.mobile-menu2 > ul').slideUp(500);
|
$('.mobile-menu2 > ul').slideUp(500);
|
||||||
$('.mobile-menu2 > .menu-drop').removeClass('opened');
|
$('.mobile-menu2 > .menu-drop').removeClass('opened');
|
||||||
$that.removeClass('opened');
|
$that.removeClass('opened');
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
$('.mobile-menu2 > .menu-drop').click(function(){
|
$('.mobile-menu2 > .menu-drop').click(function(){
|
||||||
var $that = $(this);
|
var $that = $(this);
|
||||||
var opencheck2 = $that.hasClass('opened');
|
var opencheck2 = $that.hasClass('opened');
|
||||||
if ( opencheck2 == 0 ) {
|
if ( opencheck2 == 0 ) {
|
||||||
$('.mobile-menu2 > ul').not($that.siblings('ul')).slideUp(500);
|
$('.mobile-menu2 > ul').not($that.siblings('ul')).slideUp(500);
|
||||||
$('.mobile-menu2 > .menu-drop').not($that).removeClass('opened');
|
$('.mobile-menu2 > .menu-drop').not($that).removeClass('opened');
|
||||||
$that.siblings('ul').slideDown(500);
|
$that.siblings('ul').slideDown(500);
|
||||||
$that.addClass('opened');
|
$that.addClass('opened');
|
||||||
} else if (opencheck2 == 1) {
|
} else if (opencheck2 == 1) {
|
||||||
$that.siblings('ul').slideUp(500);
|
$that.siblings('ul').slideUp(500);
|
||||||
$that.removeClass('opened');
|
$that.removeClass('opened');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 把orbit物件加到window物件裡面並改名為ORBITFRONT來減少名稱衝突的機會
|
// 把orbit物件加到window物件裡面並改名為ORBITFRONT來減少名稱衝突的機會
|
||||||
|
|
@ -2684,14 +2707,7 @@ $(function() {
|
||||||
|
|
||||||
setTimeout(fixSearchMenuFocusOut, 600);
|
setTimeout(fixSearchMenuFocusOut, 600);
|
||||||
});
|
});
|
||||||
//post
|
|
||||||
$(document).ready(function () {
|
|
||||||
setTimeout(function () {
|
|
||||||
$('iframe.twitter-share-button, iframe.twitter-tweet-button').each(function () {
|
|
||||||
$(this).attr('title', '分享至 X 在新視窗開啟');
|
|
||||||
});
|
|
||||||
}, 1500);
|
|
||||||
});
|
|
||||||
$(function() {
|
$(function() {
|
||||||
function bindIframeFocus() {
|
function bindIframeFocus() {
|
||||||
var $iframe = $('.twitter-share-button');
|
var $iframe = $('.twitter-share-button');
|
||||||
|
|
@ -2845,6 +2861,7 @@ $(document).ready(function () {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
//post
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
$('iframe.twitter-share-button, iframe.twitter-tweet-button').each(function () {
|
$('iframe.twitter-share-button, iframe.twitter-tweet-button').each(function () {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
@import "variables";
|
@import "variables";
|
||||||
|
|
||||||
.fa-classic, .fa-regular, .fa-solid, .far, .fas ,.fa{
|
.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 .orbit-bar-inner > label:focus, #orbit-bar .orbit-bar-inner > label.focus{
|
||||||
.orbit-bar-search-sign-language{
|
.orbit-bar-search-sign-language{
|
||||||
|
|
@ -26,11 +26,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
label[for="open-orbit-login"] {
|
// label[for="open-orbit-login"] {
|
||||||
@media(max-width:768px){
|
// @media(max-width:768px){
|
||||||
display: none!important;
|
// display: none!important;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
[accesskey="U"],[accesskey="W"]{
|
[accesskey="U"],[accesskey="W"]{
|
||||||
@media(max-width:768px){
|
@media(max-width:768px){
|
||||||
color: #666!important;
|
color: #666!important;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,11 @@
|
||||||
@charset "utf-8";
|
@charset "utf-8";
|
||||||
|
|
||||||
@import "../initial";
|
@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{
|
.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){
|
@media(max-width: $screen-xs){
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
|
||||||
|
|
@ -30,9 +30,11 @@ ul.button-mid{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ul.button-mid{
|
.button-mid {
|
||||||
margin:0;
|
position: absolute;
|
||||||
z-index: 201;
|
width: 100%;
|
||||||
|
height: 0;
|
||||||
|
top: 50%;
|
||||||
}
|
}
|
||||||
.banner-pager .active-slide button{
|
.banner-pager .active-slide button{
|
||||||
background: $theme-color-second!important;
|
background: $theme-color-second!important;
|
||||||
|
|
|
||||||
|
|
@ -2578,12 +2578,6 @@
|
||||||
.i-annc__entry-title {
|
.i-annc__entry-title {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
margin-top: 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 {
|
.i-annc__title {
|
||||||
|
|
@ -2591,6 +2585,11 @@
|
||||||
color: $theme-color-main;
|
color: $theme-color-main;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@extend .i-title;
|
@extend .i-title;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
&:hover {
|
&:hover {
|
||||||
color: $theme-color-second;
|
color: $theme-color-second;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,9 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</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="播放控制選項">
|
<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">
|
<a role="radio" aria-checked="true" href="javascript:;" class="resume-slide active" title="繼續播放" aria-label="繼續播放" aria-live="assertive">
|
||||||
<i aria-hidden="true"></i>
|
<i aria-hidden="true"></i>
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<div class="link-img-wrap{{display_image}}">
|
<div class="link-img-wrap{{display_image}}">
|
||||||
<img src="{{img_src}}" alt="{{img_description}}" title="{{img_description}}">
|
<img src="{{img_src}}" alt="{{img_description}}" title="{{img_description}}">
|
||||||
</div>
|
</div>
|
||||||
<a class="widget-content-title" href="{{link_to_show}}" target="{{target}}" title="{{title_text}}">{{title}}</a>
|
<a class="widget-content-title" href="{{link_to_show}}" target="{{target}}" title="{{title_text}}" onclick="{{onclick}}">{{title}}</a>
|
||||||
<span data-list="statuses" data-level="1">
|
<span data-list="statuses" data-level="1">
|
||||||
<span class="label status {{status-class}}">{{status}}</span>
|
<span class="label status {{status-class}}">{{status}}</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue