Refine responsive catalog and branding
This commit is contained in:
@@ -39,24 +39,22 @@ a { color: inherit; text-decoration: none; }
|
|||||||
border-bottom: 1px solid rgba(16,24,43,.08);
|
border-bottom: 1px solid rgba(16,24,43,.08);
|
||||||
backdrop-filter: blur(14px);
|
backdrop-filter: blur(14px);
|
||||||
}
|
}
|
||||||
.brand { display: inline-flex; align-items: center; gap: 11px; }
|
.brand { display: inline-flex; align-items: center; }
|
||||||
.brand-mark {
|
.brand-wordmark { display: grid; gap: 3px; }
|
||||||
width: 38px; height: 38px; border-radius: 11px;
|
.brand-wordmark strong {
|
||||||
display: grid; place-items: center;
|
color: var(--ink); font-family: Arial, "Helvetica Neue", sans-serif;
|
||||||
color: white; font-size: 21px; font-weight: 900; font-style: italic;
|
font-size: 18px; font-style: italic; font-weight: 900; letter-spacing: .045em; line-height: .9;
|
||||||
background: linear-gradient(145deg, #2d75ff, #0e48b9);
|
|
||||||
box-shadow: 0 7px 18px rgba(24,94,232,.25);
|
|
||||||
}
|
}
|
||||||
.brand > span:last-child { display: grid; gap: 1px; }
|
.brand-wordmark small { color: var(--blue); font-size: 12px; font-weight: 850; letter-spacing: .16em; line-height: 1; }
|
||||||
.brand strong { font-size: 14px; letter-spacing: .08em; line-height: 1; }
|
|
||||||
.brand small { color: var(--muted); font-size: 10px; letter-spacing: .04em; }
|
|
||||||
.site-header nav { display: flex; gap: 34px; font-size: 14px; color: #536078; }
|
.site-header nav { display: flex; gap: 34px; font-size: 14px; color: #536078; }
|
||||||
.site-header nav a:hover { color: var(--blue); }
|
.site-header nav a:hover { color: var(--blue); }
|
||||||
|
.header-actions { display: flex; align-items: center; gap: 8px; }
|
||||||
.header-cta {
|
.header-cta {
|
||||||
border: 0; border-radius: 10px; padding: 11px 17px;
|
border: 0; border-radius: 10px; padding: 11px 17px;
|
||||||
background: var(--ink); color: white; cursor: pointer; font-weight: 650;
|
background: var(--ink); color: white; cursor: pointer; font-weight: 650;
|
||||||
}
|
}
|
||||||
.header-cta span { margin-left: 8px; color: #82aaff; }
|
.header-cta span { margin-left: 8px; color: #82aaff; }
|
||||||
|
.mobile-menu-toggle { display: none; }
|
||||||
|
|
||||||
.hero {
|
.hero {
|
||||||
min-height: 720px;
|
min-height: 720px;
|
||||||
@@ -298,6 +296,7 @@ select:focus, input:focus, textarea:focus { border-color: var(--blue); box-shado
|
|||||||
background: #e9edf3;
|
background: #e9edf3;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
.catalog-mobile-filter-toggle { display: none; }
|
||||||
.category-pills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
|
.category-pills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
|
||||||
.category-pills button {
|
.category-pills button {
|
||||||
padding: 8px 12px;
|
padding: 8px 12px;
|
||||||
@@ -327,7 +326,7 @@ select:focus, input:focus, textarea:focus { border-color: var(--blue); box-shado
|
|||||||
background: white;
|
background: white;
|
||||||
transition: transform .22s, border-color .22s, box-shadow .22s;
|
transition: transform .22s, border-color .22s, box-shadow .22s;
|
||||||
}
|
}
|
||||||
.catalog-card:hover { transform: translateY(-3px); border-color: #b7c9e7; box-shadow: 0 15px 34px rgba(30,53,91,.1); }
|
.catalog-card:hover { transform: translateY(-3px); border-color: #dce3ed; box-shadow: 0 15px 34px rgba(30,53,91,.2); }
|
||||||
.catalog-image-button {
|
.catalog-image-button {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -342,11 +341,11 @@ select:focus, input:focus, textarea:focus { border-color: var(--blue); box-shado
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.catalog-image-button img { display: block; width: 100%; height: auto; object-fit: contain; mix-blend-mode: multiply; transition: transform .25s ease; }
|
.catalog-image-button img { display: block; width: 100%; height: auto; object-fit: contain; mix-blend-mode: multiply; transition: transform .25s ease; }
|
||||||
.catalog-image-button:hover img { transform: scale(1.07); }
|
.catalog-image-button:hover img { transform: none; }
|
||||||
.catalog-image-button small {
|
.catalog-image-button small {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 10px;
|
top: 44px;
|
||||||
left: 10px;
|
right: 10px;
|
||||||
padding: 5px 8px;
|
padding: 5px 8px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
color: #315686;
|
color: #315686;
|
||||||
@@ -355,18 +354,6 @@ select:focus, input:focus, textarea:focus { border-color: var(--blue); box-shado
|
|||||||
font-size: 8px;
|
font-size: 8px;
|
||||||
font-weight: 750;
|
font-weight: 750;
|
||||||
}
|
}
|
||||||
.catalog-zoom-hint {
|
|
||||||
position: absolute;
|
|
||||||
right: 11px;
|
|
||||||
bottom: 11px;
|
|
||||||
padding: 6px 9px;
|
|
||||||
border-radius: 7px;
|
|
||||||
color: #315686;
|
|
||||||
background: rgba(255,255,255,.92);
|
|
||||||
box-shadow: 0 3px 12px rgba(31,56,93,.1);
|
|
||||||
font-size: 9px;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
.catalog-placeholder { color: #9eb3d3; font-size: 14px; font-weight: 800; letter-spacing: .12em; }
|
.catalog-placeholder { color: #9eb3d3; font-size: 14px; font-weight: 800; letter-spacing: .12em; }
|
||||||
.catalog-card-body { padding: 16px; }
|
.catalog-card-body { padding: 16px; }
|
||||||
.catalog-card-body > p { margin: 0 0 5px; color: #8793a5; font-size: 9px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
|
.catalog-card-body > p { margin: 0 0 5px; color: #8793a5; font-size: 9px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
|
||||||
@@ -408,11 +395,13 @@ select:focus, input:focus, textarea:focus { border-color: var(--blue); box-shado
|
|||||||
.precision-gear-subcats { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px; margin-top: 3px; padding-top: 13px; border-top: 1px solid rgba(176, 201, 239, .58); }
|
.precision-gear-subcats { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px; margin-top: 3px; padding-top: 13px; border-top: 1px solid rgba(176, 201, 239, .58); }
|
||||||
.precision-gear-subcats span { padding: 6px 9px; border: 1px solid #d6e2f5; border-radius: 999px; color: #60718b; background: rgba(255,255,255,.72); font-size: 10px; }
|
.precision-gear-subcats span { padding: 6px 9px; border: 1px solid #d6e2f5; border-radius: 999px; color: #60718b; background: rgba(255,255,255,.72); font-size: 10px; }
|
||||||
.precision-gear-subcats b { margin-left: 3px; color: var(--blue); font-weight: 800; }
|
.precision-gear-subcats b { margin-left: 3px; color: var(--blue); font-weight: 800; }
|
||||||
.precision-gear-catalog { margin-top: 34px; }
|
.precision-gear-section-label { margin: 34px 0 0; }
|
||||||
|
.precision-gear-catalog { margin-top: 16px; }
|
||||||
.precision-gear-catalog-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
|
.precision-gear-catalog-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
|
||||||
.precision-gear-catalog-heading h4 { margin: 5px 0 0; color: var(--ink); font-size: 22px; letter-spacing: -.03em; }
|
.precision-gear-catalog-heading h4 { margin: 5px 0 0; color: var(--ink); font-size: 22px; letter-spacing: -.03em; }
|
||||||
.precision-gear-catalog-heading > p { max-width: 430px; margin: 0; color: #7b8799; font-size: 11px; line-height: 1.65; text-align: right; }
|
.precision-gear-catalog-heading > p { max-width: 430px; margin: 0; color: #7b8799; font-size: 11px; line-height: 1.65; text-align: right; }
|
||||||
.precision-gear-controls { margin-top: 16px; padding: 12px; border: 1px solid #dbe4f1; border-radius: 13px; background: #fbfcfe; }
|
.precision-gear-controls { position: sticky; top: 74px; z-index: 19; margin-top: 16px; padding: 12px; border: 1px solid #dbe4f1; border-radius: 13px; background: rgba(251,252,254,.96); box-shadow: 0 8px 20px rgba(30,53,91,.07); backdrop-filter: blur(10px); }
|
||||||
|
.precision-gear-mobile-filter-toggle { display: none; }
|
||||||
.precision-gear-controls > input { width: 100%; height: 40px; padding: 0 12px; font-size: 11px; background: white; }
|
.precision-gear-controls > input { width: 100%; height: 40px; padding: 0 12px; font-size: 11px; background: white; }
|
||||||
.precision-gear-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
|
.precision-gear-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
|
||||||
.precision-gear-pills button { padding: 7px 10px; border: 1px solid #dce4ef; border-radius: 999px; color: #68778e; background: white; cursor: pointer; font-size: 9px; }
|
.precision-gear-pills button { padding: 7px 10px; border: 1px solid #dce4ef; border-radius: 999px; color: #68778e; background: white; cursor: pointer; font-size: 9px; }
|
||||||
@@ -538,9 +527,19 @@ footer > span { color: #9aa4b2; font-size: 10px; }
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 720px) {
|
@media (max-width: 720px) {
|
||||||
.site-header { height: 64px; padding: 0 18px; }
|
.site-header { min-height: 64px; height: auto; padding: 10px 14px; }
|
||||||
.site-header nav { display: none; }
|
.brand-wordmark { gap: 2px; }
|
||||||
.header-cta { padding: 9px 12px; font-size: 12px; }
|
.brand-wordmark strong { font-size: 14px; }
|
||||||
|
.brand-wordmark small { font-size: 10px; letter-spacing: .12em; }
|
||||||
|
.site-header nav { display: none; position: absolute; top: calc(100% + 8px); left: 12px; right: 12px; z-index: 35; gap: 0; padding: 8px; border: 1px solid #dce5f2; border-radius: 16px; background: rgba(255,255,255,.98); box-shadow: 0 18px 40px rgba(27,54,99,.18); }
|
||||||
|
.site-header nav.is-open { display: grid; }
|
||||||
|
.site-header nav a { padding: 14px 13px; border-radius: 10px; font-size: 14px; }
|
||||||
|
.site-header nav a:hover { background: var(--blue-soft); }
|
||||||
|
.header-cta { padding: 9px 11px; font-size: 11px; }
|
||||||
|
.header-cta span { margin-left: 4px; }
|
||||||
|
.mobile-menu-toggle { min-width: 52px; padding: 7px 8px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid #dce5f2; border-radius: 10px; color: var(--blue); background: white; cursor: pointer; }
|
||||||
|
.mobile-menu-toggle span { font-size: 18px; line-height: 1; }
|
||||||
|
.mobile-menu-toggle small { font-size: 10px; font-weight: 700; }
|
||||||
.hero { min-height: 0; padding: 45px 16px 56px; }
|
.hero { min-height: 0; padding: 45px 16px 56px; }
|
||||||
.hero h1 { font-size: 48px; }
|
.hero h1 { font-size: 48px; }
|
||||||
.hero-lead { font-size: 15px; }
|
.hero-lead { font-size: 15px; }
|
||||||
@@ -558,11 +557,37 @@ footer > span { color: #9aa4b2; font-size: 10px; }
|
|||||||
.catalog-summary { grid-template-columns: repeat(2, 1fr); }
|
.catalog-summary { grid-template-columns: repeat(2, 1fr); }
|
||||||
.catalog-summary button:last-child { grid-column: auto; }
|
.catalog-summary button:last-child { grid-column: auto; }
|
||||||
.catalog-toolbar { top: 64px; }
|
.catalog-toolbar { top: 64px; }
|
||||||
|
.catalog-toolbar { display: block; }
|
||||||
|
.catalog-toolbar.is-hidden { visibility: hidden; opacity: 0; pointer-events: none; }
|
||||||
|
.catalog-mobile-filter-toggle { display: none; min-height: 36px; align-items: center; justify-content: center; padding: 0 13px; border: 1px solid #dce3ed; border-radius: 9px; color: var(--blue); background: white; cursor: pointer; font-size: 11px; font-weight: 750; }
|
||||||
|
.catalog-toolbar.is-compact { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; padding: 7px 8px; margin-bottom: 14px; border-radius: 12px; }
|
||||||
|
.catalog-toolbar.is-compact .catalog-mobile-filter-toggle { display: inline-flex; }
|
||||||
|
.catalog-toolbar.is-compact .catalog-search { grid-column: 1; }
|
||||||
|
.catalog-toolbar.is-compact .catalog-search input { height: 36px; padding: 0 38px; font-size: 12px; }
|
||||||
|
.catalog-toolbar.is-compact .catalog-search > span { left: 12px; top: 7px; font-size: 19px; }
|
||||||
|
.catalog-toolbar.is-compact .catalog-search > button { right: 6px; width: 25px; height: 25px; }
|
||||||
|
.catalog-toolbar.is-compact:not(.filters-open) .category-pills,
|
||||||
|
.catalog-toolbar.is-compact:not(.filters-open) .catalog-scale-filter,
|
||||||
|
.catalog-toolbar.is-compact:not(.filters-open) .catalog-result-count { display: none; }
|
||||||
|
.catalog-toolbar.is-compact.filters-open .category-pills,
|
||||||
|
.catalog-toolbar.is-compact.filters-open .catalog-scale-filter,
|
||||||
|
.catalog-toolbar.is-compact.filters-open .catalog-result-count { grid-column: 1 / -1; }
|
||||||
|
.catalog-toolbar.is-compact.filters-open .catalog-mobile-filter-toggle { color: white; background: var(--blue); }
|
||||||
.catalog-scale-filter { grid-template-columns: 1fr; align-items: stretch; }
|
.catalog-scale-filter { grid-template-columns: 1fr; align-items: stretch; }
|
||||||
.catalog-grid { grid-template-columns: 1fr; gap: 15px; }
|
.catalog-grid { grid-template-columns: 1fr; gap: 15px; }
|
||||||
.precision-gear-panel { gap: 20px; margin-top: 30px; padding: 22px 18px; }
|
.precision-gear-panel { gap: 20px; margin-top: 30px; padding: 22px 18px; }
|
||||||
.precision-gear-catalog-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
|
.precision-gear-catalog-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
|
||||||
.precision-gear-catalog-heading > p { text-align: left; }
|
.precision-gear-catalog-heading > p { text-align: left; }
|
||||||
|
.precision-gear-controls { position: sticky; top: 64px; z-index: 19; }
|
||||||
|
.precision-gear-mobile-filter-toggle { display: none; min-height: 36px; align-items: center; justify-content: center; padding: 0 13px; border: 1px solid #dce3ed; border-radius: 9px; color: var(--blue); background: white; cursor: pointer; font-size: 11px; font-weight: 750; }
|
||||||
|
.precision-gear-controls.is-compact { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; padding: 7px 8px; border-radius: 12px; }
|
||||||
|
.precision-gear-controls.is-compact > input { grid-column: 1; height: 36px; min-width: 0; font-size: 12px; }
|
||||||
|
.precision-gear-controls.is-compact .precision-gear-mobile-filter-toggle { display: inline-flex; }
|
||||||
|
.precision-gear-controls.is-compact:not(.filters-open) .precision-gear-pills,
|
||||||
|
.precision-gear-controls.is-compact:not(.filters-open) .precision-gear-result { display: none; }
|
||||||
|
.precision-gear-controls.is-compact.filters-open .precision-gear-pills,
|
||||||
|
.precision-gear-controls.is-compact.filters-open .precision-gear-result { grid-column: 1 / -1; }
|
||||||
|
.precision-gear-controls.is-compact.filters-open .precision-gear-mobile-filter-toggle { color: white; background: var(--blue); }
|
||||||
.precision-gear-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
|
.precision-gear-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
|
||||||
.precision-gear-card-body { padding: 9px; }
|
.precision-gear-card-body { padding: 9px; }
|
||||||
.catalog-card-body { padding: 15px; }
|
.catalog-card-body { padding: 15px; }
|
||||||
|
|||||||
112
app/page.tsx
112
app/page.tsx
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { FormEvent, useMemo, useState } from "react";
|
import { FormEvent, useEffect, useMemo, useState } from "react";
|
||||||
import {
|
import {
|
||||||
CATALOG_COUNTS,
|
CATALOG_COUNTS,
|
||||||
CATALOG_PRODUCTS as RAW_CATALOG_PRODUCTS,
|
CATALOG_PRODUCTS as RAW_CATALOG_PRODUCTS,
|
||||||
@@ -352,6 +352,7 @@ function Metric({ label, value }: { label: string; value: string }) {
|
|||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
const [stage, setStage] = useState(0);
|
const [stage, setStage] = useState(0);
|
||||||
|
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
|
||||||
const [requirements, setRequirements] = useState(DEFAULT_REQUIREMENTS);
|
const [requirements, setRequirements] = useState(DEFAULT_REQUIREMENTS);
|
||||||
const [showSampleForm, setShowSampleForm] = useState(false);
|
const [showSampleForm, setShowSampleForm] = useState(false);
|
||||||
const [submitted, setSubmitted] = useState(false);
|
const [submitted, setSubmitted] = useState(false);
|
||||||
@@ -360,9 +361,14 @@ export default function Home() {
|
|||||||
const [catalogCategory, setCatalogCategory] = useState("全部产品");
|
const [catalogCategory, setCatalogCategory] = useState("全部产品");
|
||||||
const [catalogScale, setCatalogScale] = useState("all");
|
const [catalogScale, setCatalogScale] = useState("all");
|
||||||
const [catalogLimit, setCatalogLimit] = useState(24);
|
const [catalogLimit, setCatalogLimit] = useState(24);
|
||||||
|
const [catalogToolbarCompact, setCatalogToolbarCompact] = useState(false);
|
||||||
|
const [catalogToolbarFiltersOpen, setCatalogToolbarFiltersOpen] = useState(false);
|
||||||
|
const [catalogToolbarHidden, setCatalogToolbarHidden] = useState(false);
|
||||||
const [precisionGearQuery, setPrecisionGearQuery] = useState("");
|
const [precisionGearQuery, setPrecisionGearQuery] = useState("");
|
||||||
const [precisionGearCategory, setPrecisionGearCategory] = useState("全部子类");
|
const [precisionGearCategory, setPrecisionGearCategory] = useState("全部子类");
|
||||||
const [precisionGearLimit, setPrecisionGearLimit] = useState(24);
|
const [precisionGearLimit, setPrecisionGearLimit] = useState(24);
|
||||||
|
const [precisionGearToolbarCompact, setPrecisionGearToolbarCompact] = useState(false);
|
||||||
|
const [precisionGearFiltersOpen, setPrecisionGearFiltersOpen] = useState(false);
|
||||||
const [selectedCatalogProduct, setSelectedCatalogProduct] = useState<CatalogProduct | null>(null);
|
const [selectedCatalogProduct, setSelectedCatalogProduct] = useState<CatalogProduct | null>(null);
|
||||||
const [catalogVisualMode, setCatalogVisualMode] = useState<CatalogVisualMode>("main");
|
const [catalogVisualMode, setCatalogVisualMode] = useState<CatalogVisualMode>("main");
|
||||||
|
|
||||||
@@ -419,12 +425,41 @@ export default function Home() {
|
|||||||
? getCatalogProductDimensionImage(selectedCatalogProduct)
|
? getCatalogProductDimensionImage(selectedCatalogProduct)
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
function updateCatalogToolbarState() {
|
||||||
|
const toolbar = document.querySelector(".catalog-toolbar");
|
||||||
|
const shouldCompact = window.innerWidth <= 720 && Boolean(toolbar) && toolbar.getBoundingClientRect().top <= 72 && window.scrollY > 0;
|
||||||
|
setCatalogToolbarCompact((current) => (current === shouldCompact ? current : shouldCompact));
|
||||||
|
if (!shouldCompact) setCatalogToolbarFiltersOpen(false);
|
||||||
|
|
||||||
|
const precisionHeading = document.querySelector(".precision-gear-catalog-heading");
|
||||||
|
const shouldHideCatalogToolbar = window.innerWidth <= 720 && Boolean(precisionHeading) && precisionHeading.getBoundingClientRect().top <= 72;
|
||||||
|
setCatalogToolbarHidden((current) => (current === shouldHideCatalogToolbar ? current : shouldHideCatalogToolbar));
|
||||||
|
|
||||||
|
const precisionToolbar = document.querySelector(".precision-gear-controls");
|
||||||
|
const shouldCompactPrecision = window.innerWidth <= 720 && Boolean(precisionToolbar) && precisionToolbar.getBoundingClientRect().top <= 72 && window.scrollY > 0;
|
||||||
|
setPrecisionGearToolbarCompact((current) => (current === shouldCompactPrecision ? current : shouldCompactPrecision));
|
||||||
|
if (!shouldCompactPrecision) setPrecisionGearFiltersOpen(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
updateCatalogToolbarState();
|
||||||
|
window.addEventListener("scroll", updateCatalogToolbarState, { passive: true });
|
||||||
|
document.addEventListener("scroll", updateCatalogToolbarState, { passive: true, capture: true });
|
||||||
|
window.addEventListener("resize", updateCatalogToolbarState);
|
||||||
|
return () => {
|
||||||
|
window.removeEventListener("scroll", updateCatalogToolbarState);
|
||||||
|
document.removeEventListener("scroll", updateCatalogToolbarState, true);
|
||||||
|
window.removeEventListener("resize", updateCatalogToolbarState);
|
||||||
|
};
|
||||||
|
}, []);
|
||||||
|
|
||||||
function openCatalogProduct(product: CatalogProduct) {
|
function openCatalogProduct(product: CatalogProduct) {
|
||||||
setSelectedCatalogProduct(product);
|
setSelectedCatalogProduct(product);
|
||||||
setCatalogVisualMode("main");
|
setCatalogVisualMode("main");
|
||||||
}
|
}
|
||||||
|
|
||||||
function startSelection() {
|
function startSelection() {
|
||||||
|
setMobileMenuOpen(false);
|
||||||
setStage(1);
|
setStage(1);
|
||||||
requestAnimationFrame(() => {
|
requestAnimationFrame(() => {
|
||||||
document.getElementById("selector")?.scrollIntoView({ behavior: "smooth", block: "start" });
|
document.getElementById("selector")?.scrollIntoView({ behavior: "smooth", block: "start" });
|
||||||
@@ -454,22 +489,33 @@ export default function Home() {
|
|||||||
return (
|
return (
|
||||||
<main>
|
<main>
|
||||||
<header className="site-header">
|
<header className="site-header">
|
||||||
<a className="brand" href="#top" aria-label="高徳乐 AI选型首页">
|
<a className="brand" href="#top" aria-label="高德乐 AI选型首页">
|
||||||
<span className="brand-mark">G</span>
|
<span className="brand-wordmark">
|
||||||
<span>
|
|
||||||
<strong>GAUDELOT</strong>
|
<strong>GAUDELOT</strong>
|
||||||
<small>高徳乐 · 精密传动</small>
|
<small>高德乐</small>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<nav aria-label="主导航">
|
<nav id="mobile-primary-nav" className={mobileMenuOpen ? "is-open" : ""} aria-label="主导航">
|
||||||
<a href="#selector">AI选型</a>
|
<a href="#selector" onClick={() => setMobileMenuOpen(false)}>AI选型</a>
|
||||||
<a href="#products">完整目录</a>
|
<a href="#products" onClick={() => setMobileMenuOpen(false)}>完整目录</a>
|
||||||
<a href="#precision-gears">精密齿轮</a>
|
<a href="#precision-gears" onClick={() => setMobileMenuOpen(false)}>精密齿轮</a>
|
||||||
<a href="#how">服务流程</a>
|
<a href="#how" onClick={() => setMobileMenuOpen(false)}>服务流程</a>
|
||||||
</nav>
|
</nav>
|
||||||
|
<div className="header-actions">
|
||||||
<button className="header-cta" type="button" onClick={startSelection}>
|
<button className="header-cta" type="button" onClick={startSelection}>
|
||||||
开始选型 <span>→</span>
|
开始选型 <span>→</span>
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
className="mobile-menu-toggle"
|
||||||
|
type="button"
|
||||||
|
aria-expanded={mobileMenuOpen}
|
||||||
|
aria-controls="mobile-primary-nav"
|
||||||
|
onClick={() => setMobileMenuOpen((open) => !open)}
|
||||||
|
>
|
||||||
|
<span aria-hidden="true">{mobileMenuOpen ? "×" : "☰"}</span>
|
||||||
|
<small>{mobileMenuOpen ? "关闭" : "菜单"}</small>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<section className="hero" id="top">
|
<section className="hero" id="top">
|
||||||
@@ -962,6 +1008,7 @@ export default function Home() {
|
|||||||
<p>官方目录按八个主分类收录{CATALOG_PRODUCTS.length}款产品;静音舵机作为特色子集筛选,不重复计入产品总数。</p>
|
<p>官方目录按八个主分类收录{CATALOG_PRODUCTS.length}款产品;静音舵机作为特色子集筛选,不重复计入产品总数。</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="catalog-directory">
|
||||||
<div className="catalog-summary" aria-label="产品分类统计">
|
<div className="catalog-summary" aria-label="产品分类统计">
|
||||||
{PRIMARY_CATALOG_CATEGORIES.map((category) => (
|
{PRIMARY_CATALOG_CATEGORIES.map((category) => (
|
||||||
<button
|
<button
|
||||||
@@ -980,7 +1027,7 @@ export default function Home() {
|
|||||||
</div>
|
</div>
|
||||||
<p className="catalog-category-note">分类已按官方目录表头及业务规则复核 · 八个主分类合计{CATALOG_PRODUCTS.length}款 · 舵盘配件6款 · 静音舵机11款为标准舵机特色子集</p>
|
<p className="catalog-category-note">分类已按官方目录表头及业务规则复核 · 八个主分类合计{CATALOG_PRODUCTS.length}款 · 舵盘配件6款 · 静音舵机11款为标准舵机特色子集</p>
|
||||||
|
|
||||||
<div className="catalog-toolbar">
|
<div className={`catalog-toolbar ${catalogToolbarCompact ? "is-compact" : ""} ${catalogToolbarFiltersOpen ? "filters-open" : ""} ${catalogToolbarHidden ? "is-hidden" : ""}`}>
|
||||||
<label className="catalog-search">
|
<label className="catalog-search">
|
||||||
<span>⌕</span>
|
<span>⌕</span>
|
||||||
<input
|
<input
|
||||||
@@ -996,6 +1043,14 @@ export default function Home() {
|
|||||||
<button type="button" onClick={() => setCatalogQuery("")} aria-label="清空搜索">×</button>
|
<button type="button" onClick={() => setCatalogQuery("")} aria-label="清空搜索">×</button>
|
||||||
)}
|
)}
|
||||||
</label>
|
</label>
|
||||||
|
<button
|
||||||
|
className="catalog-mobile-filter-toggle"
|
||||||
|
type="button"
|
||||||
|
aria-expanded={catalogToolbarFiltersOpen}
|
||||||
|
onClick={() => setCatalogToolbarFiltersOpen((open) => !open)}
|
||||||
|
>
|
||||||
|
{catalogToolbarFiltersOpen ? "收起" : "筛选"}
|
||||||
|
</button>
|
||||||
<div className="category-pills" aria-label="产品类别筛选">
|
<div className="category-pills" aria-label="产品类别筛选">
|
||||||
{CATALOG_FILTER_CATEGORIES.map((category) => (
|
{CATALOG_FILTER_CATEGORIES.map((category) => (
|
||||||
<button
|
<button
|
||||||
@@ -1056,7 +1111,6 @@ export default function Home() {
|
|||||||
<span className="catalog-placeholder">GAUDELOT</span>
|
<span className="catalog-placeholder">GAUDELOT</span>
|
||||||
)}
|
)}
|
||||||
<small>{product.category}</small>
|
<small>{product.category}</small>
|
||||||
<span className="catalog-zoom-hint">点击查看大图</span>
|
|
||||||
</button>
|
</button>
|
||||||
<div className="catalog-card-body">
|
<div className="catalog-card-body">
|
||||||
<p>{product.code}</p>
|
<p>{product.code}</p>
|
||||||
@@ -1090,25 +1144,10 @@ export default function Home() {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
<aside className="precision-gear-panel" id="precision-gears" aria-labelledby="precision-gears-title">
|
<p className="eyebrow precision-gear-section-label"><span /> 精密齿轮</p>
|
||||||
<div className="precision-gear-copy">
|
<div className="precision-gear-catalog" id="precision-gears" aria-label="精密齿轮配件产品卡片">
|
||||||
<p className="eyebrow"><span /> 精密齿轮</p>
|
|
||||||
<h3 id="precision-gears-title">精密齿轮配件</h3>
|
|
||||||
<p>独立目录收录 511 款产品,覆盖 11 个子类,为微型传动、机构配套与定制开发提供齿轮件支持。</p>
|
|
||||||
</div>
|
|
||||||
<div className="precision-gear-overview">
|
|
||||||
<div className="precision-gear-stat"><strong>511</strong><span>款产品</span></div>
|
|
||||||
<div className="precision-gear-stat"><strong>11</strong><span>个子类</span></div>
|
|
||||||
<div className="precision-gear-subcats" aria-label="精密齿轮配件子类">
|
|
||||||
{PRECISION_GEAR_SUBCATEGORIES.map(([name, count]) => (
|
|
||||||
<span key={name}>{name} <b>{count}</b></span>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</aside>
|
|
||||||
|
|
||||||
<div className="precision-gear-catalog" aria-label="精密齿轮配件产品卡片">
|
|
||||||
<div className="precision-gear-catalog-heading">
|
<div className="precision-gear-catalog-heading">
|
||||||
<div>
|
<div>
|
||||||
<p className="step-kicker">产品卡片目录</p>
|
<p className="step-kicker">产品卡片目录</p>
|
||||||
@@ -1116,7 +1155,7 @@ export default function Home() {
|
|||||||
</div>
|
</div>
|
||||||
<p>小型卡片展示型号、子类和关键规格,点击图片可查看产品大图与完整参数。</p>
|
<p>小型卡片展示型号、子类和关键规格,点击图片可查看产品大图与完整参数。</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="precision-gear-controls">
|
<div className={`precision-gear-controls ${precisionGearToolbarCompact ? "is-compact" : ""} ${precisionGearFiltersOpen ? "filters-open" : ""}`}>
|
||||||
<input
|
<input
|
||||||
value={precisionGearQuery}
|
value={precisionGearQuery}
|
||||||
onChange={(event) => {
|
onChange={(event) => {
|
||||||
@@ -1126,6 +1165,14 @@ export default function Home() {
|
|||||||
placeholder="搜索齿轮名称、编码、材质或规格"
|
placeholder="搜索齿轮名称、编码、材质或规格"
|
||||||
aria-label="搜索精密齿轮配件"
|
aria-label="搜索精密齿轮配件"
|
||||||
/>
|
/>
|
||||||
|
<button
|
||||||
|
className="precision-gear-mobile-filter-toggle"
|
||||||
|
type="button"
|
||||||
|
aria-expanded={precisionGearFiltersOpen}
|
||||||
|
onClick={() => setPrecisionGearFiltersOpen((open) => !open)}
|
||||||
|
>
|
||||||
|
{precisionGearFiltersOpen ? "收起" : "筛选"}
|
||||||
|
</button>
|
||||||
<div className="precision-gear-pills" aria-label="精密齿轮子类筛选">
|
<div className="precision-gear-pills" aria-label="精密齿轮子类筛选">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@@ -1302,8 +1349,7 @@ export default function Home() {
|
|||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<div className="brand footer-brand">
|
<div className="brand footer-brand">
|
||||||
<span className="brand-mark">G</span>
|
<span className="brand-wordmark"><strong>GAUDELOT</strong><small>高德乐</small></span>
|
||||||
<span><strong>GAUDELOT</strong><small>高徳乐 · 精密传动</small></span>
|
|
||||||
</div>
|
</div>
|
||||||
<p>AI选型结果仅供初步筛选,最终型号、价格、交期与适配结果以工程师和正式文件确认为准。</p>
|
<p>AI选型结果仅供初步筛选,最终型号、价格、交期与适配结果以工程师和正式文件确认为准。</p>
|
||||||
<span>内部原型 · V1</span>
|
<span>内部原型 · V1</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user