Skip to content

Commit c8cafe7

Browse files
tianzhouclaude
andcommitted
Use gradient product icons in landing page cards
Replace the inline monochrome stroke SVGs with the new function-specific gradient icons (public/icons/*.svg). Change ProductCard's icon prop to a path string rendered via a plain img, and drop the accent tint on the icon chip so each product's colour reads on its own. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 2b0d212 commit c8cafe7

2 files changed

Lines changed: 9 additions & 29 deletions

File tree

src/app/page.tsx

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,51 +12,31 @@ const products: Product[] = [
1212
description:
1313
'Web-based Postgres development workspace with guardrails. Query, explore, and manage your databases safely from the browser.',
1414
tags: ['Web UI', 'SQL Editor', 'Access Control'],
15-
icon: (
16-
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
17-
<rect x="2" y="3" width="20" height="14" rx="2" />
18-
<path d="M8 21h8M12 17v4M6 8l4 3-4 3M12 16h4" />
19-
</svg>
20-
),
15+
icon: '/icons/pgconsole.svg',
2116
},
2217
{
2318
name: 'pgtui',
2419
href: 'https://github.com/pgplex/pgtui',
2520
description:
2621
'A beautiful terminal UI for Postgres. Navigate schemas, run queries, and inspect data — all without leaving your terminal.',
2722
tags: ['Terminal', 'TUI'],
28-
icon: (
29-
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
30-
<polyline points="4 17 10 11 4 5" />
31-
<line x1="12" y1="19" x2="20" y2="19" />
32-
</svg>
33-
),
23+
icon: '/icons/pgtui.svg',
3424
},
3525
{
3626
name: 'pgparser',
3727
href: 'https://github.com/pgplex/pgparser',
3828
description:
3929
'Thread-safe, Golang-native Postgres parser. Parse, analyze, and transform SQL with zero CGo dependencies.',
4030
tags: ['Go', 'Parser', 'Library'],
41-
icon: (
42-
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
43-
<polyline points="16 18 22 12 16 6" />
44-
<polyline points="8 6 2 12 8 18" />
45-
<line x1="14" y1="4" x2="10" y2="20" />
46-
</svg>
47-
),
31+
icon: '/icons/pgparser.svg',
4832
},
4933
{
5034
name: 'pgschema',
5135
href: 'https://github.com/pgplex/pgschema',
5236
description:
5337
'Schema management for Postgres. Diff, migrate, and version your database schema with confidence.',
5438
tags: ['Schema', 'Migration', 'Diff'],
55-
icon: (
56-
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
57-
<path d="M3 3h7v7H3zM14 3h7v7h-7zM3 14h7v7H3zM14 17.5a3.5 3.5 0 1 0 7 0 3.5 3.5 0 1 0-7 0" />
58-
</svg>
59-
),
39+
icon: '/icons/pgschema.svg',
6040
},
6141
]
6242

src/components/product-card.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
import type { ReactNode } from 'react'
2-
31
export type Product = {
42
name: string
53
href: string
64
description: string
75
tags: string[]
8-
icon: ReactNode
6+
icon: string
97
}
108

119
export function ProductCard({ name, href, description, tags, icon }: Product) {
@@ -17,8 +15,10 @@ export function ProductCard({ name, href, description, tags, icon }: Product) {
1715
className="flex flex-col gap-3.5 border border-border bg-card px-7 py-8 text-left shadow-[4px_4px_0_var(--color-border)] transition-all duration-150 hover:shadow-[6px_6px_0_var(--color-border-bright)]"
1816
>
1917
<div className="flex items-center gap-3">
20-
<span className="flex size-9 shrink-0 items-center justify-center border border-border-bright bg-accent/6 text-accent">
21-
{icon}
18+
<span className="flex size-9 shrink-0 items-center justify-center border border-border-bright bg-bg">
19+
{/* Static export with images.unoptimized — a plain img avoids the
20+
next/image runtime for a fixed-size product glyph. */}
21+
<img src={icon} alt="" width={28} height={28} />
2222
</span>
2323
<h3 className="text-[17px] font-semibold tracking-tight text-ink">{name}</h3>
2424
</div>

0 commit comments

Comments
 (0)