From ae4037b21857dd8d54f25a4ed0fcd7308be9ff4e Mon Sep 17 00:00:00 2001 From: hzm <934585316@qq.com> Date: Mon, 16 Feb 2026 10:19:38 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9APC/=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E7=AD=9B=E9=80=89=E6=A0=8F=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/globals.css | 40 +++++++++++++++++++++++++++++++++++--- app/page.jsx | 51 ++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 79 insertions(+), 12 deletions(-) diff --git a/app/globals.css b/app/globals.css index bf22c87..1dbeeea 100644 --- a/app/globals.css +++ b/app/globals.css @@ -93,7 +93,7 @@ body { .navbar { position: fixed; - top: 16px; + top: 0; left: 16px; right: 16px; z-index: 50; @@ -177,6 +177,41 @@ body { height: auto; } +/* Mobile Search Logic */ +@media (max-width: 640px) { + /* Default: Search hidden, Trigger visible */ + .navbar-add-fund { + display: none; + } + + .mobile-search-btn { + display: inline-flex !important; + } + + /* When search focused/active */ + .brand.search-focused-sibling { + display: none !important; + } + + .actions.search-focused-sibling { + display: none !important; + } + + .navbar-add-fund.search-focused { + display: flex !important; + max-width: 100% !important; + width: 100% !important; + flex: 1; + margin-top: 0 !important; + } +} + +/* Desktop: Trigger hidden */ +.mobile-search-btn { + display: none; +} + + .navbar-input-field { flex: 1; min-width: 120px; @@ -198,7 +233,7 @@ body { } .content { - padding-top: 100px; + /*padding-top: 100px;*/ } @media (max-width: 640px) { @@ -766,7 +801,6 @@ input[type="number"] { .filter-bar { transition: all 0.3s ease; position: sticky; - top: 90px; z-index: 40; background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(12px); diff --git a/app/page.jsx b/app/page.jsx index efe1025..0b31c93 100644 --- a/app/page.jsx +++ b/app/page.jsx @@ -1726,7 +1726,7 @@ function CountUp({ value, prefix = '', suffix = '', decimals = 2, className = '' ); } -function GroupSummary({ funds, holdings, groupName, getProfit }) { +function GroupSummary({ funds, holdings, groupName, getProfit, stickyTop }) { const [showPercent, setShowPercent] = useState(true); const [isMasked, setIsMasked] = useState(false); const [isSticky, setIsSticky] = useState(false); @@ -1791,7 +1791,7 @@ function GroupSummary({ funds, holdings, groupName, getProfit }) { if (!summary.hasHolding) return null; return ( -