From b252fa113d3131743536b77dc7b31aa30debe25b Mon Sep 17 00:00:00 2001 From: TerryM Date: Fri, 29 May 2026 13:08:16 +0800 Subject: [PATCH] feat: make entire recommended card clickable to jump to post bubble Wrap the card in a stretched link overlay so clicking anywhere (not just the title) navigates to /resource/:id and scrolls to the matching bubble. Keep the download button above the overlay so it stays clickable. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/components/RecommendedCard.tsx | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/components/RecommendedCard.tsx b/src/components/RecommendedCard.tsx index cc08720..fb84c6f 100644 --- a/src/components/RecommendedCard.tsx +++ b/src/components/RecommendedCard.tsx @@ -97,7 +97,7 @@ export function RecommendedCard({ + aria-label={displayTitle} + className="absolute inset-0 z-10 outline-none focus-visible:ring-2 focus-visible:ring-ark-gold/70" + /> +
{cover ? ( ) : null} - +
- +

{displayTitle} - +

{useFigmaDesign ? (
{displayCategoryName} @@ -173,8 +172,8 @@ export function RecommendedCard({ type="button" className={ useFigmaDesign - ? "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-[#191921] text-ark-gold outline-none transition hover:bg-[#22232D] active:scale-95 focus-visible:ring-2 focus-visible:ring-ark-gold/80 disabled:cursor-wait" - : "shrink-0 rounded-lg p-1 text-ark-gold outline-none transition hover:bg-ark-gold/10 active:scale-95 focus-visible:ring-2 focus-visible:ring-ark-gold/80 disabled:cursor-wait" + ? "relative z-20 flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-[#191921] text-ark-gold outline-none transition hover:bg-[#22232D] active:scale-95 focus-visible:ring-2 focus-visible:ring-ark-gold/80 disabled:cursor-wait" + : "relative z-20 shrink-0 rounded-lg p-1 text-ark-gold outline-none transition hover:bg-ark-gold/10 active:scale-95 focus-visible:ring-2 focus-visible:ring-ark-gold/80 disabled:cursor-wait" } title={isDownloading ? t("downloading") : t("download")} aria-label={isDownloading ? t("downloading") : t("download")}