update
This commit is contained in:
parent
31cd89686e
commit
43a89d9aeb
|
|
@ -2164,27 +2164,28 @@ $(function() {
|
|||
});
|
||||
//rucaptcha-image
|
||||
$(document).ready(function () {
|
||||
$('.rucaptcha-image').removeAttr('onload');
|
||||
|
||||
// 檢查是否已插入過
|
||||
if (!$('#captcha_audio').length) {
|
||||
const audioButton = $(`
|
||||
<button
|
||||
title="播放驗證碼語音"
|
||||
type="button"
|
||||
onclick="document.getElementById('captcha_audio').play();"
|
||||
class="fas fa-volume-up"
|
||||
aria-label="播放驗證碼語音"
|
||||
role="button"
|
||||
style="font-size: 1.5em; color: #333; cursor: pointer; border: 2px solid #333; padding: 0.2em;">
|
||||
<span class="sr-only">播放驗證碼語音</span>
|
||||
</button>
|
||||
`);
|
||||
|
||||
const audio = $('<audio id="captcha_audio" src="/rucaptcha/?format=wav&locale=zh_tw"></audio>');
|
||||
|
||||
$('.rucaptcha-image').after(audioButton, audio);
|
||||
// >>> 修正:先確認頁面上真的有驗證碼圖片,再往下執行,避免沒有驗證碼的頁面也發出多餘的 wav 請求
|
||||
if ($('.rucaptcha-image').length) {
|
||||
$('.rucaptcha-image').removeAttr('onload');
|
||||
// 檢查是否已插入過
|
||||
if (!$('#captcha_audio').length) {
|
||||
const audioButton = $(`
|
||||
<button
|
||||
title="播放驗證碼語音"
|
||||
type="button"
|
||||
onclick="document.getElementById('captcha_audio').play();"
|
||||
class="fas fa-volume-up"
|
||||
aria-label="播放驗證碼語音"
|
||||
role="button"
|
||||
style="font-size: 1.5em; color: #333; cursor: pointer; border: 2px solid #333; padding: 0.2em;">
|
||||
<span class="sr-only">播放驗證碼語音</span>
|
||||
</button>
|
||||
`);
|
||||
const audio = $('<audio id="captcha_audio" src="/rucaptcha/?format=wav&locale=zh_tw"></audio>');
|
||||
$('.rucaptcha-image').after(audioButton, audio);
|
||||
}
|
||||
}
|
||||
// <<< 修正結束
|
||||
});
|
||||
|
||||
//萬用表格searchbtn2
|
||||
|
|
@ -3299,11 +3300,15 @@ $(document).ready(function() {
|
|||
});
|
||||
//post
|
||||
$(document).ready(function () {
|
||||
setTimeout(function () {
|
||||
$('iframe.twitter-share-button, iframe.twitter-tweet-button').each(function () {
|
||||
$(this).attr('title', '分享至 X 在新視窗開啟');
|
||||
});
|
||||
}, 1500);
|
||||
setTimeout(function () {
|
||||
var pageLang = ($('html').attr('lang') || 'zh-Hant').toLowerCase();
|
||||
var isEn = pageLang.startsWith('en');
|
||||
var title = isEn ? 'Share to X Open in new window' : '分享至 X 在新視窗開啟';
|
||||
|
||||
$('iframe.twitter-share-button, iframe.twitter-tweet-button').each(function () {
|
||||
$(this).attr('title', title);
|
||||
});
|
||||
}, 1500);
|
||||
});
|
||||
$(function() {
|
||||
function bindIframeFocus() {
|
||||
|
|
@ -3786,4 +3791,88 @@ $(function() {
|
|||
window.location.href = newUrl;
|
||||
});
|
||||
});
|
||||
//banner英文
|
||||
$(function() {
|
||||
function fixBannerA11yByLang() {
|
||||
setTimeout(function() {
|
||||
var pageLang = ($('html').attr('lang') || 'zh-Hant').toLowerCase();
|
||||
var isEn = pageLang.startsWith('en');
|
||||
|
||||
var i18n = {
|
||||
playControls: isEn ? 'Playback Controls' : '播放控制選項',
|
||||
resume: isEn ? 'Play' : '繼續播放',
|
||||
pause: isEn ? 'Pause' : '暫停播放',
|
||||
prev: isEn ? 'Previous' : '上一張',
|
||||
next: isEn ? 'Next' : '下一張',
|
||||
slide: isEn ? 'Slide' : '第',
|
||||
slideUnit: isEn ? '' : ' 張投影片'
|
||||
};
|
||||
|
||||
$('.w-ba-banner').each(function() {
|
||||
var $banner = $(this);
|
||||
|
||||
// ✅ 播放控制選項 radiogroup label
|
||||
$banner.find('.controlplay').attr('aria-label', i18n.playControls);
|
||||
|
||||
// ✅ 繼續播放按鈕
|
||||
$banner.find('.resume-slide').attr({
|
||||
'aria-label': i18n.resume,
|
||||
'title': i18n.resume
|
||||
});
|
||||
$banner.find('.resume-slide p').text(i18n.resume);
|
||||
|
||||
// ✅ 暫停播放按鈕
|
||||
$banner.find('.pause-slide').attr({
|
||||
'aria-label': i18n.pause,
|
||||
'title': i18n.pause
|
||||
});
|
||||
$banner.find('.pause-slide p').text(i18n.pause);
|
||||
|
||||
// ✅ 上一張按鈕
|
||||
$banner.find('.prev-button').attr('aria-label', i18n.prev);
|
||||
|
||||
// ✅ 下一張按鈕
|
||||
$banner.find('.next-button').attr('aria-label', i18n.next);
|
||||
|
||||
// ✅ Pager 按鈕
|
||||
var $slides = $banner.find('.w-ba-banner__slide');
|
||||
$banner.find('.banner-pager button').each(function(index) {
|
||||
var slideTitle = $slides.eq(index).data('cycle-title') || '';
|
||||
var ariaLabel = isEn
|
||||
? i18n.slide + ' ' + (index + 1) + (slideTitle ? ' ' + slideTitle : '')
|
||||
: i18n.slide + (index + 1) + i18n.slideUnit + (slideTitle ? ' ' + slideTitle : '');
|
||||
$(this).attr({
|
||||
'aria-label': ariaLabel,
|
||||
'title': ariaLabel
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// ✅ Cycle2 初始化後也重新處理 Pager(因為 pager 是動態產生的)
|
||||
$('.w-ba-banner .cycle-slideshow').on('cycle-post-initialize cycle-after', function() {
|
||||
var $banner = $(this).closest('.w-ba-banner');
|
||||
var $slides = $banner.find('.w-ba-banner__slide');
|
||||
$banner.find('.banner-pager button').each(function(index) {
|
||||
var slideTitle = $slides.eq(index).data('cycle-title') || '';
|
||||
var ariaLabel = isEn
|
||||
? i18n.slide + ' ' + (index + 1) + (slideTitle ? ' ' + slideTitle : '')
|
||||
: i18n.slide + (index + 1) + i18n.slideUnit + (slideTitle ? ' ' + slideTitle : '');
|
||||
$(this).attr({
|
||||
'aria-label': ariaLabel,
|
||||
'title': ariaLabel
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
}, 800);
|
||||
}
|
||||
|
||||
fixBannerA11yByLang();
|
||||
});
|
||||
|
||||
//ai須新增的function
|
||||
|
||||
|
||||
|
||||
|
||||
}(jQuery, window));
|
||||
|
|
|
|||
|
|
@ -2,7 +2,110 @@
|
|||
|
||||
@import "../initial";
|
||||
@import "variables";
|
||||
a[href="/zh_tw/sitemap"]{
|
||||
padding: 0 1em;
|
||||
}
|
||||
a[href="/en/sitemap"]{
|
||||
padding: 0 1em;
|
||||
}
|
||||
.fc-cal-date-selected-fusion {
|
||||
font-size: 1em!important;
|
||||
}
|
||||
.nav_ul{
|
||||
padding: 0;
|
||||
& > li{
|
||||
position: relative;
|
||||
list-style:none;
|
||||
float: left;
|
||||
display: inline-block;
|
||||
@media(max-width:480px){
|
||||
width: 100%;
|
||||
a{
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
&:hover{
|
||||
background-color:transparent;
|
||||
> a{
|
||||
text-decoration: underline;
|
||||
padding: 0.7em;
|
||||
}
|
||||
& > ul{
|
||||
display: block;
|
||||
a{
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
& > ul{
|
||||
@media(max-width:480px){
|
||||
position: relative;
|
||||
box-shadow: none;
|
||||
display: block;
|
||||
li{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
display: none;
|
||||
width:-webkit-fill-available;
|
||||
min-width: max-content;
|
||||
box-shadow: 2px 2px 5px #00000033;
|
||||
margin: 0;
|
||||
transition-duration: 0.5s;
|
||||
background:$theme-color-second;
|
||||
position: absolute;
|
||||
padding: 0;
|
||||
li{
|
||||
list-style:none;
|
||||
float: none!important;
|
||||
a{
|
||||
color: #fff;
|
||||
display: block;
|
||||
padding: 0.7em;
|
||||
}
|
||||
&:hover{
|
||||
background-color: rgba(darken($theme-color-second, 10%), 1);;
|
||||
& > ul{
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
.orbit-bar-inner{
|
||||
.orbit-bar-menu{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
blockquote{
|
||||
color: #fff;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-size: unset;
|
||||
border-left: 0;
|
||||
@media(min-width:769px){
|
||||
float: left;
|
||||
.movelanguage{
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
&:after, &:before{
|
||||
display: none;
|
||||
}
|
||||
a{
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
height: 40px;
|
||||
padding: 0.7em;
|
||||
font-size: 0.85em;
|
||||
}
|
||||
}
|
||||
}
|
||||
.fa-classic, .fa-regular, .fa-solid, .far, .fas ,.fa{
|
||||
font-family: var(--fa-style-family, "FontAwesome")!important;
|
||||
}
|
||||
|
|
@ -96,7 +199,6 @@ body {
|
|||
margin-top: 2.5em;
|
||||
overflow: hidden scroll;
|
||||
letter-spacing: 0.5px;
|
||||
background-color: #f8f9fa;
|
||||
}
|
||||
|
||||
a:link,
|
||||
|
|
@ -150,8 +252,8 @@ td {
|
|||
// }
|
||||
// }
|
||||
.w-annc_read_more{
|
||||
float: right;
|
||||
margin-bottom: 1em;
|
||||
float: right;
|
||||
margin-bottom: 1em;
|
||||
font-size: 0.8125rem;
|
||||
-webkit-transition: all 200ms cubic-bezier(0.39, 0.5, 0.15, 1.36);
|
||||
-moz-transition: all 200ms cubic-bezier(0.39, 0.5, 0.15, 1.36);
|
||||
|
|
@ -226,14 +328,9 @@ img {
|
|||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
// Take care of exceeding content
|
||||
// body[data-module="page_content"],
|
||||
// body[data-module="announcement"] {
|
||||
// .layout-content {
|
||||
// overflow-x: auto;
|
||||
// }
|
||||
// }
|
||||
|
||||
input[type=checkbox]:focus {
|
||||
outline: 0.3125em auto -webkit-focus-ring-color;
|
||||
}
|
||||
table{
|
||||
caption-side: top;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
@charset "utf-8";
|
||||
@import "../../bootstrap/variables";
|
||||
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,100;0,300;1,300&display=swap');
|
||||
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,100;0,300;1,300&family=Barlow:wght@100;200;300&display=swap');
|
||||
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@100&display=swap');
|
||||
// Base Color
|
||||
$theme-green-light: #EEF7F6;
|
||||
$theme-gray: #8b8b8b;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,13 @@
|
|||
padding: 0;
|
||||
}
|
||||
}
|
||||
.ask-question-form .form-actions input {
|
||||
float: none !important;
|
||||
margin-right: 1em;
|
||||
}
|
||||
.ask-question .form-horizontal .form-actions {
|
||||
text-align: end!important;
|
||||
}
|
||||
.verticalhome{
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
|
|
|||
|
|
@ -1,118 +1,13 @@
|
|||
@charset "utf-8";
|
||||
|
||||
@import "../initial";
|
||||
a[href="/zh_tw/sitemap"]{
|
||||
padding: 0 1em;
|
||||
}
|
||||
a[href="/en/sitemap"]{
|
||||
padding: 0 1em;
|
||||
}
|
||||
.fc-cal-date-selected-fusion {
|
||||
font-size: 1em!important;
|
||||
}
|
||||
.nav_ul{
|
||||
padding: 0;
|
||||
& > li{
|
||||
position: relative;
|
||||
list-style:none;
|
||||
float: left;
|
||||
display: inline-block;
|
||||
@media(max-width:480px){
|
||||
width: 100%;
|
||||
a{
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
&:hover{
|
||||
background-color:transparent;
|
||||
> a{
|
||||
text-decoration: underline;
|
||||
padding: 0.7em;
|
||||
}
|
||||
& > ul{
|
||||
display: block;
|
||||
a{
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
& > ul{
|
||||
@media(max-width:480px){
|
||||
position: relative;
|
||||
box-shadow: none;
|
||||
display: block;
|
||||
li{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
display: none;
|
||||
width:-webkit-fill-available;
|
||||
min-width: max-content;
|
||||
box-shadow: 2px 2px 5px #00000033;
|
||||
margin: 0;
|
||||
transition-duration: 0.5s;
|
||||
background:$theme-color-second;
|
||||
position: absolute;
|
||||
padding: 0;
|
||||
li{
|
||||
list-style:none;
|
||||
float: none!important;
|
||||
a{
|
||||
color: #fff;
|
||||
display: block;
|
||||
padding: 0.7em;
|
||||
}
|
||||
&:hover{
|
||||
background-color: rgba(darken($theme-color-second, 10%), 1);;
|
||||
& > ul{
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
.orbit-bar-inner{
|
||||
.orbit-bar-menu{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
blockquote{
|
||||
color: #fff;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-size: unset;
|
||||
border-left: 0;
|
||||
@media(min-width:769px){
|
||||
float: left;
|
||||
.movelanguage{
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
&:after, &:before{
|
||||
display: none;
|
||||
}
|
||||
a{
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
height: 40px;
|
||||
padding: 0.7em;
|
||||
font-size: 0.85em;
|
||||
}
|
||||
}
|
||||
}
|
||||
.outdropdowns{
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
padding: 0.5em 0;
|
||||
}
|
||||
.header-nav {
|
||||
// display: flex !important;
|
||||
// flex-wrap: wrap;
|
||||
ul{
|
||||
padding: 0;
|
||||
}
|
||||
|
|
@ -126,9 +21,6 @@ a[href="/en/sitemap"]{
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.dropdowns{
|
||||
|
||||
}
|
||||
.accessibility_mode a:focus{
|
||||
outline: 0.1em solid !important;
|
||||
|
|
@ -203,9 +95,9 @@ a[href="/en/sitemap"]{
|
|||
position: relative;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: anchor-center;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: anchor-center;
|
||||
// @media (max-width: $screen-sm) {
|
||||
// width: 100%;
|
||||
// display: flex;
|
||||
|
|
@ -270,7 +162,6 @@ a[href="/en/sitemap"]{
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-toggle {
|
||||
|
||||
// border-radius: 0.125em;
|
||||
|
|
@ -326,12 +217,6 @@ a[href="/en/sitemap"]{
|
|||
.navbar-toggle{
|
||||
display: block!important;
|
||||
}
|
||||
|
||||
}
|
||||
.outdropdowns{
|
||||
.dropdowns{
|
||||
|
||||
}
|
||||
}
|
||||
.nav-menu{
|
||||
display:flex!important;
|
||||
|
|
|
|||
|
|
@ -21,11 +21,55 @@
|
|||
|
||||
//RWD
|
||||
@import "RWD";
|
||||
.list-unstyled::after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
.w-annc_read_more{
|
||||
float: right;
|
||||
margin-bottom: 1em;
|
||||
font-size: 0.8125rem;
|
||||
-webkit-transition: all 200ms cubic-bezier(0.39, 0.5, 0.15, 1.36);
|
||||
-moz-transition: all 200ms cubic-bezier(0.39, 0.5, 0.15, 1.36);
|
||||
-ms-transition: all 200ms cubic-bezier(0.39, 0.5, 0.15, 1.36);
|
||||
-o-transition: all 200ms cubic-bezier(0.39, 0.5, 0.15, 1.36);
|
||||
transition: all 200ms cubic-bezier(0.39, 0.5, 0.15, 1.36);
|
||||
background: none;
|
||||
border: none;
|
||||
color: $theme-color-hover;
|
||||
box-shadow: $theme-color-hover 0 0px 0px 2px inset;
|
||||
|
||||
&:hover {
|
||||
color: #fff;
|
||||
box-shadow:$theme-color-hover 0 0px 0px 40px inset;
|
||||
}
|
||||
}
|
||||
a.btn-primary {
|
||||
margin-bottom: 1em;
|
||||
font-size: 0.8125rem;
|
||||
-webkit-transition: all 200ms cubic-bezier(0.39, 0.5, 0.15, 1.36);
|
||||
-moz-transition: all 200ms cubic-bezier(0.39, 0.5, 0.15, 1.36);
|
||||
-ms-transition: all 200ms cubic-bezier(0.39, 0.5, 0.15, 1.36);
|
||||
-o-transition: all 200ms cubic-bezier(0.39, 0.5, 0.15, 1.36);
|
||||
transition: all 200ms cubic-bezier(0.39, 0.5, 0.15, 1.36);
|
||||
background: none;
|
||||
border: none;
|
||||
color: $theme-color-hover;
|
||||
box-shadow: $theme-color-hover 0 0px 0px 2px inset;
|
||||
|
||||
&:hover {
|
||||
color: #fff;
|
||||
box-shadow:$theme-color-hover 0 0px 0px 40px inset;
|
||||
}
|
||||
}
|
||||
.theadsearch2{
|
||||
.btn-primary{
|
||||
background-color:$theme-color-hover;
|
||||
border-color:$theme-color-hover;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.list-unstyled::after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
input:focus,
|
||||
input:hover {
|
||||
outline: 3px solid #14324f!important;
|
||||
|
|
@ -56,13 +100,6 @@ input:hover {
|
|||
.container{
|
||||
margin: auto;
|
||||
}
|
||||
// .layout-content{
|
||||
// .response-container{
|
||||
// @media (min-width: 769px)and(max-width: 820px) {
|
||||
// width: 768px!important;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
.internalfullwidth{
|
||||
@media(min-width: 1280px){
|
||||
transform: translateX(calc(-50vw + 685px));
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@
|
|||
<thead class="theadsearch">
|
||||
<tr data-list="head-columns" data-level="0">
|
||||
<th class="col-ken">
|
||||
<a href="{{sort-url}}" class="{{sort}}" aria-label="重新排序{{title}}"><i class="universal-th-icon fa fa-{{sort-class}}"></i></a>
|
||||
|
||||
<div class="universal-th-text {{title-class}}">{{title}}</div>
|
||||
<div class="dropdown universal-dropdown {{search}}">
|
||||
<button class="btn btn-sm" id="dLabel" type="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-label="搜尋" title="搜尋" role="button">
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@
|
|||
<thead class="theadsearch">
|
||||
<tr data-list="head-columns" data-level="0">
|
||||
<th class="col-ken">
|
||||
<a href="{{sort-url}}" class="{{sort}}" aria-label="重新排序{{title}}"><i class="universal-th-icon fa fa-{{sort-class}}"></i></a>
|
||||
|
||||
<div class="universal-th-text {{title-class}}">{{title}}</div>
|
||||
<div class="dropdown universal-dropdown {{search}}">
|
||||
<button class="btn btn-sm" id="dLabel" type="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-label="搜尋" title="搜尋" role="button">
|
||||
|
|
|
|||
Loading…
Reference in New Issue