Skip to content

Open source CapCut alternative.

TypeScript

fix(site): keep the landing header on one line at phone widths

David Le5640bc54e2eb
diff --git a/site/src/app/_components/landing/LandingPrimitives.tsx b/site/src/app/_components/landing/LandingPrimitives.tsx
index 318acb2e..cf523d10 100644
--- a/site/src/app/_components/landing/LandingPrimitives.tsx
+++ b/site/src/app/_components/landing/LandingPrimitives.tsx
@@ -154,6 +154,7 @@ export function PillButton({
minHeight: size === "lg" ? 56 : 40,
opacity: disabled ? 0.65 : 1,
textDecoration: "none",
+ whiteSpace: "nowrap",
transition: "transform 0.15s ease, opacity 0.15s ease",
...sizes[size],
...variants[variant],
diff --git a/site/src/app/_components/landing/TopNav.tsx b/site/src/app/_components/landing/TopNav.tsx
index 688bd235..1d0af237 100644
--- a/site/src/app/_components/landing/TopNav.tsx
+++ b/site/src/app/_components/landing/TopNav.tsx
@@ -55,7 +55,7 @@ export function TopNav({
<header className="sticky top-0 z-50 w-full py-3 md:py-4">
<div
className={cn(
- "mx-auto flex w-full max-w-[1400px] items-center justify-between rounded-[24px] px-6 py-2 transition-all duration-300 md:px-12 md:py-2.5",
+ "mx-auto flex w-full max-w-[1400px] items-center justify-between rounded-[24px] px-4 py-2 transition-all duration-300 md:px-12 md:py-2.5",
scrolled
? "border border-ink/10 bg-cream/95 shadow-[0_18px_50px_rgba(15,14,13,0.10)] backdrop-blur-md"
: "border border-transparent bg-transparent shadow-none",
@@ -63,9 +63,9 @@ export function TopNav({
>
<Link
href={homeHref}
- className="flex items-center gap-0 text-ink no-underline"
+ className="flex items-center gap-1 text-ink no-underline md:gap-3"
>
- <div className="flex h-[59px] w-[59px] items-center justify-center overflow-hidden rounded-[10px]">
+ <div className="flex h-[44px] w-[44px] items-center justify-center overflow-hidden rounded-[10px] md:h-[59px] md:w-[59px]">
<Image
src="/donkey-logo.svg"
alt=""
@@ -76,7 +76,9 @@ export function TopNav({
unoptimized
/>
</div>
- <span className="text-2xl font-semibold">{wordmark}</span>
+ <span className="whitespace-nowrap text-lg font-semibold md:text-2xl">
+ {wordmark}
+ </span>
</Link>
<div className="flex items-center gap-[10px] md:gap-4">
{isSignedIn ? (
@@ -90,7 +92,7 @@ export function TopNav({
full-page navigation the sign-in route needs. */}
<a
href={signedOutAuth.logInHref}
- className="whitespace-nowrap text-sm font-semibold text-ink no-underline"
+ className="hidden whitespace-nowrap text-sm font-semibold text-ink no-underline sm:inline"
>
Log in
</a>