This commit is contained in:
ken 2026-08-20 15:05:17 +08:00
parent a855a63b01
commit 2f4a1141da
8 changed files with 103 additions and 10 deletions

View File

@ -3216,6 +3216,68 @@ function fixYoutubeiframeTitle() {
$(document).ready(function () { $(document).ready(function () {
setTimeout(fixYoutubeiframeTitle, 500); setTimeout(fixYoutubeiframeTitle, 500);
});
$(function() {
function fixOrbitBarLabelToButton() {
setTimeout(function() {
var $label = $('label[for="open-orbit-nav"]');
if ($label.length === 0) return;
// ✅ 建立 button 取代 label
var $btn = $('<button></button>');
$btn.attr({
'type': 'button',
'id': 'open-orbit-nav-btn',
'aria-label': $label.attr('aria-label') || '全站搜尋及語言切換選單',
'aria-haspopup': 'true',
'aria-expanded': 'false',
'aria-controls': 'orbit-bar-inner',
'title': $label.attr('title') || '全站搜尋及語言切換選單',
'tabindex': '0'
});
$btn.html($label.html());
$btn.addClass($label.attr('class') || '');
// ✅ 複製原本 label 的樣式
$btn.attr('style', $label.attr('style') || '');
// ✅ 替換 label
$label.replaceWith($btn);
// ✅ 取得 checkbox 狀態同步 aria-expanded
var $checkbox = $('#open-orbit-nav');
function syncAriaExpanded() {
var isChecked = $checkbox.prop('checked');
$('#open-orbit-nav-btn').attr('aria-expanded', isChecked ? 'true' : 'false');
}
// ✅ button 點擊時觸發 checkbox toggle並同步 aria-expanded
$(document).on('click', '#open-orbit-nav-btn', function() {
$checkbox.prop('checked', !$checkbox.prop('checked'));
syncAriaExpanded();
});
// ✅ Enter / Space 鍵觸發
$(document).on('keydown', '#open-orbit-nav-btn', function(e) {
if (e.which === 13 || e.which === 32) {
e.preventDefault();
$(this).trigger('click');
}
});
// ✅ 監聽 checkbox 變化(可能有其他地方觸發)同步狀態
$checkbox.on('change', function() {
syncAriaExpanded();
});
// ✅ 初始化同步
syncAriaExpanded();
}, 500);
}
fixOrbitBarLabelToButton();
}); });
// 執行 member等高計算目前改用flexbox故mark掉 by ika 20160105 // 執行 member等高計算目前改用flexbox故mark掉 by ika 20160105
// $(window).load(function() { // $(window).load(function() {

View File

@ -1,6 +1,37 @@
@charset "utf-8"; @charset "utf-8";
@import "../initial"; @import "../initial";
@media (max-width: 540px) {
body #orbit-bar .orbit-bar-inner>button {
border-color: #fff;
color: #fff;
}
}
@media (max-width: 767px) {
#orbit-bar .orbit-bar-inner>button {
display: block;
}
}
@media(max-width: 767px) {
#orbit-bar .orbit-bar-inner>button {
position: absolute!important;
float: none!important;
}
}
#orbit-bar .orbit-bar-inner>button {
background: transparent;
position: relative;
float: left;
width: 23px;
height: 23px;
margin-top: 7px;
padding: 0 1px 0 0;
color: #999999;
text-align: center;
border: 1px solid #999999;
border-radius: 3px;
cursor: pointer;
}
.fc-cal-date-selected-fusion { .fc-cal-date-selected-fusion {
font-size: 1em!important; font-size: 1em!important;
} }
@ -17,12 +48,12 @@
a { a {
text-decoration: none; text-decoration: none;
padding: 10px; padding: 10px;
border: 1px solid #0a9a9a; border: 1px solid #047171;
background: #0a9a9a; background: #047171;
color: #fff; color: #fff;
margin-right: 1em; margin-right: 1em;
&:hover{ &:hover{
color: #0a9a9a!important; color: #047171!important;
background: #fff; background: #fff;
} }
} }

View File

@ -148,7 +148,7 @@
@extend .unity-title; @extend .unity-title;
} }
.link { background-color: #1368d4 !important; margin-left: 0.5em; } /* 對比 4.6:1 */ .link { background-color: #1368d4 !important; margin-left: 0.5em; } /* 對比 4.6:1 */
.txt { background-color: #3a8a40 !important; margin-left: 0.5em; } /* 對比 4.6:1 */ .txt { background-color: #2a7e31 !important; margin-left: 0.5em; } /* 對比 4.6:1 */
.xlsx { background-color: #9e3050 !important; margin-left: 0.5em; } /* 對比 4.6:1 */ .xlsx { background-color: #9e3050 !important; margin-left: 0.5em; } /* 對比 4.6:1 */
.pdf { background-color: #2a7d36 !important; margin-left: 0.5em; } /* 對比 4.6:1 */ .pdf { background-color: #2a7d36 !important; margin-left: 0.5em; } /* 對比 4.6:1 */
.docx { background-color: #5e46a0 !important; margin-left: 0.5em; } /* 對比 4.6:1 */ .docx { background-color: #5e46a0 !important; margin-left: 0.5em; } /* 對比 4.6:1 */
@ -157,7 +157,7 @@
.jpg { background-color: #8f3333 !important; margin-left: 0.5em; } /* 對比 4.6:1 */ .jpg { background-color: #8f3333 !important; margin-left: 0.5em; } /* 對比 4.6:1 */
.zip { background-color: #8a6400 !important; margin-left: 0.5em; } /* 對比 4.6:1 */ .zip { background-color: #8a6400 !important; margin-left: 0.5em; } /* 對比 4.6:1 */
.rar { background-color: #9e5000 !important; margin-left: 0.5em; } /* 對比 4.6:1 */ .rar { background-color: #9e5000 !important; margin-left: 0.5em; } /* 對比 4.6:1 */
.xls { background-color: #3a8a40 !important; margin-left: 0.5em; } /* 對比 4.6:1 */ .xls { background-color: #2a7e31 !important; margin-left: 0.5em; } /* 對比 4.6:1 */
.odt { background-color: #767676 !important; margin-left: 0.5em; } /* 對比 4.6:1 */ .odt { background-color: #767676 !important; margin-left: 0.5em; } /* 對比 4.6:1 */
.table>caption+thead>tr:first-child>td, .table>caption+thead>tr:first-child>th, .table>colgroup+thead>tr:first-child>td, .table>colgroup+thead>tr:first-child>th, .table>thead:first-child>tr:first-child>td, .table>thead:first-child>tr:first-child>th{ .table>caption+thead>tr:first-child>td, .table>caption+thead>tr:first-child>th, .table>colgroup+thead>tr:first-child>td, .table>colgroup+thead>tr:first-child>th, .table>thead:first-child>tr:first-child>td, .table>thead:first-child>tr:first-child>th{
// border-top: 0.0625em solid #ddd; // border-top: 0.0625em solid #ddd;

View File

@ -200,7 +200,7 @@
z-index: 1020; z-index: 1020;
li { li {
padding: 1em; padding: 0.5em;
list-style: none; list-style: none;
} }
.menu-drop.opened { .menu-drop.opened {

View File

@ -8,7 +8,7 @@
<div class="i-member-item-inner clearfix"> <div class="i-member-item-inner clearfix">
<div class="i-member-pic-wrap col-sm-4 col-xs-4"> <div class="i-member-pic-wrap col-sm-4 col-xs-4">
<a href="{{link_to_show}}" title="{{name}}"> <a href="{{link_to_show}}" title="{{name}}">
<img class="i-member-pic" src="{{image}}" title="{{name}}"> <img class="i-member-pic" src="{{image}}" alt="{{name}}">
</a> </a>
</div> </div>
<div class="i-member-profile-data-wrap col-sm-8 col-xs-8"> <div class="i-member-profile-data-wrap col-sm-8 col-xs-8">

View File

@ -8,7 +8,7 @@
<div class="i-member-item-inner clearfix"> <div class="i-member-item-inner clearfix">
<div class="i-member-pic-wrap"> <div class="i-member-pic-wrap">
<a href="{{link_to_show}}" title="{{name}}"> <a href="{{link_to_show}}" title="{{name}}">
<img class="i-member-pic" src="{{image}}" title="{{name}}"> <img class="i-member-pic" src="{{image}}" alt="{{name}}">
</a> </a>
</div> </div>
<div class="i-member-profile-data-wrap"> <div class="i-member-profile-data-wrap">

View File

@ -8,7 +8,7 @@
<div class="i-member-item-inner clearfix"> <div class="i-member-item-inner clearfix">
<div class="i-member-pic-wrap"> <div class="i-member-pic-wrap">
<a href="{{link_to_show}}" title="{{name}}"> <a href="{{link_to_show}}" title="{{name}}">
<img class="i-member-pic" src="{{image}}" title="{{name}}"> <img class="i-member-pic" src="{{image}}" alt="{{name}}">
</a> </a>
</div> </div>
<div class="i-member-profile-data-wrap"> <div class="i-member-profile-data-wrap">

View File

@ -10,7 +10,7 @@
<div class="i-member-item-inner clearfix"> <div class="i-member-item-inner clearfix">
<div class="i-member-pic-wrap"> <div class="i-member-pic-wrap">
<a href="{{link_to_show}}" title="{{name}}"> <a href="{{link_to_show}}" title="{{name}}">
<img class="i-member-pic" src="{{image}}" title="{{name}}"> <img class="i-member-pic" src="{{image}}" alt="{{name}}">
</a> </a>
</div> </div>