Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat(web): refresh homepage marketing sections

Richie McIlroy13f39d484b9c
diff --git a/apps/web/components/ReadyToGetStarted.tsx b/apps/web/components/ReadyToGetStarted.tsx
index b4eea963d..3fa70fc99 100644
--- a/apps/web/components/ReadyToGetStarted.tsx
+++ b/apps/web/components/ReadyToGetStarted.tsx
@@ -2,6 +2,7 @@
import { Button } from "@cap/ui";
import { useDetectPlatform } from "hooks/useDetectPlatform";
+import { ArrowRight } from "lucide-react";
import Link from "next/link";
import { getPlatformIcon } from "@/utils/platform";
import { homepageCopy } from "../data/homepage-copy";
@@ -12,43 +13,40 @@ export function ReadyToGetStarted() {
const loading = platform === null;
return (
- <div
- className="max-w-[1000px] md:bg-center w-[calc(100%-20px)] bg-white min-h-[300px] mx-auto border border-gray-5 my-[150px] md:my-[200px] lg:my-[250px] rounded-[20px] overflow-hidden relative flex flex-col justify-center p-8"
- style={{
- backgroundImage: "url('/illustrations/ctabg.svg')",
- backgroundSize: "cover",
- backgroundRepeat: "no-repeat",
- }}
- >
- <div className="flex relative z-10 flex-col justify-center items-center mx-auto h-full wrapper">
- <div className="text-center max-w-[800px] mx-auto mb-8">
- <h2 className="mb-3 text-3xl md:text-4xl text-gray-12">
- {homepageCopy.readyToGetStarted.title}
- </h2>
- </div>
- <div className="flex flex-col justify-center items-center mb-8 space-y-4 w-full sm:flex-row sm:space-y-0 sm:space-x-2">
+ <div className="my-[120px] md:my-[180px] lg:my-[220px] mx-auto w-[calc(100%-20px)] max-w-[980px] px-5">
+ <div className="flex flex-col items-center text-center">
+ <span className="mb-6 inline-flex items-center gap-2 rounded-full border border-gray-4 bg-white px-3 py-1 text-[11px] font-medium tracking-wide text-gray-10 uppercase">
+ <span className="size-1.5 rounded-full bg-gray-12" />
+ Ready when you are
+ </span>
+ <h2 className="text-3xl font-medium leading-[1.1] tracking-[-0.02em] text-gray-12 md:text-5xl lg:text-6xl">
+ {homepageCopy.readyToGetStarted.title}
+ </h2>
+ <p className="mt-5 max-w-xl text-base text-gray-10 md:text-lg">
+ Free for personal use. Upgrade when you need more.
+ </p>
+ <div className="mt-10 flex flex-col items-center gap-3 sm:flex-row sm:gap-2">
<Button
variant="dark"
href="/pricing"
- size="lg"
- className="font-medium w-fit"
+ size="md"
+ className="!h-11 !px-5 !text-[14px] font-medium"
>
{!loading && getPlatformIcon(platform)}
{homepageCopy.readyToGetStarted.buttons.secondary}
+ <ArrowRight className="size-4" />
</Button>
<UpgradeToPro text={homepageCopy.header.cta.primaryButton} />
</div>
- <div>
- <p>
- or,{" "}
- <Link
- href="/loom-alternative"
- className="font-semibold underline hover:text-gray-12"
- >
- Switch from Loom
- </Link>
- </p>
- </div>
+ <p className="mt-6 text-[13px] text-gray-9">
+ or,{" "}
+ <Link
+ href="/loom-alternative"
+ className="text-gray-10 underline-offset-4 hover:text-gray-12 hover:underline"
+ >
+ switch from Loom
+ </Link>
+ </p>
</div>
</div>
);
diff --git a/apps/web/components/pages/HomePage/Features.tsx b/apps/web/components/pages/HomePage/Features.tsx
index 68776be98..212d6921f 100644
--- a/apps/web/components/pages/HomePage/Features.tsx
+++ b/apps/web/components/pages/HomePage/Features.tsx
@@ -148,11 +148,15 @@ const features: Feature[] = homepageCopy.features.features.map(
const Features = () => {
return (
- <div className="text-center max-w-[1440px] mx-auto px-5">
- <h1 className="mb-3 text-4xl font-medium text-gray-12">
+ <div className="mx-auto max-w-[1440px] px-5 text-center">
+ <span className="mb-4 inline-flex items-center gap-2 rounded-full border border-gray-4 bg-white px-3 py-1 text-[11px] font-medium tracking-wide text-gray-10 uppercase">
+ <span className="size-1.5 rounded-full bg-gray-12" />
+ Features
+ </span>
+ <h2 className="text-3xl font-medium tracking-[-0.015em] text-gray-12 md:text-5xl">
{homepageCopy.features.title}
- </h1>
- <p className="text-lg text-gray-10 leading-[1.75rem] w-full max-w-[600px] mx-auto">
+ </h2>
+ <p className="mx-auto mt-4 w-full max-w-[600px] text-base leading-relaxed text-gray-10 md:text-lg">
{homepageCopy.features.subtitle}
</p>
<div className="flex flex-col gap-4 mt-[52px]">
@@ -200,13 +204,12 @@ const Features = () => {
</div>
</div>
- <div className="mt-10">
- {/* View all features button */}
+ <div className="mt-12">
<Button
href="/features"
- variant="dark"
- size="lg"
- className="inline-flex"
+ variant="outline"
+ size="md"
+ className="inline-flex !h-11 !px-5 !text-[14px]"
>
View all features
</Button>
@@ -239,7 +242,7 @@ const FeatureCard = ({
return (
<div
className={clsx(
- "flex flex-col gap-10 justify-evenly p-6 text-left rounded-xl border md:p-8 bg-gray-1 border-gray-5",
+ "flex flex-col gap-10 justify-evenly p-6 text-left rounded-2xl border md:p-8 bg-white border-gray-4",
className,
)}
>
diff --git a/apps/web/components/pages/HomePage/Header.tsx b/apps/web/components/pages/HomePage/Header.tsx
index 046639355..c8bdee900 100644
--- a/apps/web/components/pages/HomePage/Header.tsx
+++ b/apps/web/components/pages/HomePage/Header.tsx
@@ -1,4 +1,3 @@
-// million-ignore
"use client";
import { Button } from "@cap/ui";
@@ -6,9 +5,10 @@ import { faPlay } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { AnimatePresence, motion } from "framer-motion";
import { useDetectPlatform } from "hooks/useDetectPlatform";
+import { ArrowRight } from "lucide-react";
import Image from "next/image";
import Link from "next/link";
-import { useRef, useState, useTransition } from "react";
+import { useState, useTransition } from "react";
import { sendDownloadLink } from "@/actions/send-download-link";
import { trackEvent } from "@/app/utils/analytics";
import { LogoMarquee } from "@/components/ui/LogoMarquee";
@@ -16,44 +16,27 @@ import {
getDownloadButtonText,
getDownloadUrl,
getPlatformIcon,
- PlatformIcons,
} from "@/utils/platform";
import { homepageCopy } from "../../../data/homepage-copy";
-import UpgradeToPro from "../_components/UpgradeToPro";
-import type { ProArtRef } from "./Pricing/ProArt";
import VideoModal from "./VideoModal";
interface HeaderProps {
serverHomepageCopyVariant?: string;
}
-// Animation variants
const fadeIn = {
- hidden: { opacity: 0, y: 20 },
+ hidden: { opacity: 0, y: 16 },
visible: (custom: number) => ({
opacity: 1,
y: 0,
transition: {
- delay: custom * 0.1,
+ delay: custom * 0.08,
duration: 0.5,
ease: "easeOut",
},
}),
};
-const fadeInFromRight = {
- hidden: { opacity: 0, x: 50 },
- visible: {
- opacity: 1,
- x: 0,
- transition: {
- delay: 0.5,
- duration: 0.6,
- ease: "easeOut",
- },
- },
-};
-
const Header = ({ serverHomepageCopyVariant = "" }: HeaderProps) => {
const [videoToggled, setVideoToggled] = useState(false);
const { platform, isIntel } = useDetectPlatform();
@@ -86,51 +69,53 @@ const Header = ({ serverHomepageCopyVariant = "" }: HeaderProps) => {
});
};
- const getHeaderContent = () => {
- const variant =
- serverHomepageCopyVariant as keyof typeof homepageCopy.header.variants;
- return (
- homepageCopy.header.variants[variant] ||
- homepageCopy.header.variants.default
- );
- };
-
- const _proArtRef = useRef<ProArtRef>(null);
-
- const headerContent = getHeaderContent();
+ const variant =
+ serverHomepageCopyVariant as keyof typeof homepageCopy.header.variants;
+ const headerContent =
+ homepageCopy.header.variants[variant] ||
+ homepageCopy.header.variants.default;
return (
- <div className="mt-[90px] mb-[60px] sm:mb-[100px] md:mb-[160px] w-full max-w-[1920px] overflow-x-hidden md:overflow-visible mx-auto md:mt-[140px] xl:min-h-[700px]">
- <div className="flex flex-col justify-center lg:justify-start xl:flex-row relative z-10 px-5 w-full mb-0">
- <div className="w-full max-w-2xl xl:max-w-[530px] 2xl:mt-12 mx-auto xl:ml-[100px] 2xl:ml-[150px]">
- <div className="flex flex-col text-center md:text-left w-full max-w-[650px]">
- <motion.h1
- className="text-[2.25rem] font-medium leading-[2.5rem] md:text-[3.75rem] md:leading-[4rem] relative z-10 text-black mb-4"
- initial="hidden"
- animate="visible"
- custom={1}
- variants={fadeIn}
- >
- {headerContent.title}
- </motion.h1>
+ <section className="relative w-full overflow-hidden">
+ <div className="mx-auto w-full max-w-[1180px] px-5 pt-28 pb-16 md:pt-36 md:pb-24 lg:px-8">
+ <div className="mx-auto flex max-w-[860px] flex-col items-center text-center">
+ <motion.span
+ initial="hidden"
+ animate="visible"
+ custom={0}
+ variants={fadeIn}
+ className="mb-7 inline-flex items-center gap-2 rounded-full border border-gray-4 bg-white px-3 py-1 text-[11px] font-medium tracking-wide text-gray-10 uppercase"
+ >
+ <span className="size-1.5 rounded-full bg-gray-12" />
+ Open source · Cross-platform
+ </motion.span>
- <motion.p
- className="mx-auto mb-8 max-w-3xl text-lg text-zinc-500"
- initial="hidden"
- animate="visible"
- custom={2}
- variants={fadeIn}
- >
- {headerContent.description}
- </motion.p>
- </div>
+ <motion.h1
+ initial="hidden"
+ animate="visible"
+ custom={1}
+ variants={fadeIn}
+ className="text-[2.5rem] leading-[1.05] tracking-[-0.02em] font-medium text-gray-12 md:text-[64px] lg:text-[80px]"
+ >
+ {headerContent.title}
+ </motion.h1>
+
+ <motion.p
+ initial="hidden"
+ animate="visible"
+ custom={2}
+ variants={fadeIn}
+ className="mx-auto mt-6 max-w-[640px] text-base leading-relaxed text-gray-10 md:text-lg"
+ >
+ {headerContent.description}
+ </motion.p>
<motion.div
- className="hidden md:flex flex-wrap gap-4 items-center mb-5"
initial="hidden"
animate="visible"
custom={3}
variants={fadeIn}
+ className="mt-10 hidden flex-wrap items-center justify-center gap-3 md:flex"
>
<Button
variant="dark"
@@ -144,27 +129,38 @@ const Header = ({ serverHomepageCopyVariant = "" }: HeaderProps) => {
is_intel: Boolean(isIntel),
})
}
- size="lg"
- className="flex justify-center items-center font-medium max-w-fit"
+ size="md"
+ className="!h-11 !px-5 !text-[14px] font-medium"
>
{!loading && getPlatformIcon(platform)}
{getDownloadButtonText(platform, loading, isIntel)}
</Button>
- <UpgradeToPro text={homepageCopy.header.cta.primaryButton} />
+ <Button
+ variant="outline"
+ href="/pricing"
+ size="md"
+ className="!h-11 !px-5 !text-[14px] font-medium"
+ >
+ See pricing
+ <ArrowRight className="size-4" />
+ </Button>
</motion.div>
<motion.div
- className="flex md:hidden flex-col gap-3 mb-5"
initial="hidden"
animate="visible"
custom={3}
variants={fadeIn}
+ className="mt-10 flex w-full max-w-sm flex-col gap-3 md:hidden"
>
{emailStatus === "sent" ? (
- <div className="rounded-xl bg-green-50 border border-green-200 px-4 py-3">
- <p className="text-sm font-medium text-green-800">
- Check your inbox! We've sent the download links to{" "}
- <strong>{email}</strong>.
+ <div className="rounded-2xl border border-gray-4 bg-white px-4 py-3 text-left">
+ <p className="text-sm font-medium text-gray-12">
+ Check your inbox.
+ </p>
+ <p className="mt-1 text-xs text-gray-10">
+ We've sent the download links to{" "}
+ <strong className="text-gray-12">{email}</strong>.
</p>
</div>
) : (
@@ -178,49 +174,36 @@ const Header = ({ serverHomepageCopyVariant = "" }: HeaderProps) => {
onChange={(e) => setEmail(e.target.value)}
placeholder="[email protected]"
required
- className="w-full rounded-full border border-gray-300 bg-white px-4 py-2.5 text-sm text-black placeholder:text-gray-400 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500"
+ className="w-full rounded-full border border-gray-4 bg-white px-4 py-2.5 text-sm text-gray-12 placeholder:text-gray-9 focus:border-gray-12 focus:outline-none"
/>
<button
type="submit"
disabled={isPending}
- className="w-full rounded-full bg-black px-5 py-2.5 text-sm font-medium text-white transition-opacity disabled:opacity-60"
+ className="w-full rounded-full bg-gray-12 px-5 py-2.5 text-sm font-medium text-white transition-colors hover:bg-gray-11 disabled:opacity-60"
>
- {isPending ? "Sending..." : "Email me the download link"}
+ {isPending ? "Sending…" : "Email me the download link"}
</button>
{emailStatus === "error" && (
- <p className="text-xs text-red-600">{emailError}</p>
+ <p className="text-xs text-red-500">{emailError}</p>
)}
</form>
)}
- <div className="flex items-center gap-3 my-1">
- <div className="h-px flex-1 bg-gray-300" />
- <span className="text-sm font-medium text-gray-500">or</span>
- <div className="h-px flex-1 bg-gray-300" />
- </div>
- <div className="flex justify-center">
- <UpgradeToPro text={homepageCopy.header.cta.primaryButton} />
- </div>
+ <Link
+ href="/pricing"
+ className="text-center text-[13px] text-gray-10 underline-offset-4 hover:text-gray-12 hover:underline"
+ >
+ See pricing →
+ </Link>
</motion.div>
<motion.p
- className="text-sm text-gray-10 text-center md:text-left"
initial="hidden"
animate="visible"
custom={4}
variants={fadeIn}
+ className="mt-4 text-[13px] text-gray-9"
>
- {homepageCopy.header.cta.freeVersionText}
- </motion.p>
-
- <motion.div
- className="hidden md:block mt-6 mb-10"
- initial="hidden"
- animate="visible"
- custom={5}
- variants={fadeIn}
- >
- <PlatformIcons source="home_header" />
-
+ {homepageCopy.header.cta.freeVersionText} ·{" "}
<Link
href="/download"
onClick={() =>
@@ -232,59 +215,61 @@ const Header = ({ serverHomepageCopyVariant = "" }: HeaderProps) => {
is_intel: Boolean(isIntel),
})
}
- className="mt-2 text-sm underline text-gray-10 hover:text-gray-12"
+ className="text-gray-10 underline-offset-4 hover:text-gray-12 hover:underline"
>
{homepageCopy.header.cta.seeOtherOptionsText}
</Link>
- </motion.div>
-
- <motion.div
- className="mt-14"
- initial="hidden"
- animate="visible"
- custom={6}
- variants={fadeIn}
- >
- <p className="mb-4 text-sm italic text-gray-10 text-center md:text-left">
- Trusted by <strong>30,000+</strong> teams, builders and creators
- </p>
- <LogoMarquee />
- </motion.div>
+ </motion.p>
</div>
<motion.div
- className="xl:absolute drop-shadow-2xl -top-[22%] lg:-right-[400px] 2xl:-right-[300px] w-full xl:max-w-[1000px] 2xl:max-w-[1200px]"
- initial="hidden"
- animate="visible"
- variants={fadeInFromRight}
+ initial={{ opacity: 0, y: 32 }}
+ animate={{ opacity: 1, y: 0 }}
+ transition={{ delay: 0.55, duration: 0.7, ease: "easeOut" }}
+ className="relative mx-auto mt-16 max-w-[1080px] md:mt-20"
>
- {/* Play Button*/}
- <motion.div
- whileTap={{ scale: 0.95 }}
- whileHover={{ scale: 1.05 }}
+ <button
+ type="button"
onClick={() => setVideoToggled(true)}
- className="size-[100px] md:size-[150px] inset-x-0 mx-auto top-[35vw] xs:top-[180px] sm:top-[35vw] xl:top-[350px] 2xl:top-[400px] xl:left-[-120px] relative cursor-pointer z-10
- shadow-[0px_60px_40px_3px_rgba(0,0,0,0.4)] flex items-center justify-center rounded-full bg-blue-500"
+ aria-label="Play product video"
+ className="group relative block w-full overflow-hidden rounded-2xl border border-gray-4 bg-white shadow-[0_8px_32px_-8px_rgba(0,0,0,0.06)] transition-all hover:shadow-[0_12px_40px_-8px_rgba(0,0,0,0.10)]"
>
- <FontAwesomeIcon
- icon={faPlay}
- className="text-white size-8 md:size-12"
+ <Image
+ src="/illustrations/app.webp"
+ width={1920}
+ height={1080}
+ quality={100}
+ alt="Cap app preview"
+ className="block w-full object-cover"
/>
- </motion.div>
- <Image
- src="/illustrations/app.webp"
- width={1000}
- height={1000}
- quality={100}
- alt="App"
- className="object-cover relative inset-0 rounded-xl opacity-70 size-full"
- />
+ <span className="absolute inset-0 flex items-center justify-center bg-transparent transition-colors group-hover:bg-black/5">
+ <span className="flex size-14 items-center justify-center rounded-full bg-white/95 shadow-md ring-1 ring-black/5 backdrop-blur-sm transition-transform group-hover:scale-105 md:size-16">
+ <FontAwesomeIcon
+ icon={faPlay}
+ className="ml-0.5 size-5 text-gray-12 md:size-6"
+ />
+ </span>
+ </span>
+ </button>
+ </motion.div>
+
+ <motion.div
+ initial={{ opacity: 0 }}
+ animate={{ opacity: 1 }}
+ transition={{ delay: 0.7, duration: 0.6 }}
+ className="mt-20 md:mt-28"
+ >
+ <p className="mb-6 text-center text-[12px] font-medium tracking-[0.18em] text-gray-9 uppercase">
+ Trusted by 30,000+ teams, builders & creators
+ </p>
+ <LogoMarquee />
</motion.div>
</div>
+
<AnimatePresence>
{videoToggled && <VideoModal setVideoToggled={setVideoToggled} />}
</AnimatePresence>
- </div>
+ </section>
);
};
diff --git a/apps/web/components/pages/HomePage/RecordingModePicker.tsx b/apps/web/components/pages/HomePage/RecordingModePicker.tsx
index 4f511de47..1c056f5f6 100644
--- a/apps/web/components/pages/HomePage/RecordingModePicker.tsx
+++ b/apps/web/components/pages/HomePage/RecordingModePicker.tsx
@@ -137,13 +137,13 @@ const RecordingModePicker = () => {
transition={{ duration: 0.6 }}
className="text-center mb-8 md:mb-14"
>
- <span className="inline-block text-xs font-semibold text-gray-9 uppercase tracking-[0.2em] mb-3">
- 3 Modes
+ <span className="mb-4 inline-flex items-center gap-2 rounded-full border border-gray-4 bg-white px-3 py-1 text-[11px] font-medium tracking-wide text-gray-10 uppercase">
+ <span className="size-1.5 rounded-full bg-gray-12" />3 modes
</span>
- <h2 className="text-3xl md:text-4xl font-medium text-gray-12 mb-3">
+ <h2 className="text-3xl font-medium tracking-[-0.015em] text-gray-12 md:text-5xl">
One app, every workflow
</h2>
- <p className="text-base md:text-lg text-gray-10 max-w-[600px] mx-auto">
+ <p className="mx-auto mt-4 max-w-[600px] text-base text-gray-10 md:text-lg">
Whether you need speed, studio quality, or a quick screenshot — Cap
has a mode for it.
</p>
@@ -210,7 +210,7 @@ const RecordingModePicker = () => {
layoutId="modeRing"
style={{
boxShadow:
- "0 0 0 3px var(--gray-1), 0 0 0 5px var(--blue-9)",
+ "0 0 0 3px var(--gray-1), 0 0 0 5px var(--gray-12)",
}}
transition={{
type: "spring",
@@ -282,7 +282,7 @@ const RecordingModePicker = () => {
layoutId="modeRingMd"
style={{
boxShadow:
- "0 0 0 3px var(--gray-1), 0 0 0 5.5px var(--blue-9)",
+ "0 0 0 3px var(--gray-1), 0 0 0 5.5px var(--gray-12)",
}}
transition={{
type: "spring",