From 6fac1fd1c0a9b68b294d3f04ecf4ef7b2bf29a9f Mon Sep 17 00:00:00 2001 From: Bohung Date: Mon, 28 Jun 2021 22:29:19 +0800 Subject: [PATCH] Update. Fix accessibility. --- assets/javascripts/app.js | 3 +++ assets/stylesheets/bootstrap/_variables.scss | 20 +++++++++---------- assets/stylesheets/template/RWD.scss | 11 +++++----- .../stylesheets/template/base/_variables.scss | 3 +++ .../template/jquery.scrolling-tabs.min.css | 2 +- .../stylesheets/template/layout/content.scss | 4 ++-- .../stylesheets/template/layout/header.scss | 4 ++-- assets/stylesheets/template/layout/slide.scss | 2 +- .../template/modules/ad_banner.scss | 9 +++++---- .../template/modules/announcement.scss | 2 +- assets/stylesheets/template/modules/menu.scss | 19 +++++++++++------- assets/stylesheets/template/template.scss | 2 +- home/footer.html.erb | 2 +- home/header.html.erb | 2 +- modules/announcement/announcement.scss | 2 +- modules/member/member_index2.html.erb | 2 +- modules/member/member_index3.html.erb | 2 +- modules/member/member_index4.html.erb | 2 +- modules/member/member_index5.html.erb | 2 +- 19 files changed, 53 insertions(+), 42 deletions(-) diff --git a/assets/javascripts/app.js b/assets/javascripts/app.js index 13f66c9..49119b6 100644 --- a/assets/javascripts/app.js +++ b/assets/javascripts/app.js @@ -216,6 +216,8 @@ $nav .find('.opened') .removeClass('opened'); + $('.modules-menu-level-0 ul').css('display',''); + $nav.find(".has-dropdown").removeClass("has-dropdown"); }, // 網站次選單設定,如果次選單有第三層就新增下拉選單的圖示及加上bootstrap class // els = 選單元素 @@ -496,6 +498,7 @@ //背景widget設定 if ( location.href.search('editmode=on') != -1 ) { $('.background').css('z-index','2'); + $('[data-pp="300"]').css('z-index','2'); } else { $('.background').css('z-index','-1'); }; diff --git a/assets/stylesheets/bootstrap/_variables.scss b/assets/stylesheets/bootstrap/_variables.scss index 83a9527..e3056d9 100644 --- a/assets/stylesheets/bootstrap/_variables.scss +++ b/assets/stylesheets/bootstrap/_variables.scss @@ -49,7 +49,7 @@ $font-family-serif: Georgia, "Times New Roman", Times, serif !default; $font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace !default; $font-family-base: $font-family-sans-serif !default; -$font-size-base: 14px !default; +$font-size-base: 0.875em !default; $font-size-large: ceil(($font-size-base * 1.25)) !default; // ~18px $font-size-small: ceil(($font-size-base * 0.85)) !default; // ~12px @@ -84,17 +84,17 @@ $icon-font-svg-id: "glyphicons_halflingsregular" !default; // //## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start). -$padding-base-vertical: 6px !default; -$padding-base-horizontal: 12px !default; +$padding-base-vertical: 0.375em !default; +$padding-base-horizontal: 0.75em !default; -$padding-large-vertical: 10px !default; -$padding-large-horizontal: 16px !default; +$padding-large-vertical: 0.625em !default; +$padding-large-horizontal: 1em !default; -$padding-small-vertical: 5px !default; -$padding-small-horizontal: 10px !default; +$padding-small-vertical: 0.3125em !default; +$padding-small-horizontal: 0.625em !default; -$padding-xs-vertical: 1px !default; -$padding-xs-horizontal: 5px !default; +$padding-xs-vertical: 0.0625em !default; +$padding-xs-horizontal: 0.3125em !default; $line-height-large: 1.33 !default; $line-height-small: 1.5 !default; @@ -330,7 +330,7 @@ $container-lg: $container-large-desktop !default; //## // Basics of a navbar -$navbar-height: 50px !default; +$navbar-height: 3.125em !default; $navbar-margin-bottom: $line-height-computed !default; $navbar-border-radius: $border-radius-base !default; $navbar-padding-horizontal: floor(($grid-gutter-width / 2)) !default; diff --git a/assets/stylesheets/template/RWD.scss b/assets/stylesheets/template/RWD.scss index 901b12f..8b6e8a3 100644 --- a/assets/stylesheets/template/RWD.scss +++ b/assets/stylesheets/template/RWD.scss @@ -2,8 +2,9 @@ @import "initial"; @media(max-width: 767px) { + .layout-header .navbar-header .navbar-brand{ margin: 0; padding: 0;} .modules-menu .modules-menu-level-0>li:hover>a { color: #333; background: none; } - .layout-header .header-nav { display: none; } + .layout-header .header-nav { float: right; padding: 1em; } .layout-content { display: flex; flex-direction: column; @@ -14,27 +15,25 @@ } .layout-header .cover { transform: scale(1.5); } .layout-header .navbar-header .navbar-brand .site-logo { - width: 7em; + width: 100%; background: rgba(255,255,255,0.6); padding: 0.5em; } .layout-header .container { padding: 0; overflow: hidden; } .layout-header .navbar-header { margin: 0; } - .layout-header .user-header { position: unset; } .modules-menu .modules-menu-level-0 > li { margin: 0; padding: 0; } .modules-menu .modules-menu-level-0 > li > a { line-height: 1; } .layout-content.container { padding: 0; } .layout-content section[data-pp="6"] { background: unset; padding: 0; } .internal-page .layout-header .navbar-header { - position: absolute; top: 0; right: 0; width: 100%; } - .internal-page .layout-header .navbar-header .navbar-toggle { + .layout-header .navbar-header .navbar-toggle { background: rgba(255, 255, 255, 0.6); } - .internal-page .layout-header .navbar-header .navbar-toggle .icon-bar { + .layout-header .navbar-header .navbar-toggle .icon-bar { background-color: #d32443; } .internal-page .layout-content .layout-content-inner { padding: 0; } diff --git a/assets/stylesheets/template/base/_variables.scss b/assets/stylesheets/template/base/_variables.scss index fedb06a..f88ab92 100644 --- a/assets/stylesheets/template/base/_variables.scss +++ b/assets/stylesheets/template/base/_variables.scss @@ -11,6 +11,9 @@ $theme-gray-darker: #242424; $theme-white: #fff; $theme-red: #d20001; $theme-blue: #003d7e; +$theme-brown: #a05903; +$theme-brown-light: #db7c09; +$theme-brown-dark: #603500; $theme-color-main: #1e964a; $theme-color-second: #a31a08; diff --git a/assets/stylesheets/template/jquery.scrolling-tabs.min.css b/assets/stylesheets/template/jquery.scrolling-tabs.min.css index 5e406e9..f747523 100644 --- a/assets/stylesheets/template/jquery.scrolling-tabs.min.css +++ b/assets/stylesheets/template/jquery.scrolling-tabs.min.css @@ -5,4 +5,4 @@ * @author Mike Jacobson * @license MIT License, http://www.opensource.org/licenses/MIT */ -.scrtabs-tab-container *{box-sizing:border-box}.scrtabs-tab-container{height:42px}.scrtabs-tab-container .tab-content{clear:left}.scrtabs-tab-container.scrtabs-bootstrap4 .scrtabs-tabs-movable-container>.navbar-nav{-ms-flex-direction:row;flex-direction:row}.scrtabs-tabs-fixed-container{float:left;height:42px;overflow:hidden;width:100%}.scrtabs-tabs-movable-container{position:relative}.scrtabs-tabs-movable-container .tab-content{display:none}.scrtabs-tab-container.scrtabs-rtl .scrtabs-tabs-movable-container>ul.nav-tabs{padding-right:0}.scrtabs-tab-scroll-arrow{border:1px solid #ddd;border-top:none;color:#428bca;display:none;float:left;font-size:12px;height:42px;margin-bottom:-1px;padding-left:2px;padding-top:13px;width:20px}.scrtabs-tab-scroll-arrow:hover{background-color:#eee}.scrtabs-tab-scroll-arrow,.scrtabs-tab-scroll-arrow .scrtabs-click-target{cursor:pointer}.scrtabs-tab-scroll-arrow.scrtabs-with-click-target{cursor:default}.scrtabs-tab-scroll-arrow.scrtabs-disable,.scrtabs-tab-scroll-arrow.scrtabs-disable .scrtabs-click-target{color:#ddd;cursor:default}.scrtabs-tab-scroll-arrow.scrtabs-disable:hover{background-color:initial}.scrtabs-tabs-fixed-container ul.nav-tabs>li{white-space:nowrap} \ No newline at end of file +.scrtabs-tab-container *{box-sizing:border-box}.scrtabs-tab-container{height:42px}.scrtabs-tab-container .tab-content{clear:left}.scrtabs-tab-container.scrtabs-bootstrap4 .scrtabs-tabs-movable-container>.navbar-nav{-ms-flex-direction:row;flex-direction:row}.scrtabs-tabs-fixed-container{float:left;height:42px;overflow:hidden;width:100%}.scrtabs-tabs-movable-container{position:relative}.scrtabs-tabs-movable-container .tab-content{display:none}.scrtabs-tab-container.scrtabs-rtl .scrtabs-tabs-movable-container>ul.nav-tabs{padding-right:0}.scrtabs-tab-scroll-arrow{border:1px solid #ddd;border-top:none;color:#428bca;display:none;float:left;font-size:0.75em;height:42px;margin-bottom:-1px;padding-left:2px;padding-top:13px;width:20px}.scrtabs-tab-scroll-arrow:hover{background-color:#eee}.scrtabs-tab-scroll-arrow,.scrtabs-tab-scroll-arrow .scrtabs-click-target{cursor:pointer}.scrtabs-tab-scroll-arrow.scrtabs-with-click-target{cursor:default}.scrtabs-tab-scroll-arrow.scrtabs-disable,.scrtabs-tab-scroll-arrow.scrtabs-disable .scrtabs-click-target{color:#ddd;cursor:default}.scrtabs-tab-scroll-arrow.scrtabs-disable:hover{background-color:initial}.scrtabs-tabs-fixed-container ul.nav-tabs>li{white-space:nowrap} \ No newline at end of file diff --git a/assets/stylesheets/template/layout/content.scss b/assets/stylesheets/template/layout/content.scss index 4b3aadb..798bb19 100644 --- a/assets/stylesheets/template/layout/content.scss +++ b/assets/stylesheets/template/layout/content.scss @@ -12,7 +12,7 @@ .layout-content-inner { width: 80.5%; float: right; - padding: 25% 2% 0; + padding: 0; @media(max-width:767px) { width: 100%; @@ -54,5 +54,5 @@ } .internal-page { - .layout-content .layout-content-inner { padding: 12% 0% 0; } + .layout-content .layout-content-inner { padding: 0; } } \ No newline at end of file diff --git a/assets/stylesheets/template/layout/header.scss b/assets/stylesheets/template/layout/header.scss index b2f9dd8..d24d2b8 100644 --- a/assets/stylesheets/template/layout/header.scss +++ b/assets/stylesheets/template/layout/header.scss @@ -55,7 +55,7 @@ } a { - color: $theme-white; + color: $theme-color-main; text-decoration: none; text-shadow: 3px 2px 5px rgba(0,0,0,0.4); padding: 0 0.5em; @@ -78,7 +78,7 @@ border-width: 0.125em; position: absolute; right: 0; - top: 1em; + top: 2em; .icon-bar { background-color: $theme-white; diff --git a/assets/stylesheets/template/layout/slide.scss b/assets/stylesheets/template/layout/slide.scss index fbafbbe..3670f3a 100644 --- a/assets/stylesheets/template/layout/slide.scss +++ b/assets/stylesheets/template/layout/slide.scss @@ -4,7 +4,7 @@ .layout-slide { position: relative; - z-index: 0; + z-index: 1; .w-ad-banner { max-width: 75em; diff --git a/assets/stylesheets/template/modules/ad_banner.scss b/assets/stylesheets/template/modules/ad_banner.scss index 414a29c..3491194 100644 --- a/assets/stylesheets/template/modules/ad_banner.scss +++ b/assets/stylesheets/template/modules/ad_banner.scss @@ -103,8 +103,7 @@ ul.button-mid{ position: relative; float:left; left: 0.9375em; - width: 3.4375em; - background: url(/assets/prev.png) no-repeat center; + width: 1.5em; z-index: 1000; border:0; height: 100%; @@ -114,8 +113,7 @@ ul.button-mid{ transition: 0.4s; position: relative; right: 0.9375em; - width: 3.4375em; - background: url(/assets/next.png) no-repeat center; + width: 1.5em; z-index: 1000; border:0; height: 100%; @@ -144,6 +142,9 @@ ul.button-mid{ font-size: $w-caption-desc; } } + .banner-pager{ + position: absolute; + } } // Widget 2 diff --git a/assets/stylesheets/template/modules/announcement.scss b/assets/stylesheets/template/modules/announcement.scss index 18e23d2..0b08e72 100644 --- a/assets/stylesheets/template/modules/announcement.scss +++ b/assets/stylesheets/template/modules/announcement.scss @@ -1021,7 +1021,7 @@ table.dataTable.dtr-inline.collapsed>tbody>tr.parent>td:first-child:before, tabl min-height: 30px; line-height: 20px; text-align: center; - font-size: 16px; + font-size: 1em; font-weight: bold; cursor: pointer; } diff --git a/assets/stylesheets/template/modules/menu.scss b/assets/stylesheets/template/modules/menu.scss index f7c94c1..9242634 100644 --- a/assets/stylesheets/template/modules/menu.scss +++ b/assets/stylesheets/template/modules/menu.scss @@ -112,7 +112,13 @@ color: #fff; background: url(/assets/meuhover.png) left top no-repeat; } + & > ul{ + display: block; + } } + &.has-dropdown:hover ul{ + display: none; + } @media (min-width: $screen-sm) { position: relative; @@ -173,6 +179,8 @@ .modules-menu-level-1 { display: none; + left: 99px; + top: 0; // max-height: 0; // overflow: hidden; // -moz-transition: all 0.3s; @@ -183,7 +191,7 @@ min-width: 100%; margin: 0; padding: 0; - background-color: $theme-gray; + background-color: $theme-brown; list-style: none; z-index: 1; @@ -202,10 +210,7 @@ } &:hover { - background-color: $theme-color-second; - & > a { - color: $theme-color-main; - } + background-color: $theme-brown-dark; } } @@ -245,7 +250,7 @@ // transition: all 0.3s; margin: 0; padding: 0; - background-color: $theme-gray; + background-color: $theme-brown-light; list-style: none; & > li { @@ -262,7 +267,7 @@ } &:hover { - background-color: $theme-color-second; + background-color: $theme-brown; } } diff --git a/assets/stylesheets/template/template.scss b/assets/stylesheets/template/template.scss index 0698211..c53d817 100644 --- a/assets/stylesheets/template/template.scss +++ b/assets/stylesheets/template/template.scss @@ -73,7 +73,7 @@ padding: 5px 10px; background: $theme-color-main; color:#fff; - font-size: 18px; + font-size: 1.125em; transition:.3s; &:hover{ background: $theme-color-second; diff --git a/home/footer.html.erb b/home/footer.html.erb index bf647ba..48ed067 100644 --- a/home/footer.html.erb +++ b/home/footer.html.erb @@ -1,7 +1,7 @@
\ No newline at end of file diff --git a/home/header.html.erb b/home/header.html.erb index e5f4c15..3341cb0 100644 --- a/home/header.html.erb +++ b/home/header.html.erb @@ -26,7 +26,7 @@ {{site_name}}
-
+
cover image
diff --git a/modules/announcement/announcement.scss b/modules/announcement/announcement.scss index 2f62f1a..22e7861 100644 --- a/modules/announcement/announcement.scss +++ b/modules/announcement/announcement.scss @@ -830,7 +830,7 @@ .s-annc__social .print-button { color: #fff; - font-size: 11px; + font-size: 0.6875em; border-radius: 4px; padding: 2px 6px; background-color: $theme-color-main; diff --git a/modules/member/member_index2.html.erb b/modules/member/member_index2.html.erb index bef4ea9..255a6b0 100644 --- a/modules/member/member_index2.html.erb +++ b/modules/member/member_index2.html.erb @@ -12,7 +12,7 @@
  • - {{title}} + {{title}} : {{value}}
diff --git a/modules/member/member_index3.html.erb b/modules/member/member_index3.html.erb index 0454f5a..17848b3 100644 --- a/modules/member/member_index3.html.erb +++ b/modules/member/member_index3.html.erb @@ -12,7 +12,7 @@
  • - {{title}} + {{title}} : {{value}}
diff --git a/modules/member/member_index4.html.erb b/modules/member/member_index4.html.erb index 2173460..25a580a 100644 --- a/modules/member/member_index4.html.erb +++ b/modules/member/member_index4.html.erb @@ -9,7 +9,7 @@
  • - {{title}} + {{title}} : {{value}}
diff --git a/modules/member/member_index5.html.erb b/modules/member/member_index5.html.erb index 999678b..41f169c 100644 --- a/modules/member/member_index5.html.erb +++ b/modules/member/member_index5.html.erb @@ -12,7 +12,7 @@
  • - {{title}} + {{title}} : {{value}}