Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d00c27f
feat: Add 3D video asset
yamcodes Nov 29, 2025
1a33f55
feat: Replace `3d.mp4` with theme-specific `3d-dark.mp4` and `3d-ligh…
yamcodes Nov 30, 2025
b2271f8
feat: add 3D dark and light video metadata files
yamcodes Nov 30, 2025
9d63779
[autofix.ci] apply automated fixes
autofix-ci[bot] Nov 30, 2025
c654f75
feat: Implement theme-aware hero video, replacing the old video demo …
yamcodes Nov 30, 2025
703c24c
chore: Remove star-us-button export
yamcodes Nov 30, 2025
b77d981
feat: Add dark mode top gradient overlay, adjust background colors, a…
yamcodes Dec 1, 2025
67e005b
feat: add video demo component to the home page with StackBlitz integ…
yamcodes Dec 1, 2025
bad1638
feat: hide hero video on small screens
yamcodes Dec 1, 2025
346693e
style: Decrease dark mode overlay opacity on the home page.
yamcodes Dec 1, 2025
9be832e
feat: Implement smooth theme-based video transitions by rendering bot…
yamcodes Dec 1, 2025
5db21e5
feat: enhance home page layout by adjusting hero video positioning an…
yamcodes Dec 1, 2025
22a4c1e
style: Adjust home page button container width for responsiveness.
yamcodes Dec 1, 2025
299f1ab
[autofix.ci] apply automated fixes
autofix-ci[bot] Dec 1, 2025
ebf8bc4
style: Adjust home page top gradient overlay height and color.
yamcodes Dec 1, 2025
8d6ad8a
refactor: replace top gradient overlay div with SVG implementation
yamcodes Dec 1, 2025
1f0873f
style: Adjust hero video and home page content layout by updating mar…
yamcodes Dec 1, 2025
d6320df
style: adjust hero video's right margin on large screens.
yamcodes Dec 1, 2025
e216f08
style: enhance video demo button shadow with hover effects and transi…
yamcodes Dec 1, 2025
ab2de5a
test: Scope video/image element locator to the interactive demo button.
yamcodes Dec 1, 2025
e1d1e40
feat: add title to gradient overlay SVG element
yamcodes Dec 1, 2025
15af5b6
Merge branch 'main' into 471-update-www-hero-section-to-use-new-logo
yamcodes Dec 1, 2025
3b92537
fix: Pin next-themes dependency to exact version 0.4.6
yamcodes Dec 1, 2025
9646232
test(theme-switching): add Playwright tests for theme switching and h…
yamcodes Dec 1, 2025
8b185e1
a11y: improve SVG accessibility on home page and update TypeScript di…
yamcodes Dec 1, 2025
e5b846f
docs: Refine hero video update proposal and add accessibility attribu…
yamcodes Dec 1, 2025
359f796
fix: Replace `role="presentation"` with `tabIndex={-1}` on video elem…
yamcodes Dec 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 84 additions & 24 deletions apps/www/app/(home)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { Metadata } from "next";
import { Bricolage_Grotesque } from "next/font/google";
import { HeroVideo } from "~/components/hero-video";
import { SailButton, StarUsButton, VideoDemo } from "~/components/page";

const bricolageGrotesque = Bricolage_Grotesque({
Expand All @@ -14,33 +15,92 @@ export const metadata: Metadata = {

export default function HomePage() {
return (
<main className="flex flex-1 flex-col justify-center text-center px-4 sm:px-0">
<h1 className={`mb-4 ${bricolageGrotesque.className} mt-16`}>
<div className="text-6xl font-extrabold">
Better{" "}
<span className="decoration-[rgb(180,215,255)] decoration-wavy decoration-1 underline underline-offset-4">
typesafe
</span>{" "}
than sorry
</div>
<div className="text-2xl mt-4 text-gray-600 dark:text-gray-400">
Bring the power of{" "}
<a
href="https://arktype.io"
target="_blank"
rel="noopener noreferrer"
className="underline underline-offset-6 decoration-[1.5px] transition-underline duration-200 hover:decoration-[3px] focus:decoration-[3px] active:text-blue-400"
<main className="flex flex-1 flex-col items-center justify-center relative w-full overflow-hidden">
{/* Top gradient overlay for dark mode - SVG version */}
<svg
viewBox="0 0 1440 181"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="pointer-events-none absolute w-full top-0 left-0 h-[160px] z-10 opacity-100 text-blue-50 dark:text-[#011537]"
preserveAspectRatio="none"
aria-hidden="true"
role="presentation"
focusable="false"
>
<mask id="path-1-inside-1" fill="white">
<path d="M0 0H1440V181H0V0Z" />
</mask>
<path
d="M0 0H1440V181H0V0Z"
fill="url(#paint0_linear)"
fillOpacity="1"
/>
<path
d="M0 2H1440V-2H0V2Z"
fill="url(#paint1_linear)"
mask="url(#path-1-inside-1)"
/>
<defs>
<linearGradient
id="paint0_linear"
x1="720"
y1="0"
x2="720"
y2="181"
gradientUnits="userSpaceOnUse"
>
<stop stopColor="currentColor" />
<stop offset="1" stopColor="currentColor" stopOpacity="0" />
</linearGradient>
<linearGradient
id="paint1_linear"
x1="0"
y1="90.5"
x2="1440"
y2="90.5"
gradientUnits="userSpaceOnUse"
>
ArkType
</a>{" "}
to your environment variables <br /> and ship with confidence.
<stop stopColor="#60a5fa" stopOpacity="0" />
<stop offset="0.5" stopColor="#60a5fa" />
<stop offset="1" stopColor="#60a5fa" stopOpacity="0" />
</linearGradient>
</defs>
</svg>

<div className="flex flex-col lg:flex-row items-center justify-center px-4 sm:px-6 lg:px-8 max-w-7xl mx-auto w-full gap-8 lg:gap-16 lg:mt-20">
<div className="flex flex-col items-center lg:items-start text-center lg:text-left flex-1 relative z-20 lg:mt-12">
<h1 className={`mb-4 ${bricolageGrotesque.className} mt-16 lg:mt-0`}>
<div className="text-6xl font-extrabold">
Better{" "}
<span className="decoration-[rgb(180,215,255)] decoration-wavy decoration-1 underline underline-offset-4">
typesafe
</span>{" "}
than sorry
</div>
<div className="text-2xl mt-4 text-gray-600 dark:text-gray-400">
Bring the power of{" "}
<a
href="https://arktype.io"
target="_blank"
rel="noopener noreferrer"
className="underline underline-offset-6 decoration-[1.5px] transition-underline duration-200 hover:decoration-[3px] focus:decoration-[3px] active:text-blue-400"
>
ArkType
</a>{" "}
to your environment variables and ship with confidence.
</div>
</h1>
<div className="flex flex-col sm:flex-row justify-center lg:justify-start my-4 gap-4 sm:mb-6 mb-16 w-full sm:w-auto">
<SailButton />
<StarUsButton />
</div>
</div>
<div className="hidden md:flex flex-1 w-full justify-center lg:justify-end">
<HeroVideo />
</div>
</h1>
<div className="flex flex-col sm:flex-row justify-center my-4 gap-4 sm:mb-6 mb-16">
<SailButton />
<StarUsButton />
</div>
<div className="sm:mt-8 max-w-[1024px] mx-auto w-full">

<div className="sm:mt-8 max-w-[1024px] mx-auto w-full relative z-20 px-4">
<VideoDemo />
</div>
</main>
Expand Down
6 changes: 6 additions & 0 deletions apps/www/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ button[data-search-full] {
--color-fd-secondary: hsl(0, 0%, 0%);
--color-fd-accent: hsl(0, 0%, 0%);
}

.dark body,
.dark html {
background-color: var(--background);
background-image: none !important;
}
8 changes: 5 additions & 3 deletions apps/www/app/styles/theme/dark.css
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
.dark {
--background: hsl(220, 60%, 6%);
--background: #081021;
--foreground: hsl(0 0% 98%);
--card: hsl(240 10% 3.9%);
--card-foreground: hsl(0 0% 98%);
--popover: hsl(240 10% 3.9%);
--popover-foreground: hsl(0 0% 98%);
--primary: rgb(158, 203, 255);
--primary-foreground: rgb(10, 52, 93); /** can be rgb(3, 47, 98) */
--primary-foreground: rgb(10, 52, 93);
/** can be rgb(3, 47, 98) */
--secondary: color-mix(in srgb, var(--background) 80%, transparent);
--secondary-foreground: hsl(0 0% 98%);
--muted: hsl(240 3.7% 15.9%);
--muted-foreground: hsl(240 5% 70%); /* WCAG AA compliant: 8.88:1 contrast */
--muted-foreground: hsl(240 5% 70%);
/* WCAG AA compliant: 8.88:1 contrast */
--accent: hsl(240 3.7% 15.9%);
--accent-foreground: hsl(0 0% 98%);
--destructive: hsl(0 62.8% 30.6%);
Expand Down
46 changes: 46 additions & 0 deletions apps/www/components/hero-video.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
"use client";

import { useTheme } from "next-themes";
import { useEffect, useState } from "react";

export function HeroVideo() {
const { resolvedTheme } = useTheme();
const [mounted, setMounted] = useState(false);

useEffect(() => {
setMounted(true);
}, []);

if (!mounted) {
return <div className="w-full aspect-4/3" />;
}

return (
<div className="relative w-full max-w-[500px] mx-auto lg:ml-auto lg:-mr-22 lg:mt-8 aspect-4/3">
<video
src="/assets/3d-light.mp4"
autoPlay
loop
muted
playsInline
aria-hidden="true"
tabIndex={-1}
className={`absolute inset-0 w-full h-full object-contain ${
resolvedTheme === "dark" ? "opacity-0" : "opacity-100"
}`}
/>
<video
src="/assets/3d-dark.mp4"
autoPlay
loop
muted
playsInline
aria-hidden="true"
tabIndex={-1}
className={`absolute inset-0 w-full h-full object-contain ${
resolvedTheme === "dark" ? "opacity-100" : "opacity-0"
}`}
/>
</div>
);
}
Loading
Loading