Skip to content

The open-source full-stack studio for Opus 5.5 motion video. Reverse engineering for any video. Code video with HTML: recreate, edit and render. BYOA + BYOK · Motion.md · Images, Video, Music & Voice.

fix(gallery): prevent load button text wrapping in card footer (#43)

chasel344d9ae96f1cb7
diff --git a/src/components/formats-gallery.tsx b/src/components/formats-gallery.tsx
index 6e89e4b6..7119665f 100644
--- a/src/components/formats-gallery.tsx
+++ b/src/components/formats-gallery.tsx
@@ -478,14 +478,14 @@ function FormatCard({ ex, onLoad }: { ex: FormatExample; onLoad: () => void }) {
</pre>
<div className="flex items-center justify-between gap-2 pt-1 mt-auto">
<span
- className="text-[10px] uppercase tracking-[0.14em] text-[var(--ink-faint)] truncate"
+ className="min-w-0 truncate text-[10px] uppercase tracking-[0.14em] text-[var(--ink-faint)]"
title={ex.filename}
>
{ex.filename}
</span>
<button
onClick={onLoad}
- className="inline-flex items-center gap-1.5 rounded-full px-3 py-1.5 text-[12px] font-semibold transition-all"
+ className="shrink-0 whitespace-nowrap inline-flex items-center gap-1.5 rounded-full px-3 py-1.5 text-[12px] font-semibold transition-all"
style={{
background: "var(--coral)",
color: "#fff",
diff --git a/src/components/samples-gallery.tsx b/src/components/samples-gallery.tsx
index 081e497c..847ccf9f 100644
--- a/src/components/samples-gallery.tsx
+++ b/src/components/samples-gallery.tsx
@@ -281,13 +281,16 @@ function SampleCard({
)}
<div className="flex items-center justify-between gap-2 pt-1.5 mt-auto">
- <span className="text-[10px] uppercase tracking-[0.14em] text-[var(--ink-faint)]">
+ <span
+ className="min-w-0 truncate text-[10px] uppercase tracking-[0.14em] text-[var(--ink-faint)]"
+ title={`${tpl.scenario} · ${example?.format ?? "html"}`}
+ >
{tpl.scenario} · {example?.format ?? "html"}
</span>
<button
onClick={onLoad}
disabled={loading}
- className="inline-flex items-center gap-1.5 rounded-full px-3 py-1.5 text-[12px] font-semibold transition-all disabled:opacity-50"
+ className="shrink-0 whitespace-nowrap inline-flex items-center gap-1.5 rounded-full px-3 py-1.5 text-[12px] font-semibold transition-all disabled:opacity-50"
style={{
background: "var(--coral)",
color: "#fff",