Merge remote-tracking branch 'origin/master' into codex/web-quality-gates
This commit is contained in:
@@ -184,10 +184,18 @@ function getHomeCarouselCardStyle(offset: number): CSSProperties {
|
||||
const depth = Math.abs(offset);
|
||||
const direction = Math.sign(offset);
|
||||
const isActive = depth === 0;
|
||||
const xByDepth = [0, 190, 320, 430, 520, 590];
|
||||
const xByDepth = [
|
||||
"0px",
|
||||
"clamp(52px, 13.5vw, 198px)",
|
||||
"clamp(90px, 22.5vw, 334px)",
|
||||
"clamp(122px, 30.5vw, 448px)",
|
||||
"clamp(148px, 37vw, 542px)",
|
||||
"clamp(170px, 42vw, 614px)",
|
||||
];
|
||||
const yByDepth = [8, -2, -8, -13, -18, -24];
|
||||
const scaleByDepth = [1, 1, 1, 1, 1, 1];
|
||||
const x = direction * (xByDepth[depth] ?? xByDepth[xByDepth.length - 1]!);
|
||||
const xDistance = xByDepth[depth] ?? xByDepth[xByDepth.length - 1]!;
|
||||
const x = direction < 0 ? `calc(0px - ${xDistance})` : xDistance;
|
||||
const y = yByDepth[depth] ?? yByDepth[yByDepth.length - 1]!;
|
||||
const z = isActive ? 90 : 28 - depth;
|
||||
const scale = scaleByDepth[depth] ?? scaleByDepth[scaleByDepth.length - 1]!;
|
||||
@@ -196,7 +204,7 @@ function getHomeCarouselCardStyle(offset: number): CSSProperties {
|
||||
"--apple-card-offset": offset,
|
||||
"--apple-card-depth": depth,
|
||||
"--apple-card-z": 80 - depth,
|
||||
"--apple-card-x": `${x}px`,
|
||||
"--apple-card-x": x,
|
||||
"--apple-card-y": `${y}px`,
|
||||
"--apple-card-z-offset": `${z}px`,
|
||||
"--apple-card-rotate-y": "0deg",
|
||||
@@ -612,15 +620,24 @@ function HomePage({ onOpenGenerate, onStartOnboarding, onOpenCanvas, onOpenEcomm
|
||||
<div className="omni-home__actions" aria-label="首页入口">
|
||||
<button type="button" className="omni-home__entry" onClick={onStartOnboarding || onOpenGenerate}>
|
||||
<PlusOutlined />
|
||||
<span>新手</span>
|
||||
<span>
|
||||
快速生成
|
||||
<small>新手友好</small>
|
||||
</span>
|
||||
</button>
|
||||
<button type="button" className="omni-home__entry omni-home__entry--primary" onClick={onOpenCanvas || onOpenGenerate}>
|
||||
<PlayCircleOutlined />
|
||||
<span>老手</span>
|
||||
<span>
|
||||
专业创作
|
||||
<small>画布工作流</small>
|
||||
</span>
|
||||
</button>
|
||||
<button type="button" className="omni-home__entry" onClick={onOpenEcommerce}>
|
||||
<ShoppingOutlined />
|
||||
<span>电商</span>
|
||||
<span>
|
||||
电商出图
|
||||
<small>商品视觉</small>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -345,11 +345,12 @@ function MorePage({ onSelectView, onOpenImageTool }: MorePageProps) {
|
||||
key={tool.id}
|
||||
type="button"
|
||||
className={`more-card more-card--featured${getPreviewClassName(tool.id)}`}
|
||||
style={{ "--card-gradient": coreToolGradients[tool.id] ?? "linear-gradient(135deg, rgba(var(--accent-rgb), 0.12), rgba(var(--accent-rgb), 0.04))" } as CSSProperties}
|
||||
style={{
|
||||
"--card-gradient": coreToolGradients[tool.id] ?? "linear-gradient(135deg, rgba(var(--accent-rgb), 0.12), rgba(var(--accent-rgb), 0.04))",
|
||||
} as CSSProperties}
|
||||
aria-label={`打开核心工具:${tool.title},${tool.text}`}
|
||||
onClick={() => openTool(tool)}
|
||||
>
|
||||
<span className="more-card__featured-icon">{tool.icon}</span>
|
||||
<div className="more-card__featured-body">
|
||||
<span className="more-card__featured-kicker">{categoryLabels[tool.category]}</span>
|
||||
<strong>{tool.title}</strong>
|
||||
@@ -388,7 +389,6 @@ function MorePage({ onSelectView, onOpenImageTool }: MorePageProps) {
|
||||
onClick={() => openTool(tool)}
|
||||
disabled={!tool.ready}
|
||||
>
|
||||
<span className="more-card__icon">{tool.icon}</span>
|
||||
<span className="more-card__topline">
|
||||
{tool.tags.slice(0, 2).map((tag) => (
|
||||
<span key={tag}>{tag}</span>
|
||||
|
||||
Reference in New Issue
Block a user