Skip to content

Commit 551af3c

Browse files
ericyangpanclaude
andcommitted
style: add design system improvements
- Add "//" prefix to all H1 headings via CSS - Add custom max-width-8xl CSS variable (88rem) - Add cmdk component styling overrides for consistent typography - Update component styles for better consistency - Refine spacing and typography across components 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 1c81768 commit 551af3c

File tree

15 files changed

+38
-32
lines changed

15 files changed

+38
-32
lines changed

src/app/[locale]/globals.css

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
--color-acs-border: var(--color-border);
4343
--color-acs-border-strong: var(--color-border-strong);
4444
--color-acs-hover: var(--color-hover);
45+
46+
/* Custom max-width */
47+
--max-width-8xl: 88rem;
4548
}
4649

4750
body,
@@ -61,6 +64,14 @@ h6 {
6164
font-weight: 600;
6265
}
6366

67+
/* H1 with "//" prefix */
68+
h1::before {
69+
content: "//";
70+
color: var(--color-text-muted);
71+
font-weight: 300;
72+
margin-right: 0.75rem;
73+
}
74+
6475
strong {
6576
font-weight: 600;
6677
}
@@ -100,6 +111,19 @@ strong {
100111
animation: fadeIn 200ms ease-out;
101112
}
102113

114+
/* cmdk overrides */
115+
[cmdk-root] {
116+
font-family: var(--font-ibm-plex-mono), monospace;
117+
}
118+
119+
[cmdk-input] {
120+
font-family: var(--font-ibm-plex-mono), monospace;
121+
}
122+
123+
[cmdk-item] {
124+
font-family: var(--font-ibm-plex-mono), monospace;
125+
}
126+
103127
/* Code block styling */
104128
pre {
105129
overflow-x: auto;

src/components/Footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function Footer() {
8686

8787
return (
8888
<footer className="bg-[var(--color-bg)] border-t border-[var(--color-border)] py-[var(--spacing-xl)] pb-[var(--spacing-md)]">
89-
<div className="max-w-[1400px] mx-auto px-[var(--spacing-md)]">
89+
<div className="max-w-8xl mx-auto px-[var(--spacing-md)]">
9090
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-9 gap-[var(--spacing-lg)] mb-[var(--spacing-lg)]">
9191
<div className="flex flex-col gap-[var(--spacing-sm)] lg:col-span-3">
9292
<span className="text-sm font-semibold tracking-tight">{tFooter('aicodingstack')}</span>

src/components/MDXComponents.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ export function useMDXComponents(components: MDXComponents): MDXComponents {
55
return {
66
h1: ({ children }) => (
77
<h1 className="text-[2rem] font-semibold tracking-[-0.03em] mb-[var(--spacing-md)] text-[var(--color-text)]">
8-
<span className="text-[var(--color-text-muted)] font-light mr-[var(--spacing-xs)]">
9-
{'//'}
10-
</span>
118
{children}
129
</h1>
1310
),

src/components/MegaMenu.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,6 @@ export const MegaMenu = memo(function MegaMenu({ isOpen, onClose }: MegaMenuProp
103103
// Memoize featured links configuration
104104
const featuredLinks = useMemo<FeaturedLink[]>(
105105
() => [
106-
{
107-
href: '/ai-coding-landscape',
108-
titleKey: 'aiCodingLandscape',
109-
descKey: 'aiCodingLandscapeDesc',
110-
marginBottom: 'sm',
111-
},
112106
{
113107
href: '/open-source-rank',
114108
titleKey: 'openSourceRank',

src/components/controls/BackToNavigation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function BackToNavigation({ href, title }: BackToNavigationProps) {
2828

2929
return (
3030
<section className="py-[var(--spacing-lg)] border-b border-[var(--color-border)]">
31-
<div className="max-w-[1400px] mx-auto px-[var(--spacing-md)]">
31+
<div className="max-w-8xl mx-auto px-[var(--spacing-md)]">
3232
<div className="grid grid-cols-1 md:grid-cols-3 gap-[var(--spacing-md)]">
3333
<Link
3434
href={href}

src/components/controls/Breadcrumb.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export function Breadcrumb({
6363
<>
6464
<JsonLd data={breadcrumbListSchema} />
6565
<section className="py-[var(--spacing-sm)] bg-[var(--color-hover)] border-b border-[var(--color-border)]">
66-
<div className="max-w-[1400px] mx-auto px-[var(--spacing-md)]">
66+
<div className="max-w-8xl mx-auto px-[var(--spacing-md)]">
6767
<nav className="flex items-center gap-[var(--spacing-xs)] text-[0.8125rem]">
6868
{items.map((item, index) => {
6969
const isLast = index === items.length - 1

src/components/controls/FilterSortBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export default function FilterSortBar({
8585
<div className="flex flex-wrap items-center gap-[var(--spacing-sm)]">
8686
{/* Search Box */}
8787
{onSearchChange && (
88-
<div className="flex items-center gap-[var(--spacing-xs)] flex-1 min-w-[200px] max-w-[300px]">
88+
<div className="flex items-center gap-[var(--spacing-xs)] flex-1 min-w-[200px] max-w-2xs">
8989
<input
9090
type="text"
9191
value={searchQuery}

src/components/product/GitHubStarHistory.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export function GitHubStarHistory({ githubUrl }: GitHubStarHistoryProps) {
107107
if (loading) {
108108
return (
109109
<section className="py-[var(--spacing-lg)] border-b border-[var(--color-border)]">
110-
<div className="max-w-[1400px] mx-auto px-[var(--spacing-md)]">
110+
<div className="max-w-8xl mx-auto px-[var(--spacing-md)]">
111111
<div className="border border-[var(--color-border)] p-[var(--spacing-md)]">
112112
<div className="flex items-center justify-center h-[300px]">
113113
<p className="text-sm text-[var(--color-text-muted)] animate-pulse">
@@ -126,7 +126,7 @@ export function GitHubStarHistory({ githubUrl }: GitHubStarHistoryProps) {
126126

127127
return (
128128
<section className="py-[var(--spacing-lg)] border-b border-[var(--color-border)]">
129-
<div className="max-w-[1400px] mx-auto px-[var(--spacing-md)]">
129+
<div className="max-w-8xl mx-auto px-[var(--spacing-md)]">
130130
<div className="border border-[var(--color-border)] p-[var(--spacing-md)]">
131131
{/* Header */}
132132
<div className="mb-[var(--spacing-md)]">

src/components/product/LinkCard.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,8 @@ export function LinkCardGrid({
8181

8282
return (
8383
<section className="py-[var(--spacing-lg)] border-b border-[var(--color-border)]">
84-
<div className="max-w-[1400px] mx-auto px-[var(--spacing-md)]">
84+
<div className="max-w-8xl mx-auto px-[var(--spacing-md)]">
8585
<h2 className="text-[1.5rem] font-semibold tracking-[-0.02em] mb-[var(--spacing-sm)]">
86-
<span className="text-[var(--color-text-muted)] font-light mr-[var(--spacing-xs)]">
87-
{'//'}
88-
</span>
8986
{title}
9087
</h2>
9188

src/components/product/ProductCommands.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,8 @@ function CommandSectionItem({ value, label }: Omit<CommandSection, 'labelKey'>)
2020

2121
return (
2222
<section className="py-[var(--spacing-lg)] border-b border-[var(--color-border)]">
23-
<div className="max-w-[1400px] mx-auto px-[var(--spacing-md)]">
23+
<div className="max-w-8xl mx-auto px-[var(--spacing-md)]">
2424
<h2 className="text-[1.5rem] font-semibold tracking-[-0.02em] mb-[var(--spacing-sm)]">
25-
<span className="text-[var(--color-text-muted)] font-light mr-[var(--spacing-xs)]">
26-
{'//'}
27-
</span>
2825
{label}
2926
</h2>
3027

0 commit comments

Comments
 (0)