This commit is contained in:
ken 2026-07-30 11:43:33 +08:00
parent ef6c4d64d3
commit ed83798049
4 changed files with 44 additions and 12 deletions

View File

@ -1,6 +1,36 @@
;(function($, win, undefined) {
// 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 $signLanguageBox = $('.orbit-bar-search-sign-language');
var $headerNav = $('.header-nav');
@ -2200,7 +2230,7 @@ $(document).ready(function() {
if ($(window).width() <769) {
$('.modules-menu-level-0').after($('.header-nav'));
}else{
$('.navbar-header').before($('.header-nav'));
$('.navbar-header').after($('.header-nav'));
};
$('.sitemenu-vertical .sitemenu-dropdown-toggle').click(function(){
$('.sitemenu-vertical .dropdown-menu').slideToggle();
@ -2268,7 +2298,7 @@ $(document).ready(function() {
$('.modules-menu-level-0').after($('.header-nav'));
}else{
$('.navbar-header').before($('.header-nav'));
$('.navbar-header').after($('.header-nav'));
};
if ($(window).width() > 821) {

View File

@ -288,7 +288,7 @@
}
&:hover{
a{
color:#c05707;
color: #c05707 !important;
}
background-color: #fff;
border:1px solid #c05707;

View File

@ -15,6 +15,7 @@
.header-nav {
display: flex !important;
flex-wrap: wrap;
float: right;
ul{
padding: 0;
}
@ -115,9 +116,6 @@
margin-top: 1em!important;
margin-bottom: 1em!important;
}
@media (min-width: 769px){
float: none!important;
}
// @media (max-width: $screen-sm) {
// width: 100%;
// display: flex;

View File

@ -21,11 +21,9 @@
<div class="outdropdowns kenjohn">
<div class="dropdowns">
<div class="header-nav container no-print">
<a id="accesskey_top" accesskey="U" title="accesskey top" href="#" title="Toolbar">:::</a>
{{header-data}}
</div>
<div class="container navbar-header">
<div class="container">
<div class=" navbar-header">
<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>
@ -35,7 +33,13 @@
<span class="icon-bar icon-bar-middle"></span>
<span class="icon-bar icon-bar-bottom"></span>
</button>
</div>
</div>
<div class="header-nav no-print">
<a id="accesskey_top" accesskey="U" title="accesskey top" href="#" title="Toolbar">:::</a>
{{header-data}}
</div>
</div>
<div class="collapse navbar-collapse modules-menu" id="layout-navigation">
<a id="accesskey_menu" title="accesskey menu" accesskey="M" href="#" title="Main menu">:::</a>