This commit is contained in:
ZacharyZhang-NY committed 2026-04-07 20:18:47 -04:00
1 parent f5d4f8b705
commit 9779c4d1ca
24 files changed
+2782 -130

No files matched your search

+61 -70
View File
@@ -2,7 +2,6 @@
import { useEffect, useState } from "react";
import { motion } from "framer-motion";
import { AsciiBackground } from "./ascii-background";
import { platformDownloads, releaseVersion } from "./release-links.generated";
import { DOWNLOAD_COUNT_SEED, getTrackedDownloadHref } from "../lib/downloads";
@@ -34,81 +33,73 @@ export function DownloadSection() {
}, []);
return (
<section id="download" className="py-24 lg:py-40 px-4 sm:px-6 lg:px-8 relative overflow-hidden">
<motion.div
className="relative mx-auto max-w-5xl rounded-3xl p-14 lg:p-24 overflow-hidden"
style={{
background: "linear-gradient(135deg, var(--cta) 0%, color-mix(in srgb, var(--cta) 85%, #000) 100%)",
}}
initial={{ opacity: 0, scale: 0.92 }}
whileInView={{ opacity: 1, scale: 1 }}
viewport={{ once: true, margin: "-80px" }}
transition={{ duration: 0.7, ease: [0.16, 1, 0.3, 1] }}
>
<AsciiBackground cssVar="--text-on-cta" baseOpacity={0.1} speed={0.8} />
<div
className="absolute inset-0 pointer-events-none opacity-[0.03]"
aria-hidden="true"
style={{
backgroundImage:
"url(\"data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E\")",
backgroundRepeat: "repeat",
backgroundSize: "128px 128px",
}}
/>
<div
className="absolute inset-0 pointer-events-none"
aria-hidden="true"
style={{
background:
"radial-gradient(ellipse at top right, rgba(255,255,255,0.12) 0%, transparent 50%), radial-gradient(ellipse at bottom left, rgba(255,255,255,0.06) 0%, transparent 50%)",
}}
/>
<div className="relative z-10 flex flex-col items-center text-center">
<h2 className="font-serif italic text-[clamp(2rem,1.5rem+2.5vw,3.25rem)] tracking-[-0.01em] text-[var(--text-on-cta)] mb-6">
<section id="download" className="py-24 lg:py-40 px-4 sm:px-6 lg:px-8">
<div className="mx-auto max-w-6xl">
<motion.div
initial={{ opacity: 0, y: 30 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true, amount: 0.3 }}
transition={{ duration: 0.6, ease: [0.16, 1, 0.3, 1] }}
className="text-center mb-16 lg:mb-20"
>
<p className="font-mono text-xs font-medium uppercase tracking-[0.25em] text-[var(--accent)] mb-5">
Download
</p>
<h2 className="font-serif text-[clamp(2rem,1.5rem+2.5vw,3.25rem)] tracking-[-0.01em] text-[var(--text)]">
Install the Right Build for Your Machine
</h2>
<p className="text-[var(--text-on-cta-muted)] text-lg max-w-xl mx-auto mb-12 leading-relaxed">
Version {releaseVersion}.
</p>
<p className="text-[var(--text-on-cta-faint)] text-sm max-w-xl mx-auto mb-12 leading-relaxed -mt-8">
Downloads: {downloadCount.toLocaleString("en-US")}
<p className="text-[var(--muted)] text-lg mt-5 leading-relaxed">
Version {releaseVersion} · {downloadCount.toLocaleString("en-US")} downloads
</p>
</motion.div>
<div className="w-full mt-2 grid grid-cols-1 md:grid-cols-3 gap-6">
{platformDownloads.map((download, index) => (
<motion.div
key={download.id}
initial={{ opacity: 0, y: 24 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true, amount: 0.3 }}
transition={{ duration: 0.5, delay: 0.08 * index, ease: [0.16, 1, 0.3, 1] }}
className="rounded-2xl border border-white/10 bg-white/6 backdrop-blur-xl shadow-[inset_0_1px_0_rgba(255,255,255,0.08)] p-6 lg:p-7 text-left"
>
<p className="font-mono text-xs uppercase tracking-[0.25em] text-[var(--text-on-cta-faint)] mb-3">
{download.title}
</p>
<div className="space-y-2.5">
{download.assets.map((asset) => (
<a
key={asset.id}
href={getTrackedDownloadHref(asset.id)}
target="_blank"
rel="noopener noreferrer"
className="flex items-center rounded-xl border border-white/12 bg-black/10 px-4 py-3 text-sm text-[var(--text-on-cta)] transition-colors duration-200 hover:bg-black/18"
<div className="grid grid-cols-1 md:grid-cols-3 gap-6 lg:gap-8">
{platformDownloads.map((download, index) => (
<motion.div
key={download.id}
initial={{ opacity: 0, y: 24 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true, amount: 0.3 }}
transition={{ duration: 0.5, delay: 0.08 * index, ease: [0.16, 1, 0.3, 1] }}
className="rounded-[22px] border border-[var(--border)] bg-[var(--panel)] p-6 lg:p-7"
>
<p className="font-mono text-xs uppercase tracking-[0.25em] text-[var(--muted)] mb-4">
{download.title}
</p>
<p className="text-xs text-[var(--muted)] mb-4">{download.note}</p>
<div className="space-y-2.5">
{download.assets.map((asset) => (
<a
key={asset.id}
href={getTrackedDownloadHref(asset.id)}
target="_blank"
rel="noopener noreferrer"
className="flex items-center justify-between rounded-[16px] border border-[var(--border)] bg-[var(--panel-soft)] px-4 py-3 text-sm text-[var(--text)] transition-colors duration-200 hover:border-[var(--accent)] hover:text-[var(--accent)]"
>
<span className="font-semibold tracking-tight">{asset.label}</span>
<svg
width="16"
height="16"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
aria-hidden="true"
className="shrink-0 ml-2 opacity-40"
>
<span className="font-semibold tracking-tight">{asset.label}</span>
</a>
))}
</div>
</motion.div>
))}
</div>
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />
<polyline points="7 10 12 15 17 10" />
<line x1="12" y1="15" x2="12" y2="3" />
</svg>
</a>
))}
</div>
</motion.div>
))}
</div>
</motion.div>
</div>
</section>
);
}