Skip to content

Open source CapCut alternative.

TypeScript

feat(site): hover-only tile titles and All-tab-only kind badges in the showcase

David Le2de7fff6c2ab
diff --git a/site/public/media-showcase/anime-rooftop.webp b/site/public/media-showcase/anime-rooftop.webp
index 709eb4e5..4398bd0c 100644
Binary files a/site/public/media-showcase/anime-rooftop.webp and b/site/public/media-showcase/anime-rooftop.webp differ
diff --git a/site/public/media-showcase/claymation-bee.webp b/site/public/media-showcase/claymation-bee.webp
index e3ae1f23..d98f8a7b 100644
Binary files a/site/public/media-showcase/claymation-bee.webp and b/site/public/media-showcase/claymation-bee.webp differ
diff --git a/site/src/app/_components/landing/media-showcase/MediaCard.tsx b/site/src/app/_components/landing/media-showcase/MediaCard.tsx
index c6191861..81a9aa1c 100644
--- a/site/src/app/_components/landing/media-showcase/MediaCard.tsx
+++ b/site/src/app/_components/landing/media-showcase/MediaCard.tsx
@@ -29,6 +29,9 @@ type Props = {
onOpen: (item: MediaShowcaseItem) => void;
// Above-the-fold tile: preload its image eagerly (it is a likely LCP).
priority?: boolean;
+ // The image/video badge only appears in mixed-kind views (the "All" tab);
+ // a single-category tab makes the kind self-evident.
+ showKind?: boolean;
// Flex sizing from the row packer: grow shares row width by aspect ratio so
// tiles in a row end up the same height; a sparse last row passes grow 0
// with a fixed pixel basis instead.
@@ -50,6 +53,7 @@ export function MediaCard({
onOpen,
pack,
priority = false,
+ showKind = false,
uniformGrid = false,
}: Props) {
const isVideo = item.kind === "video";
@@ -116,16 +120,19 @@ export function MediaCard({
/>
) : null}
- <span className="absolute top-3 left-3 inline-flex items-center gap-1.5 rounded-full border-2 border-ink bg-cream px-2.5 py-1 text-[11px] font-semibold tracking-[0.04em] uppercase">
- <KindIcon size={12} />
- {item.kind}
- </span>
+ {showKind ? (
+ <span className="absolute top-3 left-3 inline-flex items-center gap-1.5 rounded-full border-2 border-ink bg-cream px-2.5 py-1 text-[11px] font-semibold tracking-[0.04em] uppercase">
+ <KindIcon size={12} />
+ {item.kind}
+ </span>
+ ) : null}
- <div className="absolute inset-x-0 bottom-0 flex items-end justify-between gap-2 bg-gradient-to-t from-black/75 via-black/25 to-transparent p-3 pt-8">
+ {/* Title overlay stays hidden until hover/focus so the artwork reads clean. */}
+ <div className="absolute inset-x-0 bottom-0 flex items-end justify-between gap-2 bg-gradient-to-t from-black/75 via-black/25 to-transparent p-3 pt-8 opacity-0 transition-opacity duration-200 group-hover:opacity-100 group-focus-visible:opacity-100">
<span className="text-[14px] leading-tight font-semibold text-white">
{item.title}
</span>
- <span className="shrink-0 rounded-full bg-white/90 p-1.5 text-ink opacity-0 transition-opacity duration-200 group-hover:opacity-100">
+ <span className="shrink-0 rounded-full bg-white/90 p-1.5 text-ink">
<Maximize2 size={14} />
</span>
</div>
diff --git a/site/src/app/_components/landing/media-showcase/MediaShowcase.tsx b/site/src/app/_components/landing/media-showcase/MediaShowcase.tsx
index 8228b4db..ee63bee3 100644
--- a/site/src/app/_components/landing/media-showcase/MediaShowcase.tsx
+++ b/site/src/app/_components/landing/media-showcase/MediaShowcase.tsx
@@ -160,6 +160,7 @@ export function MediaShowcase({ blurb, heading }: Props) {
key={item.id}
onOpen={setSelected}
priority={rowIndex === 0}
+ showKind={category === "All"}
pack={
stretch
? { grow: layoutRatio(item), basis: "0px" }
@@ -184,6 +185,7 @@ export function MediaShowcase({ blurb, heading }: Props) {
key={item.id}
onOpen={setSelected}
priority={index < 5}
+ showKind={category === "All"}
uniformGrid={uniformGrid}
/>
))}
diff --git a/site/src/app/_components/landing/media-showcase/data.ts b/site/src/app/_components/landing/media-showcase/data.ts
index e8b52b68..953b87d3 100644
--- a/site/src/app/_components/landing/media-showcase/data.ts
+++ b/site/src/app/_components/landing/media-showcase/data.ts
@@ -549,7 +549,7 @@ export const mediaShowcaseItems: MediaShowcaseItem[] = [
kind: "image",
category: "Animation & Illustration",
prompt:
- "Anime-style key visual of a teenager standing on a city rooftop at dusk, dramatic clouds, warm lens flare, crisp cel shading, high detail.",
+ "Anime-style scene of a teenager standing on a school rooftop at dusk, vast glowing cumulus clouds, warm lens flare, crisp cel shading, quiet skyline below, high detail, no text or lettering.",
aspect: "landscape",
settings: ["Gemini image", "16:9"],
thumbnailSrc: "/media-showcase/anime-rooftop.webp",
@@ -561,7 +561,7 @@ export const mediaShowcaseItems: MediaShowcaseItem[] = [
kind: "image",
category: "Animation & Illustration",
prompt:
- "Claymation-style character sheet of a friendly bumblebee mascot, soft studio lighting, tactile fingerprints in the clay, front and side views.",
+ "Claymation-style friendly bumblebee mascot standing on a seamless cream backdrop, soft studio lighting, tactile fingerprints in the clay, cheerful expression, no text or lettering.",
aspect: "square",
settings: ["Gemini image", "1:1"],
thumbnailSrc: "/media-showcase/claymation-bee.webp",