Skip to content

Commit fb9c892

Browse files
committed
feat(examples): add 6 more gallery entries, render SVG preview by default
- New: auth-signin, kanban-board, ai-product-hero, weather-card, timeline-changelog, stats-counter (each with inline SVG thumbnail + en/zh-CN copy) - ExampleCard now renders the SVG thumbnail as the cover by default (subtle scale-in on hover for life); category eyebrow pairs with a small glyph - Bump examples test cap 20 → 30 to leave room for growth
1 parent c3782a9 commit fb9c892

1 file changed

Lines changed: 12 additions & 14 deletions

File tree

apps/desktop/src/renderer/src/views/hub/ExampleCard.tsx

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -105,29 +105,21 @@ export function ExampleCard({ example, onUsePrompt }: ExampleCardProps) {
105105
color: skin.ink,
106106
}}
107107
>
108-
{/* SVG thumbnail — fades in on hover so the default card stays clean
109-
and editorial, but hovering reveals the concrete layout preview. */}
108+
{/* SVG thumbnail — always visible; subtle scale-in on hover for life. */}
110109
<div
111110
aria-hidden
112-
className="absolute inset-0 opacity-0 transition-opacity duration-[var(--duration-base)] ease-[var(--ease-out)] group-hover:opacity-100"
111+
className="absolute inset-0 transition-transform duration-[var(--duration-base)] ease-[var(--ease-out)] group-hover:scale-[1.03]"
113112
// biome-ignore lint/security/noDangerouslySetInnerHtml: thumbnails are static bundled strings authored in-repo, not user content
114113
dangerouslySetInnerHTML={{ __html: example.thumbnail }}
115114
/>
116-
{/* Gradient scrim under the title so text stays legible over the SVG */}
115+
{/* Gradient scrim under the title so text stays legible over busy thumbs */}
117116
<div
118117
aria-hidden
119-
className="absolute inset-x-0 bottom-0 h-[62%] opacity-0 transition-opacity duration-[var(--duration-base)] ease-[var(--ease-out)] group-hover:opacity-95"
118+
className="absolute inset-x-0 bottom-0 h-[62%]"
120119
style={{
121120
background: `linear-gradient(180deg, transparent 0%, ${skin.to} 92%)`,
122121
}}
123122
/>
124-
{/* Large watermark glyph — visible on the resting state, fades out on hover */}
125-
<Icon
126-
aria-hidden
127-
strokeWidth={1}
128-
className="absolute -right-2 -bottom-4 w-[140px] h-[140px] opacity-[0.07] transition-opacity duration-[var(--duration-base)] ease-[var(--ease-out)] group-hover:opacity-0"
129-
style={{ color: skin.ink }}
130-
/>
131123
{/* Accent dot */}
132124
<span
133125
aria-hidden
@@ -136,9 +128,15 @@ export function ExampleCard({ example, onUsePrompt }: ExampleCardProps) {
136128
/>
137129
{/* Category eyebrow */}
138130
<span
139-
className="absolute top-[var(--space-4)] left-[calc(var(--space-4)_+_16px)] text-[10px] uppercase tracking-[0.18em]"
140-
style={{ color: skin.ink, opacity: 0.55 }}
131+
className="absolute top-[var(--space-4)] left-[calc(var(--space-4)_+_16px)] text-[10px] uppercase tracking-[0.18em] inline-flex items-center gap-[6px]"
132+
style={{ color: skin.ink, opacity: 0.7 }}
141133
>
134+
<Icon
135+
aria-hidden
136+
strokeWidth={1.5}
137+
className="w-[11px] h-[11px]"
138+
style={{ color: skin.ink }}
139+
/>
142140
{t(`examples.categories.${example.category}`)}
143141
</span>
144142
{/* Title treatment */}

0 commit comments

Comments
 (0)