Commit c55c6b1d authored by xuchentao's avatar xuchentao

feat: 首页元素精简、导航符号移除与标题断行优化

- 首页:删除「向下探索」及竖线、hero 角标黑块,清理 hero-seal 残留样式
- 导航:删除菜单项右侧 ⌄ 符号及其样式
- 标题:首页主标题 keep-all 防止「心意」拆行,加宽文字列并调整字号;
  全局标题改用 text-wrap: pretty 自适应优化换行
parent aa954e49
...@@ -19,7 +19,7 @@ const nav = site.nav.map((item) => item.href === "/articles/" ? { ...item, child ...@@ -19,7 +19,7 @@ const nav = site.nav.map((item) => item.href === "/articles/" ? { ...item, child
<a class="brand" href="/" aria-label="银妆银饰首页"><Image src={logo} width={308} height={119} format="webp" quality={90} alt="银妆银饰 INZUNG" /></a> <a class="brand" href="/" aria-label="银妆银饰首页"><Image src={logo} width={308} height={119} format="webp" quality={90} alt="银妆银饰 INZUNG" /></a>
<nav class="desktop-nav" aria-label="主导航"> <nav class="desktop-nav" aria-label="主导航">
<ul>{nav.map((item) => <li class="nav-item"> <ul>{nav.map((item) => <li class="nav-item">
<a class="nav-link" href={item.href} aria-current={isActive(item.href) ? "page" : undefined}>{item.label}<span class="nav-chevron" aria-hidden="true">⌄</span></a> <a class="nav-link" href={item.href} aria-current={isActive(item.href) ? "page" : undefined}>{item.label}</a>
<div class="nav-dropdown"><ul>{item.children.map((child) => <li><a href={child.href}>{child.label}<span aria-hidden="true">↗</span></a></li>)}</ul></div> <div class="nav-dropdown"><ul>{item.children.map((child) => <li><a href={child.href}>{child.label}<span aria-hidden="true">↗</span></a></li>)}</ul></div>
</li>)}</ul> </li>)}</ul>
</nav> </nav>
......
...@@ -30,10 +30,8 @@ const jsonLd = { "@context": "https://schema.org", "@type": "WebSite", name: sit ...@@ -30,10 +30,8 @@ const jsonLd = { "@context": "https://schema.org", "@type": "WebSite", name: sit
</div> </div>
<div class="hero__visual" data-reveal> <div class="hero__visual" data-reveal>
<div class="hero__image"><Image src={hero} widths={[480, 720, 960]} sizes="(max-width: 760px) calc(100vw - 60px), 48vw" format="webp" quality={88} alt="银妆古法鎏金足银手镯" fetchpriority="high" /></div> <div class="hero__image"><Image src={hero} widths={[480, 720, 960]} sizes="(max-width: 760px) calc(100vw - 60px), 48vw" format="webp" quality={88} alt="银妆古法鎏金足银手镯" fetchpriority="high" /></div>
<div class="hero-caption"><span>01</span><div><strong>古法錾金</strong><small>手工温度,历久弥新</small></div></div>
</div> </div>
</div> </div>
<div class="hero-scroll"><span></span>向下探索</div>
</section> </section>
<section class="stat-band"><div class="container stat-grid">{site.home.stats.map((stat) => <div data-reveal><strong>{stat.value}</strong><p>{stat.label}</p></div>)}</div></section> <section class="stat-band"><div class="container stat-grid">{site.home.stats.map((stat) => <div data-reveal><strong>{stat.value}</strong><p>{stat.label}</p></div>)}</div></section>
......
...@@ -23,7 +23,7 @@ a { color: inherit; text-decoration: none; } ...@@ -23,7 +23,7 @@ a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; } button, input, textarea { font: inherit; }
button { cursor: pointer; } button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; } h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 700; line-height: 1.2; } h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 700; line-height: 1.2; text-wrap: pretty; }
.container { width: min(calc(100% - 48px), var(--container)); margin-inline: auto; } .container { width: min(calc(100% - 48px), var(--container)); margin-inline: auto; }
.container--wide { --container: 1380px; } .container--wide { --container: 1380px; }
.section-pad { padding: 112px 0; } .section-pad { padding: 112px 0; }
...@@ -76,8 +76,6 @@ h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 700; lin ...@@ -76,8 +76,6 @@ h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 700; lin
.nav-link { display: flex; min-height: 79px; align-items: center; gap: 5px; padding: 0 14px; color: var(--ink); font-size: 14px; font-weight: 600; } .nav-link { display: flex; min-height: 79px; align-items: center; gap: 5px; padding: 0 14px; color: var(--ink); font-size: 14px; font-weight: 600; }
.nav-link[aria-current="page"], .nav-link:hover { color: var(--primary); } .nav-link[aria-current="page"], .nav-link:hover { color: var(--primary); }
.nav-link[aria-current="page"]::after { position: absolute; right: 14px; bottom: -1px; left: 14px; height: 2px; background: var(--primary); content: ""; } .nav-link[aria-current="page"]::after { position: absolute; right: 14px; bottom: -1px; left: 14px; height: 2px; background: var(--primary); content: ""; }
.nav-chevron { color: #a79b92; font-size: 11px; transition: transform .2s; }
.nav-item:hover .nav-chevron { transform: rotate(180deg); }
.nav-dropdown { position: absolute; top: calc(100% + 10px); left: 50%; width: 220px; padding: 10px; background: #fff; border: 1px solid var(--border); opacity: 0; pointer-events: none; transform: translate(-50%, -8px); transition: .2s ease; box-shadow: 0 20px 50px rgba(50,34,27,.12); } .nav-dropdown { position: absolute; top: calc(100% + 10px); left: 50%; width: 220px; padding: 10px; background: #fff; border: 1px solid var(--border); opacity: 0; pointer-events: none; transform: translate(-50%, -8px); transition: .2s ease; box-shadow: 0 20px 50px rgba(50,34,27,.12); }
.nav-item:hover .nav-dropdown, .nav-item:focus-within .nav-dropdown { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); } .nav-item:hover .nav-dropdown, .nav-item:focus-within .nav-dropdown { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.nav-dropdown ul { margin: 0; padding: 0; list-style: none; } .nav-dropdown ul { margin: 0; padding: 0; list-style: none; }
...@@ -97,9 +95,9 @@ h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 700; lin ...@@ -97,9 +95,9 @@ h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 700; lin
.hero { position: relative; min-height: 720px; overflow: hidden; background: linear-gradient(115deg, #f7f3ea 0 62%, #efe6d8 62%); } .hero { position: relative; min-height: 720px; overflow: hidden; background: linear-gradient(115deg, #f7f3ea 0 62%, #efe6d8 62%); }
.hero-pattern { position: absolute; inset: 0; opacity: .37; background-image: radial-gradient(circle at 1px 1px, rgba(198,168,75,.24) 1px, transparent 0); background-size: 24px 24px; mask-image: linear-gradient(to right, #000, transparent 55%); } .hero-pattern { position: absolute; inset: 0; opacity: .37; background-image: radial-gradient(circle at 1px 1px, rgba(198,168,75,.24) 1px, transparent 0); background-size: 24px 24px; mask-image: linear-gradient(to right, #000, transparent 55%); }
.hero__grid { position: relative; display: grid; grid-template-columns: .94fr 1.06fr; align-items: center; min-height: 720px; gap: 72px; padding-block: 62px 85px; } .hero__grid { position: relative; display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; min-height: 720px; gap: 72px; padding-block: 62px 85px; }
.hero__content { max-width: 580px; } .hero__content { max-width: 580px; }
.hero h1 { margin-bottom: 28px; font-size: clamp(54px, 6vw, 86px); line-height: 1.08; letter-spacing: -.06em; } .hero h1 { margin-bottom: 28px; font-size: clamp(50px, 5.6vw, 74px); line-height: 1.08; letter-spacing: -.06em; word-break: keep-all; }
.hero h1 em, .page-hero h1 em { display: block; color: var(--primary); font-style: normal; } .hero h1 em, .page-hero h1 em { display: block; color: var(--primary); font-style: normal; }
.hero__content > p { max-width: 580px; margin-bottom: 34px; color: var(--text); font-size: 18px; } .hero__content > p { max-width: 580px; margin-bottom: 34px; color: var(--text); font-size: 18px; }
.hero__actions { display: flex; gap: 14px; } .hero__actions { display: flex; gap: 14px; }
...@@ -109,15 +107,7 @@ h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 700; lin ...@@ -109,15 +107,7 @@ h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 700; lin
.hero__visual::before { position: absolute; inset: 3px 4px auto auto; width: 62%; height: 64%; border: 1px solid var(--gold-deep); content: ""; } .hero__visual::before { position: absolute; inset: 3px 4px auto auto; width: 62%; height: 64%; border: 1px solid var(--gold-deep); content: ""; }
.hero__image { position: relative; aspect-ratio: 1 / 1; overflow: hidden; box-shadow: 0 30px 80px rgba(68,35,25,.17); } .hero__image { position: relative; aspect-ratio: 1 / 1; overflow: hidden; box-shadow: 0 30px 80px rgba(68,35,25,.17); }
.hero__image img { width: 100%; height: 100%; object-fit: cover; } .hero__image img { width: 100%; height: 100%; object-fit: cover; }
.hero-seal { position: absolute; top: 0; right: 0; display: grid; width: 128px; height: 128px; place-items: center; background: var(--primary); color: var(--gold); border-radius: 50%; box-shadow: 0 15px 45px rgba(142,28,23,.24); }
.hero-seal img { width: 74px; height: 74px; object-fit: contain; border-radius: 50%; }
.hero-seal span { position: absolute; font-size: 8px; letter-spacing: .16em; opacity: 0; }
.hero-caption { position: absolute; right: 8px; bottom: 0; display: flex; min-width: 240px; align-items: center; gap: 18px; padding: 17px 22px; background: var(--ink); color: #fff; }
.hero-caption > span { color: var(--gold); font-family: var(--serif); font-size: 26px; }
.hero-caption strong { display: block; color: #fff; font-family: var(--serif); }
.hero-caption small { color: #bfb5ad; }
.hero-scroll { position: absolute; bottom: 28px; left: 50%; display: flex; align-items: center; gap: 12px; color: #8f837a; font-size: 11px; letter-spacing: .18em; transform: translateX(-50%); }
.hero-scroll span { width: 1px; height: 30px; background: var(--gold-deep); }
.stat-band { background: var(--ink); color: #fff; } .stat-band { background: var(--ink); color: #fff; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(28px, 4vw, 68px); } .stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(28px, 4vw, 68px); }
...@@ -365,7 +355,6 @@ h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 700; lin ...@@ -365,7 +355,6 @@ h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 700; lin
.desktop-nav, .header-cta { display: none; } .desktop-nav, .header-cta { display: none; }
.mobile-nav { display: block; } .mobile-nav { display: block; }
.hero__grid { gap: 35px; } .hero__grid { gap: 35px; }
.hero h1 { font-size: 60px; }
.product-category-grid, .scene-grid, .promise-grid { grid-template-columns: repeat(2, 1fr); } .product-category-grid, .scene-grid, .promise-grid { grid-template-columns: repeat(2, 1fr); }
.brand-story-grid { grid-template-columns: 1fr 1fr; } .brand-story-grid { grid-template-columns: 1fr 1fr; }
.brand-story-number { order: 3; text-align: left; } .brand-story-number { order: 3; text-align: left; }
...@@ -385,17 +374,15 @@ h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 700; lin ...@@ -385,17 +374,15 @@ h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 700; lin
.brand, .brand img { width: 124px; } .brand, .brand img { width: 124px; }
.mobile-nav nav { top: 99px; max-height: calc(100vh - 99px); } .mobile-nav nav { top: 99px; max-height: calc(100vh - 99px); }
.section-intro-row { align-items: flex-start; flex-direction: column; margin-bottom: 38px; } .section-intro-row { align-items: flex-start; flex-direction: column; margin-bottom: 38px; }
.section-heading h2 { font-size: 37px; } .section-heading h2 { font-size: 33px; }
.cta-band h2 { font-size: 34px; }
.hero { min-height: 0; background: var(--cream); } .hero { min-height: 0; background: var(--cream); }
.hero__grid { grid-template-columns: 1fr; padding-block: 60px 75px; } .hero__grid { grid-template-columns: 1fr; padding-block: 60px 75px; }
.hero h1 { font-size: 50px; } .hero h1 { font-size: 50px; }
.hero__content > p { font-size: 16px; } .hero__content > p { font-size: 16px; }
.hero__actions { align-items: stretch; flex-direction: column; } .hero__actions { align-items: stretch; flex-direction: column; }
.hero__visual { padding: 20px 25px 32px 12px; } .hero__visual { padding: 20px 25px 32px 12px; }
.hero-seal { width: 86px; height: 86px; }
.hero-seal img { width: 52px; height: 52px; }
.hero-caption { right: 0; min-width: 210px; }
.hero-scroll { display: none; }
.stat-grid { grid-template-columns: repeat(2, 1fr); } .stat-grid { grid-template-columns: repeat(2, 1fr); }
.stat-grid > div { min-height: 145px; padding: 32px 0; } .stat-grid > div { min-height: 145px; padding: 32px 0; }
.product-category-grid, .scene-grid, .promise-grid { grid-template-columns: 1fr; } .product-category-grid, .scene-grid, .promise-grid { grid-template-columns: 1fr; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment