From 8480b71873ced754ccd4e97538d7952ea3b591a5 Mon Sep 17 00:00:00 2001 From: peijunlei Date: Mon, 31 Aug 2026 16:15:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E5=AD=90=E7=BB=84=E5=B1=95=E5=BC=80/=E6=94=B6=E8=B5=B7?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=B9=B6=E6=9B=B4=E6=96=B0=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/themes/dist_static/static/css/common.css | 43 +++++++++++++++------- public/themes/dist_static/static/js/common.js | 8 ++++ public/themes/preview/demo/single_index.html | 2 +- public/themes/website/1/zh/demo/about.html | 2 +- public/themes/website/1/zh/demo/announce.html | 2 +- public/themes/website/1/zh/demo/category.html | 2 +- .../website/1/zh/demo/components/header.html | 9 ++++- public/themes/website/1/zh/demo/contact.html | 2 +- public/themes/website/1/zh/demo/download.html | 2 +- public/themes/website/1/zh/demo/faq.html | 2 +- public/themes/website/1/zh/demo/investment.html | 2 +- public/themes/website/1/zh/demo/news-detail.html | 2 +- public/themes/website/1/zh/demo/news.html | 2 +- public/themes/website/1/zh/demo/search.html | 2 +- public/themes/website/1/zh/demo/single_index.html | 2 +- public/themes/website/1/zh/demo/solution.html | 2 +- public/themes/website/1/zh/demo/solution2.html | 2 +- public/themes/website/1/zh/demo/video.html | 2 +- 18 files changed, 61 insertions(+), 29 deletions(-) diff --git a/public/themes/dist_static/static/css/common.css b/public/themes/dist_static/static/css/common.css index 1f20e19..d56bb03 100644 --- a/public/themes/dist_static/static/css/common.css +++ b/public/themes/dist_static/static/css/common.css @@ -1466,6 +1466,36 @@ body { display: flex; flex-direction: column; gap: 1rem; +}.nav-mega__subgroup-head { + display: flex; + align-items: center; + gap: 0.5rem; +}.nav-mega__subgroup-toggle { + display: flex; + align-items: center; + justify-content: center; + width: 1.5rem; + height: 1.5rem; + padding: 0; + border: none; + background: transparent; + color: var(--color-text-muted); + cursor: pointer; + flex-shrink: 0; + transition: color var(--duration-fast) var(--easing), transform var(--duration-normal) var(--easing); +}.nav-mega__subgroup-toggle svg { + width: 0.5rem; + height: 0.75rem; + display: block; +}.nav-mega__subgroup-toggle:hover { + color: var(--color-primary); +}.nav-mega__subgroup.is-expanded .nav-mega__subgroup-toggle { + transform: rotate(90deg); + color: var(--color-primary); +}.nav-mega__subgroup .nav-mega__links { + display: none; +}.nav-mega__subgroup.is-expanded .nav-mega__links { + display: flex; }.nav-mega__subgroup-title { display: inline-flex; align-items: center; @@ -1477,21 +1507,8 @@ body { line-height: var(--font-22); text-decoration: none; transition: color var(--duration-fast) var(--easing); -}.nav-mega__subgroup-title::after { - content: ""; - display: block; - flex-shrink: 0; - width: 0.5rem; - height: 0.75rem; - background: currentColor; - opacity: 0; - transition: opacity var(--duration-normal) var(--easing); - mask: url("data:image/svg+xml,%3csvg%20viewBox='-1%20-1%208.59082%2013.0605'%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%3e%3cpath%20d='M0%204.12464e-05L5%205.00004L10%200'%20stroke='currentColor'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'%20transform='matrix(0,-1,1,0,0.530273,10.5303)'%20/%3e%3c/svg%3e") center/contain no-repeat; - -webkit-mask: url("data:image/svg+xml,%3csvg%20viewBox='-1%20-1%208.59082%2013.0605'%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%3e%3cpath%20d='M0%204.12464e-05L5%205.00004L10%200'%20stroke='currentColor'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'%20transform='matrix(0,-1,1,0,0.530273,10.5303)'%20/%3e%3c/svg%3e") center/contain no-repeat; }.nav-mega__subgroup-title:hover { color: var(--color-primary); -}.nav-mega__subgroup-title:hover::after { - opacity: 1; }.nav-mega__links { display: flex; flex-direction: column; diff --git a/public/themes/dist_static/static/js/common.js b/public/themes/dist_static/static/js/common.js index 1d9c82f..8411a14 100644 --- a/public/themes/dist_static/static/js/common.js +++ b/public/themes/dist_static/static/js/common.js @@ -138,5 +138,13 @@ $(function() { this.classList.toggle("is-active", match); }); }); + + // nav-mega__subgroup-toggle 点击展开/收起 + $(document).on("click", ".nav-mega__subgroup-toggle", function() { + const $subgroup = $(this).closest(".nav-mega__subgroup"); + const isExpanded = $subgroup.hasClass("is-expanded"); + $subgroup.toggleClass("is-expanded", !isExpanded); + $(this).attr("aria-expanded", !isExpanded); + }); }); //#endregion diff --git a/public/themes/preview/demo/single_index.html b/public/themes/preview/demo/single_index.html index 075ec92..e30cb83 100644 --- a/public/themes/preview/demo/single_index.html +++ b/public/themes/preview/demo/single_index.html @@ -51,7 +51,7 @@ - + diff --git a/public/themes/website/1/zh/demo/about.html b/public/themes/website/1/zh/demo/about.html index 7be56fb..94b02c7 100644 --- a/public/themes/website/1/zh/demo/about.html +++ b/public/themes/website/1/zh/demo/about.html @@ -44,7 +44,7 @@ - + diff --git a/public/themes/website/1/zh/demo/announce.html b/public/themes/website/1/zh/demo/announce.html index fd37cd0..c4f74a5 100644 --- a/public/themes/website/1/zh/demo/announce.html +++ b/public/themes/website/1/zh/demo/announce.html @@ -44,7 +44,7 @@ - + diff --git a/public/themes/website/1/zh/demo/category.html b/public/themes/website/1/zh/demo/category.html index f5d05ad..9d8af96 100644 --- a/public/themes/website/1/zh/demo/category.html +++ b/public/themes/website/1/zh/demo/category.html @@ -44,7 +44,7 @@ - + diff --git a/public/themes/website/1/zh/demo/components/header.html b/public/themes/website/1/zh/demo/components/header.html index 60ac992..11f410f 100644 --- a/public/themes/website/1/zh/demo/components/header.html +++ b/public/themes/website/1/zh/demo/components/header.html @@ -273,7 +273,14 @@ {hcTaglib:subcategory pid="$sub_cate_id22" item="vo33" sort=""}