From db7353151c12c956bc937d460b8354d72d9ee938 Mon Sep 17 00:00:00 2001 From: ken Date: Mon, 21 Sep 2026 15:22:34 +0800 Subject: [PATCH] up --- assets/javascripts/app.js | 62 +++++++++++++------ .../stylesheets/template/base/_accesskey.scss | 5 +- assets/stylesheets/template/base/_global.scss | 6 +- assets/stylesheets/template/base/_unity.scss | 2 +- assets/stylesheets/template/layout/bo5.scss | 2 +- .../stylesheets/template/layout/header.scss | 13 +++- .../template/modules/ad_banner.scss | 1 + assets/stylesheets/template/modules/menu.scss | 6 +- home/header.html.erb | 9 ++- home/index.html.erb | 5 ++ modules/announcement/_annc_widget5.html.erb | 2 +- 11 files changed, 75 insertions(+), 38 deletions(-) diff --git a/assets/javascripts/app.js b/assets/javascripts/app.js index 1daaad1..efa3aaf 100644 --- a/assets/javascripts/app.js +++ b/assets/javascripts/app.js @@ -2546,7 +2546,7 @@ $(function() { if ($(window).width() <769) { $('.modules-menu-level-0').after($('.header-nav')); }else{ - $('.navbar-header').before($('.header-nav')); + $('.outdropdowns').before($('.header-nav')); }; $('.sitemenu-vertical .sitemenu-dropdown-toggle').click(function(){ $('.sitemenu-vertical .dropdown-menu').slideToggle(); @@ -2613,7 +2613,7 @@ $(function() { if ($(window).width() <769) { $('.modules-menu-level-0').after($('.header-nav')); }else{ - $('.navbar-header').before($('.header-nav')); + $('.outdropdowns').before($('.header-nav')); }; if ($(window).width() > 821) { @@ -3072,26 +3072,26 @@ $(function() { }); - //選單高度 - $(document).ready(function() { - function adjustNavMargin() { - if ($(window).width() > 769) { - var headerHeight = $('.navbar-header').outerHeight(); // 抓高度(含padding) - $('#layout-navigation').css('margin-top', headerHeight + 'px'); - } else { - // 螢幕小於等於 769px 時,還原 margin-top - $('#layout-navigation').css('margin-top', ''); - } - } + // //選單高度 + // $(document).ready(function() { + // function adjustNavMargin() { + // if ($(window).width() > 769) { + // var headerHeight = $('.navbar-header').outerHeight(); // 抓高度(含padding) + // $('#layout-navigation').css('margin-top', headerHeight + 'px'); + // } else { + // // 螢幕小於等於 769px 時,還原 margin-top + // $('#layout-navigation').css('margin-top', ''); + // } + // } - // 初始化執行一次 - adjustNavMargin(); + // // 初始化執行一次 + // adjustNavMargin(); - // 視窗縮放時也更新 - $(window).resize(function() { - adjustNavMargin(); - }); - }); + // // 視窗縮放時也更新 + // $(window).resize(function() { + // adjustNavMargin(); + // }); + // }); // //選單樣式2 // $(document).ready(function() { // "use strict"; @@ -4176,6 +4176,28 @@ $(function() { }); }, 500); }); +$(document).ready(function() { + var $movebox = $('.move-box'); + var $wrapper = $('.move-box-wrapper'); + + function handleMovebox() { + if ($(window).width() > 768) { + // 大螢幕:移到 .modules-menu 裡面 + $('.modules-menu').append($movebox); + } else { + // 小螢幕:移回 .move-box-wrapper 裡面 + $wrapper.append($movebox); + } + } + + setTimeout(handleMovebox, 300); + + var resizeTimer; + $(window).on('resize', function() { + clearTimeout(resizeTimer); + resizeTimer = setTimeout(handleMovebox, 150); + }); +}); //ai須新增的function diff --git a/assets/stylesheets/template/base/_accesskey.scss b/assets/stylesheets/template/base/_accesskey.scss index b8783da..7caaf12 100644 --- a/assets/stylesheets/template/base/_accesskey.scss +++ b/assets/stylesheets/template/base/_accesskey.scss @@ -1,13 +1,14 @@ @charset "utf-8"; a[accesskey] { - position: absolute; + position: absolute!important; margin-left: 0; + z-index: 1000!important; color:#333; } #orbit-bar a[accesskey] { - color: #525252; + color: #333; margin-left: 0; position: relative!important; &:hover { diff --git a/assets/stylesheets/template/base/_global.scss b/assets/stylesheets/template/base/_global.scss index 8fa1ae4..ebf622b 100644 --- a/assets/stylesheets/template/base/_global.scss +++ b/assets/stylesheets/template/base/_global.scss @@ -82,7 +82,7 @@ a[href="/en/sitemap"]{ } blockquote{ - color: #525252; + color: #333; padding: 0; margin: 0; font-size: unset; @@ -97,7 +97,7 @@ a[href="/en/sitemap"]{ display: none; } a{ - color: #525252; + color: #333; text-decoration: none; display: inline-block; height: 40px; @@ -197,7 +197,7 @@ body { width: 80%!important; margin: auto; } - margin: 4.5em auto 0; + margin: 2.5em auto 0; &:before{ content: ''; diff --git a/assets/stylesheets/template/base/_unity.scss b/assets/stylesheets/template/base/_unity.scss index 4c32f13..74385e0 100644 --- a/assets/stylesheets/template/base/_unity.scss +++ b/assets/stylesheets/template/base/_unity.scss @@ -131,7 +131,7 @@ transform: rotate(45deg); float: left; i{ - color: #525252; + color: #333; font-size: 1em!important; padding: 0!important; } diff --git a/assets/stylesheets/template/layout/bo5.scss b/assets/stylesheets/template/layout/bo5.scss index b808b7d..905091d 100644 --- a/assets/stylesheets/template/layout/bo5.scss +++ b/assets/stylesheets/template/layout/bo5.scss @@ -84,7 +84,7 @@ } @media (min-width: 769px) { .navbar-header { - float: left; + // float: left; } .navbar-nav{ flex-direction: row; diff --git a/assets/stylesheets/template/layout/header.scss b/assets/stylesheets/template/layout/header.scss index cf092e1..947fec3 100644 --- a/assets/stylesheets/template/layout/header.scss +++ b/assets/stylesheets/template/layout/header.scss @@ -4,6 +4,14 @@ #orbit-bar .orbit-bar-title a { color: #333 !important; } +sup { + line-height: 0; + font-size: 0.6em; +} +sup { + line-height: 0; + font-size: 0.6em; +} .outdropdowns{ width: 100%; z-index: 1; @@ -90,8 +98,9 @@ } } .navbar-header h1.default_site_h1, .navbar-header h2.default_site_h1{ - display: flex; - align-items: center; + // display: flex; + // align-items: center; + white-space: normal; } .navbar-header { z-index: 10; diff --git a/assets/stylesheets/template/modules/ad_banner.scss b/assets/stylesheets/template/modules/ad_banner.scss index c18a37b..e6eb765 100644 --- a/assets/stylesheets/template/modules/ad_banner.scss +++ b/assets/stylesheets/template/modules/ad_banner.scss @@ -398,6 +398,7 @@ ul.button-mid{ // Widget 11 .ad-banner-widget-11 { overflow: hidden; + border-radius: 2em; .prev-button,.next-button{ background-color: $theme-color-second!important; &:hover{ diff --git a/assets/stylesheets/template/modules/menu.scss b/assets/stylesheets/template/modules/menu.scss index 60f9ba5..1112027 100644 --- a/assets/stylesheets/template/modules/menu.scss +++ b/assets/stylesheets/template/modules/menu.scss @@ -410,10 +410,10 @@ display: block; font-family: $main-font; font-weight: 600; - color: #525252; + color: #333; font-size: 1em; @media(max-width: 768px){ - color: #525252; + color: #333; } } @@ -463,7 +463,7 @@ & > a { display: block; font-family: $main-font; - color:#525252; + color:#333; font-weight: 500; font-weight: bold; } diff --git a/home/header.html.erb b/home/header.html.erb index a1a7852..a5c1b22 100644 --- a/home/header.html.erb +++ b/home/header.html.erb @@ -18,13 +18,12 @@