Open source CapCut alternative.
TypeScript
Fix landing comparison table overflow
David Le5b964d56f196
diff --git a/site/src/app/_components/landing/VsThePast.tsx b/site/src/app/_components/landing/VsThePast.tsxindex 6dc49d46..137a1f6a 100644--- a/site/src/app/_components/landing/VsThePast.tsx+++ b/site/src/app/_components/landing/VsThePast.tsx@@ -34,9 +34,21 @@ function ComparisonCell({ ok }: ComparisonCellProps) {export function VsThePast() {const isDesktop = useMediaQuery("(min-width: 768px)");+ const isComfortable = useMediaQuery("(min-width: 480px)");const colWidths = isDesktop- ? "1.6fr 0.9fr 0.9fr 0.9fr"- : "1.45fr 0.8fr 0.8fr 0.8fr";+ ? "minmax(260px, 1.6fr) repeat(3, minmax(120px, 0.9fr))"+ : "minmax(0, 1.65fr) repeat(3, minmax(0, 0.7fr))";+ const headerCellPadding = isDesktop+ ? "24px 12px"+ : isComfortable+ ? "16px 8px"+ : "14px 3px";+ const rowCellPadding = isDesktop+ ? "20px 12px"+ : isComfortable+ ? "14px 8px"+ : "12px 3px";+ const comparisonHeaderFontSize = isDesktop ? 18 : isComfortable ? 14 : 10;return (<section@@ -63,114 +75,128 @@ export function VsThePast() {files and human assistants who cannot scale past 9-5. Donkey is thethird option.</p>- <div style={{ marginTop: 48, position: "relative", overflowX: "auto" }}>- <div- style={{- position: "absolute",- inset: 0,- transform: "translate(6px, 6px)",- borderRadius: 16,- background: BLACK,- }}- />+ <div style={{ marginTop: 48, overflowX: "auto", paddingRight: 6, paddingBottom: 6 }}><divstyle={{position: "relative",- minWidth: 620,- borderRadius: 16,- border: `2px solid ${BLACK}`,- background: "#fff",- overflow: "hidden",+ width: "100%",+ minWidth: 0,}}><divstyle={{- display: "grid",- gridTemplateColumns: colWidths,- borderBottom: `2px solid ${BLACK}`,+ position: "absolute",+ inset: 0,+ transform: "translate(6px, 6px)",+ borderRadius: 16,+ background: BLACK,+ }}+ />+ <div+ style={{+ position: "relative",+ width: "100%",+ borderRadius: 16,+ border: `2px solid ${BLACK}`,+ background: "#fff",+ overflow: "hidden",}}>- <div style={{ padding: isDesktop ? "24px" : "16px 12px" }}>- <div- style={{- fontSize: 11,- fontWeight: 800,- letterSpacing: "0.1em",- textTransform: "uppercase",- color: "#777",- marginBottom: 4,- }}- >- The capability- </div>- <div style={{ fontWeight: 900, fontSize: isDesktop ? 20 : 15 }}>- What you need- </div>- </div>- {["ChatGPT", "Donkey", "Humans"].map((label) => (- <div- key={label}- style={{- padding: isDesktop ? "24px 12px" : "16px 8px",- borderLeft: `2px solid ${BLACK}`,- textAlign: "center",- background: label === "Donkey" ? CORAL : "#fff",- }}- >- <div style={{ fontSize: 11, fontWeight: 800, marginBottom: 4 }}>- {label === "ChatGPT" ? "A" : label === "Donkey" ? "B" : "C"}- </div>- <div style={{ fontWeight: 900, fontSize: isDesktop ? 18 : 14 }}>- {label}- </div>- </div>- ))}- </div>- {comparisonRows.map((row) => (<div- key={row.label}style={{display: "grid",gridTemplateColumns: colWidths,- borderBottom: "1px solid rgba(0,0,0,0.1)",+ borderBottom: `2px solid ${BLACK}`,}}>- <div- style={{- padding: isDesktop ? "20px 24px" : "14px 12px",- fontWeight: 800,- fontSize: isDesktop ? 15 : 13,- }}- >- {row.label}- </div>- <div- style={{- padding: isDesktop ? "20px 12px" : "14px 8px",- borderLeft: `2px solid ${BLACK}`,- }}- >- <ComparisonCell ok={row.gpts} />- </div>- <div- style={{- padding: isDesktop ? "20px 12px" : "14px 8px",- borderLeft: `2px solid ${BLACK}`,- background: "rgba(236,120,104,0.1)",- }}- >- <ComparisonCell ok={row.donkey} />+ <div style={{ padding: isDesktop ? "24px" : "16px 12px" }}>+ <div+ style={{+ fontSize: 11,+ fontWeight: 800,+ letterSpacing: "0.1em",+ textTransform: "uppercase",+ color: "#777",+ marginBottom: 4,+ }}+ >+ The capability+ </div>+ <div style={{ fontWeight: 900, fontSize: isDesktop ? 20 : 15 }}>+ What you need+ </div></div>+ {["ChatGPT", "Donkey", "Humans"].map((label) => (+ <div+ key={label}+ style={{+ padding: headerCellPadding,+ borderLeft: `2px solid ${BLACK}`,+ textAlign: "center",+ background: label === "Donkey" ? CORAL : "#fff",+ }}+ >+ <div style={{ fontSize: 11, fontWeight: 800, marginBottom: 4 }}>+ {label === "ChatGPT" ? "A" : label === "Donkey" ? "B" : "C"}+ </div>+ <div+ style={{+ fontWeight: 900,+ fontSize: comparisonHeaderFontSize,+ lineHeight: 1.1,+ }}+ >+ {label}+ </div>+ </div>+ ))}+ </div>+ {comparisonRows.map((row) => (<div+ key={row.label}style={{- padding: isDesktop ? "20px 12px" : "14px 8px",- borderLeft: `2px solid ${BLACK}`,+ display: "grid",+ gridTemplateColumns: colWidths,+ borderBottom: "1px solid rgba(0,0,0,0.1)",}}>- <ComparisonCell ok={row.humans} />+ <div+ style={{+ padding: isDesktop ? "20px 24px" : "14px 12px",+ fontWeight: 800,+ fontSize: isDesktop ? 15 : 13,+ }}+ >+ {row.label}+ </div>+ <div+ style={{+ padding: rowCellPadding,+ borderLeft: `2px solid ${BLACK}`,+ }}+ >+ <ComparisonCell ok={row.gpts} />+ </div>+ <div+ style={{+ padding: rowCellPadding,+ borderLeft: `2px solid ${BLACK}`,+ background: "rgba(236,120,104,0.1)",+ }}+ >+ <ComparisonCell ok={row.donkey} />+ </div>+ <div+ style={{+ padding: rowCellPadding,+ borderLeft: `2px solid ${BLACK}`,+ }}+ >+ <ComparisonCell ok={row.humans} />+ </div></div>- </div>- ))}+ ))}+ </div></div></div></section>