diff --git a/src/components/Footer/index.tsx b/src/components/Footer/index.tsx index be17366..469c6a7 100644 --- a/src/components/Footer/index.tsx +++ b/src/components/Footer/index.tsx @@ -6,7 +6,9 @@ export default function Footer() { © {new Date().getFullYear()} Smartloop Inc. Made in San Francisco, CA
+ About Docs + Pricing Partners Terms Privacy diff --git a/src/components/GoldenGate/index.tsx b/src/components/GoldenGate/index.tsx new file mode 100644 index 0000000..f24a5d3 --- /dev/null +++ b/src/components/GoldenGate/index.tsx @@ -0,0 +1,146 @@ +import { type ReactNode } from 'react'; +import s from './styles.module.css'; + +// The Golden Gate as an inline illustration: a sunset in the light theme, a +// night with stars and deck lights in the dark one. Every colour is a --gg-* +// variable (styles.module.css) so both themes come from the same drawing. + +const DECK = 262; +const TOWERS = [360, 840]; +const TOP = 74; + +type Pt = [number, number]; +const quad = (a: Pt, c: Pt, b: Pt, t: number): Pt => [ + (1 - t) ** 2 * a[0] + 2 * t * (1 - t) * c[0] + t ** 2 * b[0], + (1 - t) ** 2 * a[1] + 2 * t * (1 - t) * c[1] + t ** 2 * b[1], +]; + +// The three cable spans, as quadratic curves: [start, control, end]. +const SPANS: [Pt, Pt, Pt][] = [ + [[TOWERS[0], TOP], [250, 255], [40, DECK]], + [[TOWERS[0], TOP], [600, 430], [TOWERS[1], TOP]], + [[TOWERS[1], TOP], [950, 255], [1160, DECK]], +]; + +// Vertical suspender ropes, hanging from the cable to the deck. +const suspenders: [number, number][] = SPANS.flatMap(([a, c, b], i) => { + const n = i === 1 ? 38 : 16; + const out: [number, number][] = []; + for (let k = 1; k < n; k++) { + const [x, y] = quad(a, c, b, k / n); + if (DECK - y > 4) out.push([x, y]); + } + return out; +}); + +const STARS: [number, number, number][] = [ + [80, 40, 1.2], [170, 95, 0.9], [260, 30, 1.4], [420, 52, 0.8], [520, 24, 1.1], [690, 60, 0.9], + [760, 26, 1.3], [1010, 44, 1], [1090, 120, 0.8], [1150, 36, 1.2], [300, 150, 0.7], [640, 140, 0.8], +]; + +function Tower({ x }: { x: number }): ReactNode { + const legW = 14; + const gap = 24; + const l = x - gap / 2 - legW; + const r = x + gap / 2; + const beams = [[TOP + 6, 10], [128, 9], [178, 8], [226, 8], [292, 8]]; + return ( + + {/* the stepped tops of each leg */} + + + + + {beams.map(([y, h]) => )} + + + + + ); +} + +export default function GoldenGate({ className = '' }: { className?: string }): ReactNode { + return ( +
+ + + + + + + + + + + + + + + + + + + + + + {/* sky, stars and the sun or moon */} + + + {STARS.map(([x, y, r]) => )} + + + + + {/* far hills: the Marin Headlands on the right, the city on the left */} + + + + + + + + + {/* the bay */} + + + + + + + + + {/* fog rolling in under the bridge */} + + + + + + {/* near shore on each side */} + + + + {/* the bridge: suspenders, cables, deck, towers */} + + {suspenders.map(([x, y]) => )} + + + {SPANS.map(([a, c, b]) => )} + + + + + + {TOWERS.map((x) => )} + + {Array.from({ length: 40 }, (_, i) => )} + + + {/* a drifting veil of fog in front */} + + + + +
San Francisco, CA
+
+ ); +} diff --git a/src/components/GoldenGate/styles.module.css b/src/components/GoldenGate/styles.module.css new file mode 100644 index 0000000..40cb650 --- /dev/null +++ b/src/components/GoldenGate/styles.module.css @@ -0,0 +1,101 @@ +/* Golden Gate illustration: a sunset in light, a night in dark. */ +.frame { + --gg-sky-1: #fde2ec; + --gg-sky-2: #fbd0c4; + --gg-sky-3: #f9c3a6; + --gg-sun: #fb9a6c; + --gg-water-1: #e9a7a0; + --gg-water-2: #b9c3d6; + --gg-hill-far: #c99aa6; + --gg-hill-near: #8d6a78; + --gg-city: #b58d9b; + --gg-bridge: #c0392b; + --gg-fog: rgba(255, 255, 255, 0.75); + --gg-glint: rgba(255, 255, 255, 0.7); + + position: relative; + margin: 0; + border-radius: 28px; + overflow: hidden; + border: 1px solid var(--sl-line); + box-shadow: 0 1px 2px rgba(10, 10, 20, 0.04), 0 30px 80px -24px rgba(10, 10, 20, 0.22); + background: var(--gg-sky-1); +} + +[data-theme='dark'] .frame { + --gg-sky-1: #07071a; + --gg-sky-2: #1a1033; + --gg-sky-3: #3a1838; + --gg-sun: #ec4899; + --gg-water-1: #1d1027; + --gg-water-2: #07070d; + --gg-hill-far: #1b1424; + --gg-hill-near: #0e0b14; + --gg-city: #241a30; + --gg-bridge: #a2352b; + --gg-fog: rgba(190, 170, 220, 0.16); + --gg-glint: rgba(236, 72, 153, 0.5); +} + +.svg { + display: block; + width: 100%; + height: auto; +} + +.bridge, +.bridge rect { fill: var(--gg-bridge); } +.truss { opacity: 0.55; } +.pier { fill: var(--gg-hill-near); } +.cable path { fill: none; stroke: var(--gg-bridge); stroke-width: 3.5; stroke-linecap: round; } +.ropes line { stroke: var(--gg-bridge); stroke-width: 1; opacity: 0.8; } +.hillFar { fill: var(--gg-hill-far); } +.hillNear { fill: var(--gg-hill-near); } +.city { fill: var(--gg-city); } +.fog { fill: var(--gg-fog); } +.glint rect { fill: var(--gg-glint); } + +/* Night-only details */ +.stars circle { fill: #fff; } +.stars, .moon, .lights, .beacon { opacity: 0; transition: opacity 0.4s; } +.moon { fill: #f4f1ff; } +.lights circle { fill: #fcd34d; } +.beacon { fill: #ff4d4d; } +[data-theme='dark'] .stars { opacity: 0.8; } +[data-theme='dark'] .moon { opacity: 0.95; } +[data-theme='dark'] .lights { opacity: 0.9; } +[data-theme='dark'] .beacon { opacity: 1; } +[data-theme='dark'] .sun { opacity: 0.35; } + +/* Fog drifts slowly; held still for reduced motion. */ +.fog { animation: gg-drift 26s ease-in-out infinite alternate; } +.fogFront { animation-duration: 34s; animation-direction: alternate-reverse; } + +@keyframes gg-drift { + from { transform: translateX(-40px); } + to { transform: translateX(40px); } +} + +@media (prefers-reduced-motion: reduce) { + .fog { animation: none; } +} + +.caption { + position: absolute; + left: 20px; + bottom: 16px; + padding: 5px 12px; + border-radius: 999px; + font-family: var(--sl-mono); + font-size: 0.64rem; + letter-spacing: 0.16em; + text-transform: uppercase; + color: #fff; + background: rgba(10, 10, 20, 0.35); + backdrop-filter: blur(6px); +} + +@media (max-width: 640px) { + .frame { border-radius: 18px; } + .caption { left: 12px; bottom: 10px; font-size: 0.56rem; } +} diff --git a/src/components/Header/index.tsx b/src/components/Header/index.tsx index 21ba4e1..7b8abda 100644 --- a/src/components/Header/index.tsx +++ b/src/components/Header/index.tsx @@ -1,6 +1,27 @@ import Link from '@docusaurus/Link'; import { useState, useEffect } from 'react'; +// A product's mark in the Products menu, matching the cards on the home page: +// Docent Studio's mark drawn in the site colors, Docent Code's prompt, gpushed's icon. +function ProductMark({ product }: { product: 'studio' | 'docent' | 'gpushed' }) { + if (product === 'studio') { + return ( + + ); + } + if (product === 'docent') { + return ; + } + return ; +} + +// One header on every page. Like anthropic.com, the toolbar is the company's +// (products, docs, about); pricing is linked from the footer. export default function Header() { const [isMenuOpen, setIsMenuOpen] = useState(false); const [theme, setTheme] = useState<'light' | 'dark'>('light'); @@ -118,29 +139,41 @@ export default function Header() {
diff --git a/src/components/HeroDrift/index.tsx b/src/components/HeroDrift/index.tsx index 7d9090a..57d740d 100644 --- a/src/components/HeroDrift/index.tsx +++ b/src/components/HeroDrift/index.tsx @@ -37,3 +37,14 @@ export default function HeroDrift(): ReactNode { ); } + +/** The same names as two full-width rows under the hero on narrower screens, + * where the side columns would sit on top of the headline. */ +export function HeroDriftRows(): ReactNode { + return ( +