Skip to content

Commit 76bba21

Browse files
committed
fix auto theme, add single showcase vieo
1 parent a3fbc3f commit 76bba21

File tree

7 files changed

+569
-9
lines changed

7 files changed

+569
-9
lines changed

src/components/ShowcaseCard.tsx

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Link } from '@tanstack/react-router'
12
import { twMerge } from 'tailwind-merge'
23
import { ExternalLink, ThumbsUp, ThumbsDown } from 'lucide-react'
34
import { libraries, type LibraryId } from '~/libraries'
@@ -34,11 +35,10 @@ export function ShowcaseCard({
3435
className,
3536
)}
3637
>
37-
{/* Main link area */}
38-
<a
39-
href={showcase.url}
40-
target="_blank"
41-
rel="noopener noreferrer"
38+
{/* Main link area - links to detail page */}
39+
<Link
40+
to="/showcase/$id"
41+
params={{ id: showcase.id }}
4242
className="block flex-1 flex flex-col"
4343
>
4444
{/* Screenshot */}
@@ -58,10 +58,6 @@ export function ShowcaseCard({
5858
/>
5959
</div>
6060
)}
61-
{/* External link indicator */}
62-
<div className="absolute top-3 right-3 p-2 rounded-full bg-white/80 dark:bg-gray-800/80 opacity-0 group-hover:opacity-100 transition-opacity">
63-
<ExternalLink className="w-4 h-4 text-gray-600 dark:text-gray-300" />
64-
</div>
6561
</div>
6662

6763
{/* Content */}
@@ -73,6 +69,18 @@ export function ShowcaseCard({
7369
{showcase.tagline}
7470
</p>
7571
</div>
72+
</Link>
73+
74+
{/* External link button - separate from card link */}
75+
<a
76+
href={showcase.url}
77+
target="_blank"
78+
rel="noopener noreferrer"
79+
onClick={(e) => e.stopPropagation()}
80+
className="absolute top-3 right-3 p-2 rounded-full bg-white/90 dark:bg-gray-800/90 shadow-sm hover:bg-white dark:hover:bg-gray-700 transition-colors"
81+
title="Visit site"
82+
>
83+
<ExternalLink className="w-4 h-4 text-gray-600 dark:text-gray-300" />
7684
</a>
7785

7886
{/* Footer with libraries and voting */}

0 commit comments

Comments
 (0)