Skip to content

Commit fc1c884

Browse files
joohwcursoragent
andcommitted
style(landing): refine header and hero screenshot framing
Remove header backdrop and bottom divider; use Inter for nav typography. Refresh use-case screenshots and crop edge pixels with a light scale. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 874b182 commit fc1c884

7 files changed

Lines changed: 33 additions & 20 deletions

File tree

landing/public/use-case-en.png

-41.2 KB
Loading

landing/public/use-case-zh.png

-40.2 KB
Loading

landing/src/app/globals.css

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
:root {
88
--font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
9+
--font-header: var(--font-inter), ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
910
--font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
1011
--card: oklch(1 0 0);
1112
--border: oklch(0.922 0 0);
@@ -72,6 +73,7 @@
7273
--color-foreground: var(--foreground);
7374
--color-border: var(--border);
7475
--font-sans: var(--font-sans);
76+
--font-header: var(--font-header);
7577
--font-mono: var(--font-mono);
7678
--font-heading: var(--font-sans);
7779
--color-sidebar-ring: var(--sidebar-ring);
@@ -160,6 +162,12 @@ a:visited {
160162
background: transparent;
161163
}
162164

165+
.site-header {
166+
font-family: var(--font-header);
167+
-webkit-font-smoothing: antialiased;
168+
-moz-osx-font-smoothing: grayscale;
169+
}
170+
163171
.app-header {
164172
position: fixed;
165173
top: var(--app-header-float-top);
@@ -172,12 +180,10 @@ a:visited {
172180
align-items: center;
173181
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
174182
box-sizing: border-box;
175-
border: 1px solid var(--border);
176183
border-radius: 0;
177-
background: var(--app-primary-surface-bg);
178184
box-shadow: none;
179-
backdrop-filter: blur(16px) saturate(1.5);
180185
padding: 0 0.875rem;
186+
font-family: var(--font-header);
181187
}
182188

183189
@media (min-width: 640px) {
@@ -186,12 +192,6 @@ a:visited {
186192
}
187193
}
188194

189-
.dark .app-header {
190-
border-color: var(--border);
191-
background: var(--app-primary-surface-bg);
192-
box-shadow: none;
193-
}
194-
195195
.header-brand {
196196
display: inline-flex;
197197
align-items: center;
@@ -241,14 +241,18 @@ a:visited {
241241
.header-nav-link {
242242
color: #71717a;
243243
text-decoration: none;
244-
font-size: 0.9rem;
244+
font-size: 0.8125rem;
245+
font-weight: 500;
246+
letter-spacing: -0.01em;
247+
line-height: 1;
245248
padding: 0.35rem 0.75rem;
246249
border-radius: 0;
247250
}
248251

249252
.header-nav-link-active {
250253
color: var(--foreground);
251254
font-weight: 600;
255+
letter-spacing: -0.015em;
252256
}
253257

254258
.header-user-area {

landing/src/app/layout.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { Metadata } from "next";
2+
import { Inter } from "next/font/google";
23
import { cookies, headers } from "next/headers";
34
import { AppShell } from "@/components/app-shell";
45
import { I18nProvider } from "@/components/i18n-provider";
@@ -10,6 +11,12 @@ import { buildBaseJsonLdGraph, buildPageMetadata } from "@/lib/seo";
1011
import { getPublicSiteUrlFromRequest } from "@/lib/site";
1112
import "./globals.css";
1213

14+
const inter = Inter({
15+
subsets: ["latin"],
16+
variable: "--font-inter",
17+
display: "swap",
18+
});
19+
1320
export async function generateMetadata(): Promise<Metadata> {
1421
return buildPageMetadata("home");
1522
}
@@ -32,7 +39,7 @@ export default async function RootLayout({
3239
const jsonLdScript = JSON.stringify(jsonLd).replace(/</g, "\\u003c");
3340

3441
return (
35-
<html lang={language} suppressHydrationWarning className="h-full antialiased">
42+
<html lang={language} suppressHydrationWarning className={`${inter.variable} h-full antialiased`}>
3643
<body className="min-h-full flex flex-col">
3744
<ServerScripts jsonLd={jsonLdScript} />
3845
<I18nProvider language={language}>

landing/src/app/page.module.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
.useCaseShot {
44
overflow: hidden;
5-
border: 1px solid color-mix(in oklch, var(--border) 80%, transparent);
5+
border: 1px solid var(--border);
66
border-radius: 0.75rem;
77
background: color-mix(in oklch, var(--card) 88%, var(--muted) 12%);
88
}
@@ -11,6 +11,8 @@
1111
display: block;
1212
width: 100%;
1313
height: auto;
14+
transform: scale(1.01);
15+
transform-origin: center center;
1416
}
1517

1618
/* 纯灰渐变背景:oklch 第二项为 chroma,全程为 0,避免任何色相 */

landing/src/components/site-header.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,22 @@ export function SiteHeader() {
5757

5858
function navLinkClass(active: boolean) {
5959
return cn(
60-
"relative rounded-md px-2.5 py-1.5 text-sm font-medium",
60+
"relative rounded-md px-2.5 py-1.5 text-[0.8125rem] font-medium leading-none tracking-[-0.01em]",
6161
"motion-safe:transition-[color,opacity] motion-safe:duration-300 motion-safe:ease-out",
6262
"motion-reduce:transition-none",
6363
active
64-
? "font-semibold text-foreground opacity-100"
64+
? "font-semibold tracking-[-0.015em] text-foreground opacity-100"
6565
: cn(
66-
"text-muted-foreground opacity-[0.62]",
67-
"hover:text-foreground hover:opacity-100",
66+
"text-muted-foreground/80 opacity-100",
67+
"hover:text-foreground",
6868
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/45 focus-visible:ring-offset-2 focus-visible:ring-offset-background",
69-
"focus-visible:text-foreground focus-visible:opacity-100"
69+
"focus-visible:text-foreground"
7070
)
7171
);
7272
}
7373

7474
return (
75-
<header className="fixed top-0 left-0 right-0 z-40 border-b border-border/60 bg-background/95 backdrop-blur-md supports-[backdrop-filter]:bg-background/85">
75+
<header className="site-header fixed top-0 left-0 right-0 z-40">
7676
<div className="flex w-full items-center justify-between gap-3 px-4 py-3 sm:px-6">
7777
<div className="flex min-w-0 flex-1 items-center gap-5 sm:gap-6">
7878
<Link
@@ -106,7 +106,7 @@ export function SiteHeader() {
106106
</a>
107107
<button
108108
type="button"
109-
className="inline-flex h-8 items-center justify-center rounded-md border border-border bg-card px-2 text-xs font-medium transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60"
109+
className="inline-flex h-8 items-center justify-center rounded-md border border-border bg-card px-2 text-[0.75rem] font-medium leading-none tracking-[-0.01em] transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60"
110110
onClick={() => void toggleLanguage()}
111111
aria-label={t("header.language")}
112112
title={isEnglish ? t("header.switchToZh") : t("header.switchToEn")}

landing/src/lib/assets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { AppLanguage } from "@/i18n/config";
22

33
/** Bump version when replacing use-case screenshots under the same filename. */
4-
const USE_CASE_VERSION = "2";
4+
const USE_CASE_VERSION = "3";
55

66
export type UseCaseImage = {
77
src: string;

0 commit comments

Comments
 (0)