From df393aed616359f31cd17f39b886af38f69f21fb Mon Sep 17 00:00:00 2001 From: ken Date: Thu, 21 Aug 2025 13:46:58 +0800 Subject: [PATCH] 'menu' --- .../stylesheets/template/layout/header.scss | 2 +- assets/stylesheets/template/modules/menu.scss | 147 +++++++++--------- 2 files changed, 74 insertions(+), 75 deletions(-) diff --git a/assets/stylesheets/template/layout/header.scss b/assets/stylesheets/template/layout/header.scss index 18a6687..28f5154 100644 --- a/assets/stylesheets/template/layout/header.scss +++ b/assets/stylesheets/template/layout/header.scss @@ -56,7 +56,7 @@ } .header-banner { overflow: hidden; } .header-nav { - padding:0; + padding:1em 0 0 0; font-family: $main-font; text-transform:uppercase; display: flex; diff --git a/assets/stylesheets/template/modules/menu.scss b/assets/stylesheets/template/modules/menu.scss index 271b22b..80c1eff 100644 --- a/assets/stylesheets/template/modules/menu.scss +++ b/assets/stylesheets/template/modules/menu.scss @@ -2,79 +2,79 @@ @import "../initial"; -// // 選單樣式2 -// .modules-menu .modules-menu-level-1 > li:hover, .modules-menu .modules-menu-level-1 > li.hover-class{ -// background-color: transparent!important; -// >a{ -// text-decoration: underline; -// } -// } -// .modules-menu{ -// @media (min-width: $screen-sm){ -// li{ -// padding-left: 0!important; -// } -// .modules-menu-level-1 > li > a{ -// color: $theme-color-second!important; -// } -// } -// .modules-menu-level-0 > li{ -// @media (min-width: $screen-sm){ -// position: static!important; -// } -// } -// -// .modules-menu-level-1{ -// -// @media (min-width: $screen-sm){ -// min-width:unset; -// flex-wrap: wrap; -// justify-content: flex-start; -// display: flex!important; -// visibility: hidden; -// opacity: 0; -// width: 100vw!important; -// box-shadow: 2px 2px 5px #00000033; -// margin:0; -// padding:1em 13% 3em!important; -// transition-duration: 0.5s; -// background: #f0f0f0; -// } -// } -// .modules-menu-level-0 > li:hover .modules-menu-level-1, .modules-menu .modules-menu-level-0 > li.hover-class .modules-menu-level-1{ -// visibility: visible!important; -// opacity: 1!important; -// } -// -// .modules-menu-level-2 { -// right:auto!important; -// display: block; -// top: auto!important; -// left: auto!important; -// background-color: transparent!important; -// position: relative!important; -// } -// .modules-menu-level-1{ -// @media (min-width: $screen-sm) { -// & > li { -// width: 25%; -// & > a { -// padding-left: 1em; -// padding: 5px 0; -// } -// -// &:hover { -// .modules-menu-level-2 { -// display: block; -// } -// } -// } -// .modules-menu-level-2{ -// display: block; -// } -// } -// } -// } +// 選單樣式2 +.modules-menu .modules-menu-level-1 > li:hover, .modules-menu .modules-menu-level-1 > li.hover-class{ + background-color: transparent!important; + >a{ + text-decoration: underline; + } +} +.modules-menu{ + @media (min-width: $screen-sm){ + li{ + padding-left: 0!important; + } + .modules-menu-level-1 > li > a{ + color: $theme-color-second!important; + } + } + .modules-menu-level-0 > li{ + @media (min-width: $screen-sm){ + position: static!important; + } + } + + .modules-menu-level-1{ + + @media (min-width: $screen-sm){ + min-width:unset; + flex-wrap: wrap; + justify-content: flex-start; + display: flex!important; + visibility: hidden; + opacity: 0; + width: 100vw!important; + box-shadow: 2px 2px 5px #00000033; + margin:0; + padding:1em 13% 3em!important; + transition-duration: 0.5s; + background: #f0f0f0; + } + } + .modules-menu-level-0 > li:hover .modules-menu-level-1, .modules-menu .modules-menu-level-0 > li.hover-class .modules-menu-level-1{ + visibility: visible!important; + opacity: 1!important; + } + + .modules-menu-level-2 { + right:auto!important; + display: block; + top: auto!important; + left: auto!important; + background-color: transparent!important; + position: relative!important; + } + .modules-menu-level-1{ + @media (min-width: $screen-sm) { + & > li { + width: 25%; + & > a { + padding-left: 1em; + padding: 5px 0; + } + + &:hover { + .modules-menu-level-2 { + display: block; + } + } + } + .modules-menu-level-2{ + display: block; + } + } + } +} //固定選單 .navFixed { @@ -419,7 +419,6 @@ } &:hover { -/* background-color: $theme-color-second;*/ @media(max-width: 769px){ a,i { color:$theme-color-second;