From 4953a0d0c1129db288e7d83036adaee53ac8da46 Mon Sep 17 00:00:00 2001 From: ken Date: Mon, 21 Sep 2026 17:52:31 +0800 Subject: [PATCH] up --- assets/javascripts/app.js | 62 +++++++++++++------ .../stylesheets/template/base/_accesskey.scss | 7 ++- assets/stylesheets/template/base/_global.scss | 10 ++- assets/stylesheets/template/base/_unity.scss | 2 +- assets/stylesheets/template/layout/bo5.scss | 2 +- .../stylesheets/template/layout/content.scss | 12 ++-- .../stylesheets/template/layout/header.scss | 48 +++++++++----- .../template/modules/ad_banner.scss | 3 +- assets/stylesheets/template/modules/menu.scss | 10 +-- .../template/modules/web_resource.scss | 1 + assets/stylesheets/template/template.scss | 5 ++ home/header.html.erb | 9 ++- home/index.html.erb | 4 +- modules/announcement/_annc_widget5.html.erb | 2 +- 14 files changed, 116 insertions(+), 61 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..3215c26 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; - margin-left: 0; + position: absolute!important; + margin-left: -0.5em!important; + 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 7d972d4..4e21f24 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; @@ -192,12 +192,16 @@ body { margin-top: 2.5em; overflow: hidden scroll; letter-spacing: 0.5px; + .verticalhome-wrapper { + position: relative; + clear: both; + } @media(min-width:769px){ .verticalhome-wrapper,.layout-header,.layout-footer-inner{ 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/content.scss b/assets/stylesheets/template/layout/content.scss index 398e062..5c422a0 100644 --- a/assets/stylesheets/template/layout/content.scss +++ b/assets/stylesheets/template/layout/content.scss @@ -95,22 +95,22 @@ position: relative; width: 100%; // background-image: linear-gradient(280deg, #e6e6e6 56%, #fff 0); - padding-top: 2em; - padding-bottom: 2em; + padding-top: 1em; + padding-bottom: 1em; } .contentwrap2{ overflow: hidden; position: relative; width: 100%; - padding-top: 2em; - padding-bottom: 2em; + padding-top: 1em; + padding-bottom: 1em; } .contentwrap3{ overflow: hidden; position: relative; width: 100%; - padding-top: 2em; - padding-bottom: 2em; + padding-top: 1em; + padding-bottom: 1em; } .iconwrap{ padding: 4em 0 0; diff --git a/assets/stylesheets/template/layout/header.scss b/assets/stylesheets/template/layout/header.scss index 1a6e137..e65af20 100644 --- a/assets/stylesheets/template/layout/header.scss +++ b/assets/stylesheets/template/layout/header.scss @@ -4,6 +4,15 @@ #orbit-bar .orbit-bar-title a { color: #333 !important; } +sup { + line-height: 0; + font-size: 0.6em; +} +.dropdowns{ + @media(min-width:769px){ + padding: 0!important; + } +} .outdropdowns{ width: 100%; z-index: 1; @@ -43,7 +52,7 @@ list-style: none; } a[accesskey]{ - position: relative; + position: absolute!important; } .container { @@ -90,22 +99,30 @@ } } .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; + font-size: 0.8em; + line-height: 1.5; + color: $theme-color-second; + sup{ + color: #6a6a6a; + clear: both; + } + & > * { + clear: both; + display: block; + } } .navbar-header { z-index: 10; position: relative; padding: 0; margin: 0; - display: flex; - justify-content: space-between; - align-items: anchor-center; - // @media (max-width: $screen-sm) { - // width: 100%; - // display: flex; - // flex-flow: row-reverse; - // } + @media (min-width: $screen-sm) { + border-right: 1px solid #cccccc87; + padding-bottom: 1em; + } .navbar-brand { line-height: 2.125em; color: $theme-color-main; @@ -135,15 +152,15 @@ font-weight: bold; } } - @media (max-width: 768px){ max-width: 270px; + float: left; } @media (max-width: 480px) { h1{ margin: 0; } - width: 70%; + width: 100%; padding: 0; margin: 0; white-space: normal; @@ -153,8 +170,11 @@ margin-right:0; float: left; height: auto; - padding-right: 0.5em; + padding-right: 1em; width: 100%!important; + @media(min-width: 769px){ + margin-bottom: 0.5em; + } // @media(min-width: 1024px){ // height: 50px; // } diff --git a/assets/stylesheets/template/modules/ad_banner.scss b/assets/stylesheets/template/modules/ad_banner.scss index c18a37b..e609f6b 100644 --- a/assets/stylesheets/template/modules/ad_banner.scss +++ b/assets/stylesheets/template/modules/ad_banner.scss @@ -386,7 +386,7 @@ ul.button-mid{ .ad-overlay { padding:1em; position: relative; - background: $theme-color-second; + background: $theme-color-second!important; } .controlplay { right: 0; @@ -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..a5b5100 100644 --- a/assets/stylesheets/template/modules/menu.scss +++ b/assets/stylesheets/template/modules/menu.scss @@ -26,13 +26,14 @@ @media(min-width: 769px){ float: right!important; width: 80%!important; - border-left: 1px solid #cccccc87; + padding-left: 1em; } } .homebanner{ @media(min-width: 769px){ float: right!important; width: 80%!important; + padding-left: 1em; .ba-banner-widget-0 img{ transform: none!important; } @@ -145,6 +146,7 @@ #layout-navigation{ @media(min-width: 769px){ width: 100%; + border-right: 1px solid #cccccc87; } } .navbar-collapse.in { @@ -410,10 +412,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 +465,7 @@ & > a { display: block; font-family: $main-font; - color:#525252; + color:#333; font-weight: 500; font-weight: bold; } diff --git a/assets/stylesheets/template/modules/web_resource.scss b/assets/stylesheets/template/modules/web_resource.scss index 6983ed2..5e777cb 100644 --- a/assets/stylesheets/template/modules/web_resource.scss +++ b/assets/stylesheets/template/modules/web_resource.scss @@ -139,6 +139,7 @@ .widget-content { border-radius: 1em; overflow: hidden; + padding: 0; &:hover{ transition: all 0.3s; background-color: rgba($theme-color-second, 0.1); diff --git a/assets/stylesheets/template/template.scss b/assets/stylesheets/template/template.scss index ff0183f..0440574 100644 --- a/assets/stylesheets/template/template.scss +++ b/assets/stylesheets/template/template.scss @@ -118,6 +118,11 @@ input:hover { transform: translateX(-0.75em); } } +.membercontainer{ + @media (min-width: 769px){ + padding: 0; + } +} // container setting .response-container { position: relative; 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 @@