update
This commit is contained in:
parent
87e3bab846
commit
ee8c668bf7
|
|
@ -2,36 +2,6 @@
|
|||
// ECMAScript 5 嚴格模式
|
||||
'use strict';
|
||||
$(function() {
|
||||
var $signLanguageBox = $('.orbit-bar-search-sign-language');
|
||||
var $headerNav = $('.header-nav');
|
||||
var $target = $('.header-nav [accesskey="U"], .header-nav [accesskey="W"]');
|
||||
|
||||
// 移除 color: inherit !important
|
||||
$target.each(function() {
|
||||
$(this)[0].style.removeProperty('color');
|
||||
});
|
||||
|
||||
function handleNavMove() {
|
||||
var windowWidth = window.innerWidth;
|
||||
|
||||
if (windowWidth > 768) {
|
||||
if ($signLanguageBox.length && $signLanguageBox.find('[accesskey="U"], [accesskey="W"]').length === 0) {
|
||||
$signLanguageBox.prepend($target);
|
||||
}
|
||||
} else {
|
||||
if ($headerNav.length && $headerNav.find('[accesskey="U"], [accesskey="W"]').length === 0) {
|
||||
$headerNav.append($target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
handleNavMove();
|
||||
|
||||
$(window).on('resize', function() {
|
||||
handleNavMove();
|
||||
});
|
||||
});
|
||||
$(function() {
|
||||
var $target = $('.header-nav [accesskey="U"], .header-nav [accesskey="W"]');
|
||||
// 移除 color: inherit !important
|
||||
$target.each(function() {
|
||||
|
|
@ -2830,24 +2800,20 @@ $(document).ready(function() {
|
|||
});
|
||||
$(document).ready(function() {
|
||||
$('a[href="/zh_tw/sitemap"]').html('<i class="fa-solid fa-sitemap"></i>');
|
||||
$('a[href="/en/sitemap"]').html('<i class="fa-solid fa-sitemap"></i>')
|
||||
// 找到 Sitemap 連結
|
||||
var $sitemapLink = $('a[href="/zh_tw/sitemap"]');
|
||||
|
||||
// 找到目標容器
|
||||
var $target = $('.searchclass');
|
||||
|
||||
// 移動到容器內的最前面
|
||||
if ($sitemapLink.length && $target.length) {
|
||||
$sitemapLink.prependTo($target);
|
||||
}
|
||||
var $sitemapLink = $('a[href="/en/sitemap"]');
|
||||
|
||||
var $target = $('.searchclass');
|
||||
$('a[href="/en/sitemap"]').html('<i class="fa-solid fa-sitemap"></i>');
|
||||
|
||||
if ($sitemapLink.length && $target.length) {
|
||||
$sitemapLink.prependTo($target);
|
||||
}
|
||||
// 中文版:只移動 .header-nav 裡的
|
||||
var $sitemapLink = $('.header-nav a[href="/zh_tw/sitemap"]');
|
||||
var $target = $('.searchclass');
|
||||
if ($sitemapLink.length && $target.length) {
|
||||
$sitemapLink.prependTo($target);
|
||||
}
|
||||
|
||||
// 英文版:只移動 .header-nav 裡的
|
||||
var $sitemapLinkEn = $('.header-nav a[href="/en/sitemap"]');
|
||||
if ($sitemapLinkEn.length && $target.length) {
|
||||
$sitemapLinkEn.prependTo($target);
|
||||
}
|
||||
});
|
||||
//post
|
||||
$(document).ready(function () {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
@charset "utf-8";
|
||||
|
||||
a[accesskey] {
|
||||
position: absolute;
|
||||
margin-left: -0.9375em;
|
||||
position: relative;
|
||||
color: transparent ;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@
|
|||
<div class="outdropdowns kenjohn">
|
||||
<div class="container dropdowns">
|
||||
<div class="header-nav no-print">
|
||||
<a id="accesskey_top" accesskey="U" title="accesskey top" href="#" title="Toolbar">:::</a>
|
||||
{{header-data}}
|
||||
</div>
|
||||
<div class="navbar-header">
|
||||
<a id="accesskey_top" accesskey="U" title="accesskey top" href="#" title="Toolbar">:::</a>
|
||||
<a title="{{site_title_1}}" class="navbar-brand" href="{{home_link_1}}"><img class="site-logo" src="{{logo_url_1}}" alt="site-logo"></a>
|
||||
<script>$(document).ready(function(){var url =$('.site-logo').eq(0).attr('src');if(url == "/assets/default-site-logo.png"){$('.navbar-brand').eq(0).remove();};if($('.navbar-brand').length == 2){$('.site-logo').css('height','auto')};$('.site-logo').eq(0).css('margin-right',0);$('.navbar-brand').css('padding-right',0)})</script>
|
||||
<a title="{{site_title}}" class="navbar-brand" href="{{home_link}}"><img class="site-logo" src="{{logo_url}}" alt="site-logo"> {{site_name}}</a>
|
||||
|
|
|
|||
Loading…
Reference in New Issue