Split the landing page into its own repo (collector/landing)
The extension repo is now extension-only: ext/ source + the release script (scripts/release.mjs) that bumps the version, rebuilds the zip into the landing repo's public/, and tags vX.Y.Z. The committed zip is gone — releases live in the landing repo and Gitea tags.
This commit is contained in:
19
Dockerfile
19
Dockerfile
@@ -1,19 +0,0 @@
|
|||||||
# syntax=docker/dockerfile:1
|
|
||||||
|
|
||||||
# ---- Build: install deps from the lockfile and produce dist/ ----
|
|
||||||
FROM node:22-alpine AS build
|
|
||||||
WORKDIR /app
|
|
||||||
COPY package.json package-lock.json ./
|
|
||||||
RUN npm ci --no-audit --no-fund
|
|
||||||
COPY index.html vite.config.js ./
|
|
||||||
COPY public ./public
|
|
||||||
COPY src ./src
|
|
||||||
RUN npm run build
|
|
||||||
|
|
||||||
# ---- Serve: static files on nginx, as a non-root user, port 8080 ----
|
|
||||||
FROM nginxinc/nginx-unprivileged:1.27-alpine
|
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
||||||
COPY --from=build /app/dist /usr/share/nginx/html
|
|
||||||
EXPOSE 8080
|
|
||||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
|
||||||
CMD wget -qO- http://127.0.0.1:8080/healthz || exit 1
|
|
||||||
21
README.md
21
README.md
@@ -1 +1,20 @@
|
|||||||
# ofsaver
|
# ofsaver — extension
|
||||||
|
|
||||||
|
Browser extension: personal OnlyFans downloader (DRM/Widevine + plain media).
|
||||||
|
The marketing/download site lives separately in `collector/landing`.
|
||||||
|
|
||||||
|
## Layout
|
||||||
|
|
||||||
|
- `ext/` — MV3 extension source. `ext/manifest.json` is the single source of
|
||||||
|
truth for the version; `ext/content.js` carries a matching `ofsaverV` marker.
|
||||||
|
- `scripts/release.mjs` — release flow: bumps the version, rebuilds
|
||||||
|
`ofsaver-extension.zip` into the landing repo's `public/`, commits, tags
|
||||||
|
`vX.Y.Z` and pushes both repos.
|
||||||
|
|
||||||
|
## Release
|
||||||
|
|
||||||
|
```sh
|
||||||
|
node scripts/release.mjs patch # or minor / major / none
|
||||||
|
```
|
||||||
|
|
||||||
|
Run from a clean tree on `main`.
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
services:
|
|
||||||
web:
|
|
||||||
build: .
|
|
||||||
image: ofsaver:latest
|
|
||||||
restart: unless-stopped
|
|
||||||
ports:
|
|
||||||
- "${PORT:-8080}:8080"
|
|
||||||
19
index.html
19
index.html
@@ -1,19 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
<title>ofsaver — OnlyFans downloader for Chrome</title>
|
|
||||||
<meta name="description" content="A personal OnlyFans downloader that lives in your browser. Download photos, videos and audio straight from posts and messages — including DRM-protected media, decrypted locally. No servers, no accounts." />
|
|
||||||
<link rel="icon" type="image/png" href="/favicon.png" />
|
|
||||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
|
||||||
<meta property="og:image" content="/og.png" />
|
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600&family=Geist+Mono:wght@400;500&display=swap" rel="stylesheet" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="root"></div>
|
|
||||||
<script type="module" src="/src/main.jsx"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
38
nginx.conf
38
nginx.conf
@@ -1,38 +0,0 @@
|
|||||||
server {
|
|
||||||
listen 8080;
|
|
||||||
server_name _;
|
|
||||||
root /usr/share/nginx/html;
|
|
||||||
index index.html;
|
|
||||||
|
|
||||||
server_tokens off;
|
|
||||||
add_header X-Content-Type-Options "nosniff" always;
|
|
||||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
||||||
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
||||||
|
|
||||||
gzip on;
|
|
||||||
gzip_comp_level 6;
|
|
||||||
gzip_min_length 1024;
|
|
||||||
gzip_types text/plain text/css application/javascript application/json image/svg+xml;
|
|
||||||
|
|
||||||
# Hashed build output never changes under the same name: cache it for a year.
|
|
||||||
location /_app/ {
|
|
||||||
try_files $uri =404;
|
|
||||||
add_header Cache-Control "public, max-age=31536000, immutable";
|
|
||||||
add_header X-Content-Type-Options "nosniff" always;
|
|
||||||
}
|
|
||||||
|
|
||||||
location = /healthz {
|
|
||||||
access_log off;
|
|
||||||
default_type text/plain;
|
|
||||||
return 200 "ok\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
# The page itself is always revalidated so a deploy shows up at once.
|
|
||||||
location / {
|
|
||||||
try_files $uri $uri/ /index.html;
|
|
||||||
add_header Cache-Control "no-cache";
|
|
||||||
add_header X-Content-Type-Options "nosniff" always;
|
|
||||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
||||||
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.6 KiB |
@@ -1,8 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256">
|
|
||||||
<rect width="256" height="256" rx="60" fill="#0a1824"/>
|
|
||||||
<g transform="translate(32 32) scale(8)">
|
|
||||||
<path d="M8.75 10.75V7.75a3.25 3.25 0 0 1 6.4-.8" fill="none" stroke="#ffffff" stroke-width="1.8" stroke-linecap="round"/>
|
|
||||||
<rect x="5.25" y="10.75" width="13.5" height="9.75" rx="2.6" fill="none" stroke="#ffffff" stroke-width="1.8"/>
|
|
||||||
<circle cx="12" cy="15.6" r="1.6" fill="#02aff2"/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 476 B |
@@ -1,5 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
||||||
<path d="M8.75 10.75V7.75a3.25 3.25 0 0 1 6.4-.8" fill="none" stroke="#ffffff" stroke-width="1.8" stroke-linecap="round"/>
|
|
||||||
<rect x="5.25" y="10.75" width="13.5" height="9.75" rx="2.6" fill="none" stroke="#ffffff" stroke-width="1.8"/>
|
|
||||||
<circle cx="12" cy="15.6" r="1.6" fill="#02aff2"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 359 B |
@@ -1,5 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
||||||
<path d="M8.75 10.75V7.75a3.25 3.25 0 0 1 6.4-.8" fill="none" stroke="#0b1620" stroke-width="1.8" stroke-linecap="round"/>
|
|
||||||
<rect x="5.25" y="10.75" width="13.5" height="9.75" rx="2.6" fill="none" stroke="#0b1620" stroke-width="1.8"/>
|
|
||||||
<circle cx="12" cy="15.6" r="1.6" fill="#02aff2"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 359 B |
Binary file not shown.
|
Before Width: | Height: | Size: 945 B |
Binary file not shown.
BIN
public/og.png
BIN
public/og.png
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB |
59
scripts/release.mjs
Normal file
59
scripts/release.mjs
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
// Release flow for the ofsaver extension:
|
||||||
|
// node scripts/release.mjs [patch|minor|major|none]
|
||||||
|
// Bumps the version (manifest.json is the source of truth, content.js's
|
||||||
|
// ofsaverV marker is kept in sync), rebuilds ofsaver-extension.zip into the
|
||||||
|
// landing repo's public/ (served by the site), then commits, tags vX.Y.Z and
|
||||||
|
// pushes both repos.
|
||||||
|
import { readFileSync, writeFileSync, existsSync, mkdirSync, cpSync, rmSync } from "node:fs";
|
||||||
|
import { execSync } from "node:child_process";
|
||||||
|
import path from "node:path";
|
||||||
|
import { fileURLToPath } from "node:url";
|
||||||
|
|
||||||
|
const root = path.dirname(path.dirname(fileURLToPath(import.meta.url)));
|
||||||
|
const ext = path.join(root, "ext");
|
||||||
|
const landing = path.resolve(root, "..", "landing");
|
||||||
|
const landingPublic = path.join(landing, "public");
|
||||||
|
|
||||||
|
const bump = process.argv[2] ?? "patch";
|
||||||
|
if (!["patch", "minor", "major", "none"].includes(bump)) {
|
||||||
|
console.error("usage: node scripts/release.mjs [patch|minor|major|none]");
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
const manifestPath = path.join(ext, "manifest.json");
|
||||||
|
const manifest = JSON.parse(readFileSync(manifestPath, "utf8"));
|
||||||
|
let [maj, min, pat] = manifest.version.split(".").map(Number);
|
||||||
|
if (bump === "patch") pat += 1;
|
||||||
|
else if (bump === "minor") { min += 1; pat = 0; }
|
||||||
|
else if (bump === "major") { maj += 1; min = 0; pat = 0; }
|
||||||
|
const version = `${maj}.${min}.${pat}`;
|
||||||
|
manifest.version = version;
|
||||||
|
writeFileSync(manifestPath, JSON.stringify(manifest, null, 2) + "\n");
|
||||||
|
|
||||||
|
const contentPath = path.join(ext, "content.js");
|
||||||
|
const content = readFileSync(contentPath, "utf8");
|
||||||
|
writeFileSync(contentPath, content.replace(/dataset\.ofsaverV = "[^"]+"/, `dataset.ofsaverV = "${version}"`));
|
||||||
|
|
||||||
|
// zip: ofsaver/ folder at the archive root (matches the site's install steps)
|
||||||
|
const staging = path.join(root, ".release-tmp");
|
||||||
|
rmSync(staging, { recursive: true, force: true });
|
||||||
|
mkdirSync(staging, { recursive: true });
|
||||||
|
cpSync(ext, path.join(staging, "ofsaver"), { recursive: true });
|
||||||
|
execSync(`find '${staging}' -name .DS_Store -delete`);
|
||||||
|
mkdirSync(landingPublic, { recursive: true });
|
||||||
|
execSync(`cd '${staging}' && zip -qr '${path.join(landingPublic, "ofsaver-extension.zip")}' ofsaver`);
|
||||||
|
rmSync(staging, { recursive: true, force: true });
|
||||||
|
|
||||||
|
const run = (cmd, cwd = root) => execSync(cmd, { cwd, stdio: "inherit" });
|
||||||
|
run("git add -A");
|
||||||
|
run(`git commit -m "v${version}\n\nCo-Authored-By: Claude Code <noreply@anthropic.com>" || true`);
|
||||||
|
run(`git tag v${version}`);
|
||||||
|
run("git push origin main");
|
||||||
|
run(`git push origin v${version}`);
|
||||||
|
if (existsSync(path.join(landing, ".git"))) {
|
||||||
|
run("git add -A", landing);
|
||||||
|
run(`git commit -m "extension v${version}\n\nCo-Authored-By: Claude Code <noreply@anthropic.com>" || true`, landing);
|
||||||
|
run("git push origin main", landing);
|
||||||
|
}
|
||||||
|
console.log(`released ${version}`);
|
||||||
26
src/App.jsx
26
src/App.jsx
@@ -1,26 +0,0 @@
|
|||||||
import { Nav, Hero, Platforms, FactBand, Compare, Mobile, Showcase, Features, Safety, Pricing, Reviews, Faq, Cta, Footer } from './components/Sections.jsx'
|
|
||||||
import { Install } from './components/Install.jsx'
|
|
||||||
|
|
||||||
export default function App() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Nav />
|
|
||||||
<main>
|
|
||||||
<Hero />
|
|
||||||
<Platforms />
|
|
||||||
<FactBand />
|
|
||||||
<Compare />
|
|
||||||
<Showcase />
|
|
||||||
<Features />
|
|
||||||
<Mobile />
|
|
||||||
<Safety />
|
|
||||||
<Pricing />
|
|
||||||
<Install />
|
|
||||||
<Reviews />
|
|
||||||
<Faq />
|
|
||||||
<Cta />
|
|
||||||
</main>
|
|
||||||
<Footer />
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
import { useEffect, useRef } from 'react'
|
|
||||||
import kernelSrc from '../hairline/kernel.js?raw'
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------
|
|
||||||
* Mounts a Hairline figure the way the package's bench does. The kernel and
|
|
||||||
* the figure stay byte for byte what the hairline tools build and check, so
|
|
||||||
* they are loaded as text and run here rather than edited into modules.
|
|
||||||
* --------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
let HL = null
|
|
||||||
let injected = false
|
|
||||||
const kernel = () => (HL ??= new Function(`${kernelSrc}\nreturn HL;`)())
|
|
||||||
|
|
||||||
function load(src) {
|
|
||||||
let figure = null
|
|
||||||
new Function('HL', 'hairline', src)(kernel(), (f) => { figure = f })
|
|
||||||
return figure
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `value` is the figure's own number (its slider), defaulting to the middle
|
|
||||||
* of its range. `zone` is a selector for an ancestor whose pointer moves are passed on to
|
|
||||||
* the figure, so it can answer a pointer that is still on its way.
|
|
||||||
*/
|
|
||||||
export function HairlineFigure({ src, zone, value, className = '' }) {
|
|
||||||
const stageRef = useRef(null)
|
|
||||||
const readRef = useRef(null)
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const stage = stageRef.current
|
|
||||||
const fig = load(src)
|
|
||||||
const hl = kernel()
|
|
||||||
if (!injected) { hl.inject(document); injected = true }
|
|
||||||
stage.setAttribute('data-hairline', fig.name)
|
|
||||||
stage.setAttribute('aria-label', fig.means)
|
|
||||||
const svg = hl.mk('svg', { viewBox: '0 0 400 320', 'aria-hidden': 'true' }, stage)
|
|
||||||
const read = { set textContent(v) { if (readRef.current) readRef.current.textContent = v ?? '' } }
|
|
||||||
const handle = fig.mount({ stage, svg, read }, value ?? fig.range[1])
|
|
||||||
|
|
||||||
const area = zone ? stage.closest(zone) : null
|
|
||||||
const pass = (type) => (e) => {
|
|
||||||
if (!e.isTrusted || stage.contains(e.target)) return
|
|
||||||
stage.dispatchEvent(new PointerEvent(type, { pointerType: e.pointerType, pointerId: e.pointerId, clientX: e.clientX, clientY: e.clientY }))
|
|
||||||
}
|
|
||||||
const onMove = pass('pointermove'), onLeave = pass('pointerleave')
|
|
||||||
area?.addEventListener('pointermove', onMove)
|
|
||||||
area?.addEventListener('pointerleave', onLeave)
|
|
||||||
|
|
||||||
return () => {
|
|
||||||
area?.removeEventListener('pointermove', onMove)
|
|
||||||
area?.removeEventListener('pointerleave', onLeave)
|
|
||||||
handle.destroy()
|
|
||||||
svg.remove()
|
|
||||||
}
|
|
||||||
}, [src, zone, value])
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className={`hairline ${className}`}>
|
|
||||||
<div ref={stageRef} className="hairline__stage" role="img" />
|
|
||||||
<span ref={readRef} className="hairline__read mono" aria-hidden="true" />
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
@@ -1,94 +0,0 @@
|
|||||||
// Line icons in the lucide style: 24 grid, 1.5 stroke, currentColor.
|
|
||||||
function Line({ size = 16, children, ...rest }) {
|
|
||||||
return (
|
|
||||||
<svg
|
|
||||||
width={size}
|
|
||||||
height={size}
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
strokeWidth="1.5"
|
|
||||||
strokeLinecap="round"
|
|
||||||
strokeLinejoin="round"
|
|
||||||
aria-hidden="true"
|
|
||||||
{...rest}
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</svg>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export const DownloadIcon = (p) => (
|
|
||||||
<Line {...p}><path d="M12 15V3" /><path d="m7 10 5 5 5-5" /><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /></Line>
|
|
||||||
)
|
|
||||||
|
|
||||||
export const LockIcon = (p) => (
|
|
||||||
<Line {...p}><rect x="3" y="11" width="18" height="11" rx="2" /><path d="M7 11V7a5 5 0 0 1 10 0v4" /></Line>
|
|
||||||
)
|
|
||||||
|
|
||||||
export const LayersIcon = (p) => (
|
|
||||||
<Line {...p}>
|
|
||||||
<path d="m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z" />
|
|
||||||
<path d="m2 12 9.17 4.17a2 2 0 0 0 1.66 0L22 12" />
|
|
||||||
<path d="m2 17 9.17 4.17a2 2 0 0 0 1.66 0L22 17" />
|
|
||||||
</Line>
|
|
||||||
)
|
|
||||||
|
|
||||||
export const CheckIcon = (p) => (
|
|
||||||
<Line {...p}><path d="M20 6 9 17l-5-5" /></Line>
|
|
||||||
)
|
|
||||||
|
|
||||||
export const HeartIcon = (p) => (
|
|
||||||
<Line {...p}><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z" /></Line>
|
|
||||||
)
|
|
||||||
|
|
||||||
export const MessageIcon = (p) => (
|
|
||||||
<Line {...p}><path d="M7.9 20A9 9 0 1 0 4 16.1L2 22Z" /></Line>
|
|
||||||
)
|
|
||||||
|
|
||||||
export const ChevronDownIcon = (p) => (
|
|
||||||
<Line {...p}><path d="m6 9 6 6 6-6" /></Line>
|
|
||||||
)
|
|
||||||
|
|
||||||
export const FolderIcon = (p) => (
|
|
||||||
<Line {...p}><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" /></Line>
|
|
||||||
)
|
|
||||||
|
|
||||||
export const FileIcon = (p) => (
|
|
||||||
<Line {...p}><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" /><path d="M14 2v4a2 2 0 0 0 2 2h4" /></Line>
|
|
||||||
)
|
|
||||||
|
|
||||||
export const XIcon = (p) => (
|
|
||||||
<Line {...p}><path d="M18 6 6 18" /><path d="m6 6 12 12" /></Line>
|
|
||||||
)
|
|
||||||
|
|
||||||
export const GlobeIcon = (p) => (
|
|
||||||
<Line {...p}><circle cx="12" cy="12" r="10" /><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" /><path d="M2 12h20" /></Line>
|
|
||||||
)
|
|
||||||
|
|
||||||
export const CpuIcon = (p) => (
|
|
||||||
<Line {...p}><rect x="4" y="4" width="16" height="16" rx="2" /><rect x="9" y="9" width="6" height="6" rx="1" /><path d="M15 2v2M15 20v2M2 15h2M2 9h2M20 15h2M20 9h2M9 2v2M9 20v2" /></Line>
|
|
||||||
)
|
|
||||||
|
|
||||||
export const DriveIcon = (p) => (
|
|
||||||
<Line {...p}><path d="M22 12H2" /><path d="M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" /><path d="M6 16h.01M10 16h.01" /></Line>
|
|
||||||
)
|
|
||||||
|
|
||||||
export const ServerIcon = (p) => (
|
|
||||||
<Line {...p}><rect x="2" y="2" width="20" height="8" rx="2" /><rect x="2" y="14" width="20" height="8" rx="2" /><path d="M6 6h.01M6 18h.01" /></Line>
|
|
||||||
)
|
|
||||||
|
|
||||||
export const PuzzleIcon = (p) => (
|
|
||||||
<Line {...p}><path d="M15.39 4.39a1 1 0 0 0 1.68-.47 2.5 2.5 0 1 1 3.01 3.01 1 1 0 0 0-.47 1.68l1.69 1.69a2.4 2.4 0 0 1 0 3.4l-1.61 1.61a.98.98 0 0 1-.84.28c-.47-.07-.8-.48-.97-.92a2.5 2.5 0 1 0-3.21 3.21c.44.17.85.5.92.97a.98.98 0 0 1-.28.84l-1.61 1.61a2.4 2.4 0 0 1-3.4 0L8.3 19.61a1 1 0 0 0-1.68.47 2.5 2.5 0 1 1-3.01-3.01 1 1 0 0 0 .47-1.68L2.39 13.7a2.4 2.4 0 0 1 0-3.4l1.61-1.61a.98.98 0 0 1 .84-.28c.47.07.8.48.97.92a2.5 2.5 0 1 0 3.21-3.21c-.44-.17-.85-.5-.92-.97a.98.98 0 0 1 .28-.84l1.61-1.61a2.4 2.4 0 0 1 3.4 0z" /></Line>
|
|
||||||
)
|
|
||||||
|
|
||||||
export const PhoneIcon = (p) => (
|
|
||||||
<Line {...p}><rect x="6" y="2" width="12" height="20" rx="2.5" /><path d="M11 18h2" /></Line>
|
|
||||||
)
|
|
||||||
|
|
||||||
export const PlusMinus = ({ open }) => (
|
|
||||||
<svg width="16" height="16" viewBox="0 0 16 16" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" aria-hidden="true">
|
|
||||||
<path d="M2.5 8h11" />
|
|
||||||
<path d="M8 2.5v11" className={`pm-v ${open ? 'is-open' : ''}`} />
|
|
||||||
</svg>
|
|
||||||
)
|
|
||||||
@@ -1,150 +0,0 @@
|
|||||||
import { Reveal, AddToChrome, SectionHeading } from './Shared.jsx'
|
|
||||||
import { useLoop, Cursor } from './Scenes.jsx'
|
|
||||||
import { CheckIcon, DownloadIcon, FolderIcon, PuzzleIcon } from './Icons.jsx'
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------
|
|
||||||
* Install: three steps, each with a small looping illustration built in
|
|
||||||
* code. Reduced motion holds each scene on its finished frame.
|
|
||||||
* --------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
const ZipIcon = ({ size = 16 }) => (
|
|
||||||
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
|
|
||||||
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" />
|
|
||||||
<path d="M14 2v6h6" />
|
|
||||||
<path d="M10 6h1M10 9h1M10 12h1M10 15h1" />
|
|
||||||
</svg>
|
|
||||||
)
|
|
||||||
|
|
||||||
function Window({ url, children }) {
|
|
||||||
return (
|
|
||||||
<div className="iw">
|
|
||||||
<div className="iw__bar"><i /><i /><i /><span className="mono">{url}</span></div>
|
|
||||||
<div className="iw__body">{children}</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 1. Download the zip, then unzip it into an ofsaver folder */
|
|
||||||
const DL_STEPS = [['idle', 700], ['saving', 1600], ['zip', 1000], ['unzipped', 2600]]
|
|
||||||
|
|
||||||
function DownloadScene() {
|
|
||||||
const [ref, phase] = useLoop(DL_STEPS, 'unzipped')
|
|
||||||
const at = DL_STEPS.findIndex(([n]) => n === phase)
|
|
||||||
const done = at >= 2
|
|
||||||
return (
|
|
||||||
<div ref={ref} className="scene">
|
|
||||||
<Window url="ofsaver.app">
|
|
||||||
<div className={`dl__btn ${phase === 'idle' ? '' : 'is-pressed'}`}>
|
|
||||||
<DownloadIcon size={14} /> Add to Chrome <span className="kpill__meta">Free</span>
|
|
||||||
</div>
|
|
||||||
<div className={`dl__shelf ${at >= 1 ? 'is-in' : ''}`}>
|
|
||||||
<div className="dl__row">
|
|
||||||
<span className="dl__icon"><ZipIcon /></span>
|
|
||||||
<span className="dl__name">
|
|
||||||
<strong>ofsaver-extension.zip</strong>
|
|
||||||
<span className="mono">{done ? 'Done · 1.4 MB' : 'Downloading…'}</span>
|
|
||||||
</span>
|
|
||||||
<span className={`dl__track ${phase === 'saving' ? 'is-running' : ''} ${done ? 'is-full' : ''}`}><span /></span>
|
|
||||||
</div>
|
|
||||||
<div className={`dl__row dl__row--folder ${phase === 'unzipped' ? 'is-in' : ''}`}>
|
|
||||||
<span className="dl__icon dl__icon--folder"><FolderIcon /></span>
|
|
||||||
<span className="dl__name">
|
|
||||||
<strong>ofsaver</strong>
|
|
||||||
<span className="mono">Unzipped, keep this folder</span>
|
|
||||||
</span>
|
|
||||||
<CheckIcon size={16} className="dl__ok" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</Window>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 2. Turn on Developer mode in chrome://extensions */
|
|
||||||
const DEV_STEPS = [['idle', 900], ['aim', 700], ['press', 300], ['on', 2800]]
|
|
||||||
|
|
||||||
function DevModeScene() {
|
|
||||||
const [ref, phase] = useLoop(DEV_STEPS, 'on')
|
|
||||||
const on = phase === 'on'
|
|
||||||
return (
|
|
||||||
<div ref={ref} className="scene">
|
|
||||||
<Window url="chrome://extensions">
|
|
||||||
<div className="ext__head">
|
|
||||||
<span className="ext__title"><PuzzleIcon size={16} /> Extensions</span>
|
|
||||||
<span className="ext__dev">
|
|
||||||
Developer mode
|
|
||||||
<span className={`toggle ${on ? 'is-on' : ''}`}><span /></span>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div className={`ext__tools ${on ? 'is-in' : ''}`}>
|
|
||||||
<span className="ext__tool">Load unpacked</span>
|
|
||||||
<span className="ext__tool">Pack extension</span>
|
|
||||||
<span className="ext__tool">Update</span>
|
|
||||||
</div>
|
|
||||||
<div className="ext__ghost"><span /><span /></div>
|
|
||||||
<Cursor className={`dev__cursor is-${phase}`} />
|
|
||||||
</Window>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 3. Drag the ofsaver folder onto the page */
|
|
||||||
const DROP_STEPS = [['idle', 800], ['lift', 500], ['drag', 1100], ['drop', 500], ['installed', 2800]]
|
|
||||||
|
|
||||||
function DropScene() {
|
|
||||||
const [ref, phase] = useLoop(DROP_STEPS, 'installed')
|
|
||||||
const installed = phase === 'installed'
|
|
||||||
return (
|
|
||||||
<div ref={ref} className="scene">
|
|
||||||
<Window url="chrome://extensions">
|
|
||||||
<div className={`drop__zone ${phase === 'drag' || phase === 'drop' ? 'is-hot' : ''} ${installed ? 'is-gone' : ''}`}>
|
|
||||||
<span>Drop to install</span>
|
|
||||||
</div>
|
|
||||||
<div className={`ext__card ${installed ? 'is-in' : ''}`}>
|
|
||||||
<img src="/assets/app-icon.svg" alt="" width="32" height="32" />
|
|
||||||
<span className="ext__card-name">
|
|
||||||
<strong>ofsaver <span className="mono">1.0.0</span></strong>
|
|
||||||
<span>Saves posts and messages</span>
|
|
||||||
</span>
|
|
||||||
<span className="toggle is-on"><span /></span>
|
|
||||||
</div>
|
|
||||||
<div className={`drag__chip is-${phase}`} aria-hidden="true">
|
|
||||||
<FolderIcon size={16} /> ofsaver
|
|
||||||
<Cursor className="drag__cursor" />
|
|
||||||
</div>
|
|
||||||
</Window>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
const STEPS = [
|
|
||||||
{ title: 'Download and unzip', body: 'Click Add to Chrome to get ofsaver-extension.zip, then unzip it. Keep the ofsaver folder somewhere it will stay.', Scene: DownloadScene },
|
|
||||||
{ title: 'Turn on Developer mode', body: 'Open chrome://extensions and flip the Developer mode switch in the top right corner.', Scene: DevModeScene },
|
|
||||||
{ title: 'Drag the folder in', body: 'Drop the ofsaver folder onto the extensions page. That is it, the Download pill shows up on your next visit.', Scene: DropScene },
|
|
||||||
]
|
|
||||||
|
|
||||||
export function Install() {
|
|
||||||
return (
|
|
||||||
<section className="install container" id="install">
|
|
||||||
<SectionHeading eyebrow="Install" muted="Three steps" strong="about a minute" />
|
|
||||||
<ol className="install__grid">
|
|
||||||
{STEPS.map(({ title, body, Scene }, i) => (
|
|
||||||
<Reveal as="li" key={title} delay={i * 60} className="install__step">
|
|
||||||
<div className="install__media"><Scene /></div>
|
|
||||||
<div className="install__copy">
|
|
||||||
<span className="install__n mono">0{i + 1}</span>
|
|
||||||
<h3>{title}</h3>
|
|
||||||
<p>{body}</p>
|
|
||||||
</div>
|
|
||||||
</Reveal>
|
|
||||||
))}
|
|
||||||
</ol>
|
|
||||||
<Reveal className="install__foot">
|
|
||||||
<AddToChrome />
|
|
||||||
<p className="install__note">
|
|
||||||
Works in Chrome, Brave and Arc. If dropping does nothing, click <strong>Load unpacked</strong> and pick the ofsaver folder.
|
|
||||||
</p>
|
|
||||||
</Reveal>
|
|
||||||
</section>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
@@ -1,319 +0,0 @@
|
|||||||
import { useEffect, useRef, useState } from 'react'
|
|
||||||
import { DownloadIcon, CheckIcon, LockIcon, FolderIcon, FileIcon, HeartIcon, MessageIcon } from './Icons.jsx'
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------
|
|
||||||
* Product scenes: small loops of ofsaver's real UI, built in code. Each runs
|
|
||||||
* only while on screen, and holds one representative still frame for people
|
|
||||||
* who prefer reduced motion.
|
|
||||||
* --------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
const reduced = () => matchMedia('(prefers-reduced-motion: reduce)').matches
|
|
||||||
|
|
||||||
/** Cycles through [name, ms] steps while the element is visible. */
|
|
||||||
export function useLoop(steps, still) {
|
|
||||||
const ref = useRef(null)
|
|
||||||
const [i, setI] = useState(-1)
|
|
||||||
const [visible, setVisible] = useState(false)
|
|
||||||
useEffect(() => {
|
|
||||||
const io = new IntersectionObserver(([e]) => setVisible(e.isIntersecting), { threshold: 0.35 })
|
|
||||||
io.observe(ref.current)
|
|
||||||
return () => io.disconnect()
|
|
||||||
}, [])
|
|
||||||
useEffect(() => {
|
|
||||||
if (!visible || reduced()) return
|
|
||||||
let k = 0, t
|
|
||||||
const next = () => {
|
|
||||||
setI(k)
|
|
||||||
t = setTimeout(next, steps[k][1])
|
|
||||||
k = (k + 1) % steps.length
|
|
||||||
}
|
|
||||||
t = setTimeout(next, 300)
|
|
||||||
return () => clearTimeout(t)
|
|
||||||
}, [visible])
|
|
||||||
const name = i < 0 ? still : steps[i][0]
|
|
||||||
return [ref, name]
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Counts from 0 to `to` over `ms` while `on`; snaps to `to` when not animating. */
|
|
||||||
function useCount(to, ms, on, rest = to) {
|
|
||||||
const [v, setV] = useState(rest)
|
|
||||||
useEffect(() => {
|
|
||||||
if (!on) { setV(rest); return }
|
|
||||||
let raf
|
|
||||||
const t0 = performance.now()
|
|
||||||
const tick = (now) => {
|
|
||||||
const k = Math.min(1, (now - t0) / ms)
|
|
||||||
setV(Math.round(to * (1 - Math.pow(1 - k, 2))))
|
|
||||||
if (k < 1) raf = requestAnimationFrame(tick)
|
|
||||||
}
|
|
||||||
setV(0)
|
|
||||||
raf = requestAnimationFrame(tick)
|
|
||||||
return () => cancelAnimationFrame(raf)
|
|
||||||
}, [on, to, ms, rest])
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
|
|
||||||
export const Cursor = ({ className = '', style }) => (
|
|
||||||
<svg style={style} className={`cursor ${className}`} width="18" height="18" viewBox="0 0 24 24" aria-hidden="true">
|
|
||||||
<path d="M4 2.5 19.5 11l-6.6 1.9L9.6 19.5z" fill="#0b1620" stroke="#fff" strokeWidth="1.5" strokeLinejoin="round" />
|
|
||||||
</svg>
|
|
||||||
)
|
|
||||||
|
|
||||||
const Ring = ({ pct }) => (
|
|
||||||
<svg className="ring" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true">
|
|
||||||
<circle cx="8" cy="8" r="6" pathLength="100" className="ring__track" />
|
|
||||||
<circle cx="8" cy="8" r="6" pathLength="100" className="ring__fill" style={{ strokeDashoffset: 100 - pct }} />
|
|
||||||
</svg>
|
|
||||||
)
|
|
||||||
|
|
||||||
const TipIcon = (p) => (
|
|
||||||
<svg width={p.size || 18} height={p.size || 18} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" aria-hidden="true">
|
|
||||||
<circle cx="12" cy="12" r="9" /><path d="M15 9.5c-.5-1-1.6-1.5-3-1.5-1.7 0-3 .8-3 2s1.3 1.7 3 2 3 .9 3 2.1-1.3 1.9-3 1.9c-1.4 0-2.6-.6-3-1.6M12 6.5v1.5m0 8v1.5" />
|
|
||||||
</svg>
|
|
||||||
)
|
|
||||||
|
|
||||||
/* Warm stand-ins for photos: each is a soft light falling on a coloured ground. */
|
|
||||||
const SHOTS = [
|
|
||||||
['#e8c3a5', '#9c6a52'], ['#cdd5d0', '#71857e'], ['#e6d5bd', '#b08c66'], ['#d9c4cb', '#8f7480'],
|
|
||||||
['#c9b6a6', '#6b5446'], ['#dfe0d6', '#9a9c84'], ['#e9cfb8', '#c08a67'], ['#c8ccd6', '#727a8f'],
|
|
||||||
['#d7bfa9', '#86624f'], ['#e3d9cf', '#a3907c'], ['#cfc2b3', '#7c6a5a'], ['#e5c8c0', '#a8736a'],
|
|
||||||
]
|
|
||||||
const shot = (k) => ({ background: `radial-gradient(120% 90% at 70% 20%, ${SHOTS[k % 12][0]}, ${SHOTS[k % 12][1]})` })
|
|
||||||
|
|
||||||
/* ======================= Feature: right in the toolbar ==================== */
|
|
||||||
const TOOLBAR = [['idle', 1100], ['aim', 700], ['press', 250], ['saving', 2100], ['saved', 2300]]
|
|
||||||
|
|
||||||
export function ToolbarScene() {
|
|
||||||
const [ref, phase] = useLoop(TOOLBAR, 'saved')
|
|
||||||
const pct = useCount(100, 1900, phase === 'saving', 100)
|
|
||||||
const saved = phase === 'saved'
|
|
||||||
const busy = phase === 'saving'
|
|
||||||
return (
|
|
||||||
<div ref={ref} className="scene tb" aria-label="A post's action bar with ofsaver's Download pill saving a video">
|
|
||||||
<div className="tb__post">
|
|
||||||
<div className="tb__media" style={shot(0)}><span className="mono tb__dur">04:12</span></div>
|
|
||||||
<div className="tb__bar">
|
|
||||||
<span className="tb__icons"><HeartIcon size={18} /><MessageIcon size={18} /><TipIcon /></span>
|
|
||||||
<span className={`kpill ${saved ? 'kpill--saved' : ''} ${phase === 'press' ? 'is-pressed' : ''}`}>
|
|
||||||
{saved ? <CheckIcon size={15} /> : busy ? <Ring pct={pct} /> : <DownloadIcon size={15} />}
|
|
||||||
<span className="kpill__label">{saved ? 'Saved' : busy ? `Saving ${pct}%` : 'Download'}</span>
|
|
||||||
<span className="mono kpill__meta">{saved ? 'rooftop.mp4' : '412 MB'}</span>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<Cursor className={`tb__cursor is-${phase}`} />
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ========================= Feature: pick your quality ===================== */
|
|
||||||
const QUALITIES = [
|
|
||||||
{ name: 'Source', res: '1080p', mb: 412 },
|
|
||||||
{ name: '720p', res: '720p', mb: 188 },
|
|
||||||
{ name: 'Preview', res: '480p', mb: 64 },
|
|
||||||
]
|
|
||||||
const QUALITY = [['q0', 1600], ['q1', 1600], ['q2', 1600], ['q1', 1200]]
|
|
||||||
|
|
||||||
export function QualityScene() {
|
|
||||||
const [ref, phase] = useLoop(QUALITY, 'q1')
|
|
||||||
const at = Number(phase.slice(1))
|
|
||||||
return (
|
|
||||||
<div ref={ref} className="scene qs" aria-label="The quality menu, with each option's file size drawn to scale">
|
|
||||||
<div className="qs__menu">
|
|
||||||
<div className="qs__label">Quality <span className="mono">rooftop · 04:12</span></div>
|
|
||||||
{QUALITIES.map((q, i) => (
|
|
||||||
<div key={q.name} className={`qs__row ${i === at ? 'is-active' : ''}`}>
|
|
||||||
<span className="qs__name">{q.name}</span>
|
|
||||||
<span className="qs__track"><span style={{ transform: `scaleX(${q.mb / 412})` }} /></span>
|
|
||||||
<span className="mono qs__size">{q.mb} MB</span>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
<div className="qs__out mono">
|
|
||||||
<FileIcon size={14} />
|
|
||||||
<span key={at} className="qs__file">rooftop_{QUALITIES[at].res}.mp4</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<Cursor className="qs__cursor" style={{ transform: `translateY(${at * 44}px)` }} />
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ======================= Feature: whole profiles in one go ================ */
|
|
||||||
const GRID = Array.from({ length: 12 }, (_, k) => ({
|
|
||||||
k, video: [1, 4, 6, 11].includes(k), locked: [4, 9].includes(k), order: (k % 4) + Math.floor(k / 4),
|
|
||||||
}))
|
|
||||||
const PROFILE = [['idle', 1200], ['press', 300], ['saving', 2600], ['done', 2400]]
|
|
||||||
|
|
||||||
export function ProfileScene() {
|
|
||||||
const [ref, phase] = useLoop(PROFILE, 'done')
|
|
||||||
const saving = phase === 'saving'
|
|
||||||
const n = useCount(12, 2300, saving, phase === 'done' ? 12 : 0)
|
|
||||||
const doneCount = phase === 'done' ? 12 : n
|
|
||||||
return (
|
|
||||||
<div ref={ref} className="scene pf" aria-label="A creator's media grid being saved tile by tile">
|
|
||||||
<div className="pf__head">
|
|
||||||
<span className="pf__avatar" />
|
|
||||||
<span className="pf__who"><strong>Mira Lane</strong><span className="mono">1,284 posts</span></span>
|
|
||||||
<span className={`kbtn ${phase === 'press' ? 'is-pressed' : ''} ${phase === 'done' ? 'kbtn--done' : ''}`}>
|
|
||||||
{phase === 'done' ? <CheckIcon size={14} /> : <DownloadIcon size={14} />}
|
|
||||||
<span className="mono">{phase === 'idle' || phase === 'press' ? 'Download all' : phase === 'done' ? '12 saved' : `${doneCount} of 12`}</span>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div className="pf__grid">
|
|
||||||
{GRID.map((t) => {
|
|
||||||
const isSaved = phase === 'done' || (saving && t.order < (doneCount / 12) * 7)
|
|
||||||
return (
|
|
||||||
<div key={t.k} className={`pf__tile ${isSaved ? 'is-saved' : ''}`} style={shot(t.k + 3)}>
|
|
||||||
{t.video && <span className="mono pf__dur">{['0:48', '12:04', '3:31', '1:19'][[1, 4, 6, 11].indexOf(t.k)]}</span>}
|
|
||||||
{t.locked && <span className="pf__lock"><LockIcon size={12} /></span>}
|
|
||||||
<span className="pf__check"><CheckIcon size={12} /></span>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ====================== Feature: saved, and it stays marked =============== */
|
|
||||||
const TOKENS = [
|
|
||||||
{ t: '{creator}', v: 'Mira Lane' }, { sep: '/' },
|
|
||||||
{ t: '{type}', v: 'Videos' }, { sep: '/' },
|
|
||||||
{ t: '{date}', v: '2026-11-29' }, { sep: '_' },
|
|
||||||
{ t: '{name}', v: 'rooftop.mp4' },
|
|
||||||
]
|
|
||||||
const NAMING = [['tokens', 1200], ['r1', 450], ['r2', 450], ['r3', 450], ['r4', 700], ['file', 2600]]
|
|
||||||
const FILES = [
|
|
||||||
['2026-11-14_studio-tour.mp4', '286 MB'],
|
|
||||||
['2026-10-30_q-and-a.mp4', '1.2 GB'],
|
|
||||||
['2026-10-12_morning.mp4', '94 MB'],
|
|
||||||
]
|
|
||||||
|
|
||||||
export function NamingScene() {
|
|
||||||
const [ref, phase] = useLoop(NAMING, 'file')
|
|
||||||
const step = phase === 'tokens' ? 0 : phase === 'file' ? 4 : Number(phase.slice(1))
|
|
||||||
let tokenIndex = 0
|
|
||||||
return (
|
|
||||||
<div ref={ref} className="scene nm" aria-label="Naming tokens resolving into a file path, and the file landing in its folder">
|
|
||||||
<div className="nm__path mono">
|
|
||||||
{TOKENS.map((x, i) => {
|
|
||||||
if (x.sep) return <span key={i} className="nm__sep">{x.sep}</span>
|
|
||||||
tokenIndex += 1
|
|
||||||
const on = step >= tokenIndex
|
|
||||||
return (
|
|
||||||
<span key={i} className={`nm__tok ${on ? 'is-on' : ''}`}>
|
|
||||||
<span className="nm__from">{x.t}</span>
|
|
||||||
<span className="nm__to">{x.v}</span>
|
|
||||||
</span>
|
|
||||||
)
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
<div className="nm__list">
|
|
||||||
<div className="nm__crumb"><FolderIcon size={14} /> <span>Mira Lane</span><span className="nm__slash">/</span><span>Videos</span></div>
|
|
||||||
<div className={`nm__row nm__row--new ${phase === 'file' ? 'is-in' : ''}`}>
|
|
||||||
<FileIcon size={14} /><span>2026-11-29_rooftop.mp4</span><span className="mono">412 MB</span><CheckIcon size={14} />
|
|
||||||
</div>
|
|
||||||
{FILES.map(([f, s]) => (
|
|
||||||
<div key={f} className="nm__row"><FileIcon size={14} /><span>{f}</span><span className="mono">{s}</span><CheckIcon size={14} /></div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ============================ Showcase scenes ============================= */
|
|
||||||
const CHAT = [['idle', 1200], ['press', 300], ['saving', 2000], ['done', 2200]]
|
|
||||||
|
|
||||||
function ChatScene() {
|
|
||||||
const [ref, phase] = useLoop(CHAT, 'done')
|
|
||||||
const n = useCount(3, 1700, phase === 'saving', phase === 'done' ? 3 : 0)
|
|
||||||
const done = phase === 'done'
|
|
||||||
return (
|
|
||||||
<div ref={ref} className="scene ch">
|
|
||||||
<div className="ch__head"><span className="pf__avatar" /><strong>Mira Lane</strong><span className="ch__online" /> <span className="mono ch__meta">online</span></div>
|
|
||||||
<div className="ch__body">
|
|
||||||
<div className="ch__bubble">New set from the rooftop shoot, three of my favourites</div>
|
|
||||||
<div className="ch__media">
|
|
||||||
<div className="ch__tiles">
|
|
||||||
{[0, 1, 2].map((k) => (
|
|
||||||
<div key={k} className={`ch__tile ${done || n > k ? 'is-saved' : ''}`} style={shot(k + 6)}>
|
|
||||||
<span className="pf__check"><CheckIcon size={12} /></span>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
<div className="ch__actions">
|
|
||||||
<span className="mono ch__time">10:42</span>
|
|
||||||
<span className={`kpill kpill--sm ${done ? 'kpill--saved' : ''} ${phase === 'press' ? 'is-pressed' : ''}`}>
|
|
||||||
{done ? <CheckIcon size={14} /> : <DownloadIcon size={14} />}
|
|
||||||
<span className="kpill__label">{done ? 'Saved 3' : phase === 'saving' ? `Saving ${n} of 3` : 'Download all'}</span>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="ch__bubble ch__bubble--me">Thank you, saving these</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
const DRM_STEPS = [
|
|
||||||
['Read manifest', '38 ms'], ['Request license', '212 ms'], ['Decrypt video', '3.1 s'], ['Decrypt audio', '0.4 s'], ['Mux to mp4', '0.9 s'],
|
|
||||||
]
|
|
||||||
const DRM = [['s0', 500], ['s1', 650], ['s2', 650], ['s3', 650], ['s4', 650], ['s5', 2600]]
|
|
||||||
|
|
||||||
function DrmScene() {
|
|
||||||
const [ref, phase] = useLoop(DRM, 's5')
|
|
||||||
const at = Number(phase.slice(1))
|
|
||||||
return (
|
|
||||||
<div ref={ref} className="scene dr">
|
|
||||||
<div className="dr__video" style={shot(0)}>
|
|
||||||
<span className={`dr__badge ${at >= 5 ? 'is-open' : ''}`}><LockIcon size={13} /> {at >= 5 ? 'Decrypted' : 'Protected'}</span>
|
|
||||||
</div>
|
|
||||||
<ol className="dr__steps">
|
|
||||||
{DRM_STEPS.map(([label, ms], i) => (
|
|
||||||
<li key={label} className={i < at ? 'is-done' : i === at ? 'is-now' : ''}>
|
|
||||||
<span className="dr__dot">{i < at ? <CheckIcon size={12} /> : null}</span>
|
|
||||||
<span>{label}</span>
|
|
||||||
<span className="mono">{i < at ? ms : ''}</span>
|
|
||||||
</li>
|
|
||||||
))}
|
|
||||||
</ol>
|
|
||||||
<div className={`dr__file ${at >= 5 ? 'is-in' : ''}`}>
|
|
||||||
<FileIcon size={16} />
|
|
||||||
<span className="mono">rooftop.mp4</span>
|
|
||||||
<span className="mono dr__meta">1080p · 412 MB · plays anywhere</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
const BULK = [['run', 4200], ['done', 2200]]
|
|
||||||
const NAMES = ['2026-11-29_rooftop.mp4', '2026-11-28_photo-07.jpg', '2026-11-27_voice-note.m4a', '2026-11-25_photo-02.jpg', '2026-11-21_gym.mp4', '2026-11-19_photo-11.jpg']
|
|
||||||
|
|
||||||
function BulkScene() {
|
|
||||||
const [ref, phase] = useLoop(BULK, 'done')
|
|
||||||
const run = phase === 'run'
|
|
||||||
const total = useCount(1284, 4000, run, 1284)
|
|
||||||
const k = total / 1284
|
|
||||||
const types = [['Photos', 880], ['Videos', 362], ['Audio', 42]]
|
|
||||||
return (
|
|
||||||
<div ref={ref} className="scene bk">
|
|
||||||
<div className="bk__head"><span className="pf__avatar" /><span><strong>Archiving Mira Lane</strong><span className="mono">Downloads/Mira Lane</span></span></div>
|
|
||||||
<div className="bk__count mono">{total.toLocaleString('en-US')}<span> / 1,284</span></div>
|
|
||||||
<div className="bk__bar"><span style={{ transform: `scaleX(${k})` }} /></div>
|
|
||||||
<div className="bk__types">
|
|
||||||
{types.map(([name, n]) => (
|
|
||||||
<div key={name} className="bk__type">
|
|
||||||
<span>{name}</span>
|
|
||||||
<span className="bk__mini"><span style={{ transform: `scaleX(${k})` }} /></span>
|
|
||||||
<span className="mono">{Math.round(n * k)} / {n}</span>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
<div className="bk__now mono">
|
|
||||||
{phase === 'done' ? <><CheckIcon size={14} /> All 1,284 saved, 0 duplicates</> : <><DownloadIcon size={14} /> {NAMES[Math.floor(total / 37) % NAMES.length]}</>}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export const SHOWCASE_SCENES = { pills: ChatScene, drm: DrmScene, bundle: BulkScene }
|
|
||||||
@@ -1,658 +0,0 @@
|
|||||||
import { useEffect, useRef, useState } from 'react'
|
|
||||||
import { NAV_LINKS, PLATFORMS, SHOWCASE_TABS, FREE_PLAN, STRUCK_PLANS, REVIEWS, FAQS } from '../data.js'
|
|
||||||
import { Reveal, AddToChrome, SectionHeading, useInView } from './Shared.jsx'
|
|
||||||
import { HairlineFigure } from './Hairline.jsx'
|
|
||||||
import padlockSrc from '../hairline/padlock.js?raw'
|
|
||||||
import { ToolbarScene, QualityScene, ProfileScene, NamingScene, SHOWCASE_SCENES } from './Scenes.jsx'
|
|
||||||
import {
|
|
||||||
CheckIcon, PlusMinus, DownloadIcon, LockIcon, LayersIcon, HeartIcon, MessageIcon,
|
|
||||||
ChevronDownIcon, FolderIcon, FileIcon, XIcon, GlobeIcon, CpuIcon, DriveIcon, ServerIcon, PuzzleIcon, PhoneIcon,
|
|
||||||
} from './Icons.jsx'
|
|
||||||
|
|
||||||
/* ---------------------------------- Nav ---------------------------------- */
|
|
||||||
export function Nav() {
|
|
||||||
const [scrolled, setScrolled] = useState(false)
|
|
||||||
const [open, setOpen] = useState(false)
|
|
||||||
useEffect(() => {
|
|
||||||
const onScroll = () => setScrolled(window.scrollY > 8)
|
|
||||||
onScroll()
|
|
||||||
window.addEventListener('scroll', onScroll, { passive: true })
|
|
||||||
return () => window.removeEventListener('scroll', onScroll)
|
|
||||||
}, [])
|
|
||||||
return (
|
|
||||||
<header className={`nav ${scrolled ? 'nav--scrolled' : ''} ${open ? 'nav--open' : ''}`}>
|
|
||||||
<div className="nav__inner">
|
|
||||||
<a href="#top" className="nav__logo" aria-label="ofsaver home">
|
|
||||||
<img src="/assets/logo.svg" alt="" width="24" height="24" />
|
|
||||||
<span>ofsaver</span>
|
|
||||||
</a>
|
|
||||||
<nav className="nav__links">
|
|
||||||
{NAV_LINKS.map((l) => (
|
|
||||||
<a key={l.href} href={l.href} onClick={() => setOpen(false)}>{l.label}</a>
|
|
||||||
))}
|
|
||||||
</nav>
|
|
||||||
<a href="/ofsaver-extension.zip" download className="btn btn--nav">Add to Chrome</a>
|
|
||||||
<button className="nav__burger" aria-label="Toggle menu" aria-expanded={open} onClick={() => setOpen(!open)}>
|
|
||||||
<span /><span />
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------------------------------- Hero --------------------------------- */
|
|
||||||
function PostToolbar({ children }) {
|
|
||||||
return (
|
|
||||||
<div className="post__bar">
|
|
||||||
<span className="post__icons"><HeartIcon size={18} /><MessageIcon size={18} /></span>
|
|
||||||
<span className="post__pills">{children}</span>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The hero demo, one loop: open the quality menu, pick Source, save, mark it saved. */
|
|
||||||
const DEMO = [
|
|
||||||
['open', 700], ['pick', 900], ['saving', 2800], ['saved', 2600], ['idle', 900],
|
|
||||||
]
|
|
||||||
|
|
||||||
function useDemo(ref) {
|
|
||||||
const [phase, setPhase] = useState('saving')
|
|
||||||
const [pct, setPct] = useState(68)
|
|
||||||
const [visible, setVisible] = useState(false)
|
|
||||||
useEffect(() => {
|
|
||||||
const io = new IntersectionObserver(([e]) => setVisible(e.isIntersecting), { threshold: 0.3 })
|
|
||||||
io.observe(ref.current)
|
|
||||||
return () => io.disconnect()
|
|
||||||
}, [ref])
|
|
||||||
useEffect(() => {
|
|
||||||
if (!visible || matchMedia('(prefers-reduced-motion: reduce)').matches) return
|
|
||||||
let i = 0, timer, raf
|
|
||||||
const step = () => {
|
|
||||||
const [name, ms] = DEMO[i]
|
|
||||||
setPhase(name)
|
|
||||||
cancelAnimationFrame(raf)
|
|
||||||
if (name === 'saving') {
|
|
||||||
const t0 = performance.now(), dur = ms - 300
|
|
||||||
const tick = (now) => {
|
|
||||||
const k = Math.min(1, (now - t0) / dur)
|
|
||||||
setPct(Math.round(100 * (1 - Math.pow(1 - k, 2.2))))
|
|
||||||
if (k < 1) raf = requestAnimationFrame(tick)
|
|
||||||
}
|
|
||||||
setPct(0)
|
|
||||||
raf = requestAnimationFrame(tick)
|
|
||||||
}
|
|
||||||
if (name === 'saved') setPct(100)
|
|
||||||
i = (i + 1) % DEMO.length
|
|
||||||
timer = setTimeout(step, ms)
|
|
||||||
}
|
|
||||||
timer = setTimeout(step, 600)
|
|
||||||
return () => { clearTimeout(timer); cancelAnimationFrame(raf) }
|
|
||||||
}, [visible])
|
|
||||||
return { phase, pct }
|
|
||||||
}
|
|
||||||
|
|
||||||
function FeedPreview() {
|
|
||||||
const ref = useRef(null)
|
|
||||||
const { phase, pct } = useDemo(ref)
|
|
||||||
const menuOpen = phase === 'open' || phase === 'pick'
|
|
||||||
const saved = phase === 'saved'
|
|
||||||
const toast = phase === 'saving' || phase === 'saved'
|
|
||||||
return (
|
|
||||||
<div ref={ref} className="preview" aria-label="ofsaver Download pill and quality menu on a feed post">
|
|
||||||
<div className="preview__bar">
|
|
||||||
<span className="preview__dots"><i /><i /><i /></span>
|
|
||||||
<span className="preview__url">onlyfans.com/my/feed</span>
|
|
||||||
</div>
|
|
||||||
<div className="preview__body">
|
|
||||||
<div className="feed">
|
|
||||||
<article className="post">
|
|
||||||
<header className="post__head">
|
|
||||||
<span className="avatar avatar--a" />
|
|
||||||
<span><strong>Mira Lane</strong><em>@mira.lane · 2h</em></span>
|
|
||||||
</header>
|
|
||||||
<p className="post__text">Rooftop set from last weekend, full video below</p>
|
|
||||||
<div className="post__media post__media--video"><span className="post__dur">04:12</span></div>
|
|
||||||
<PostToolbar>
|
|
||||||
<span className={`pill ${saved ? 'pill--saved' : 'pill--open'} ${menuOpen ? 'is-pressed' : ''}`}>
|
|
||||||
{saved
|
|
||||||
? <><CheckIcon size={14} /> Saved</>
|
|
||||||
: <><DownloadIcon size={14} /> {phase === 'saving' ? 'Saving' : 'Download'} <ChevronDownIcon size={14} /></>}
|
|
||||||
</span>
|
|
||||||
</PostToolbar>
|
|
||||||
<div className={`menu ${menuOpen ? 'is-open' : ''}`} role="presentation">
|
|
||||||
<div className="menu__label">Quality</div>
|
|
||||||
<div className={`menu__row ${phase === 'pick' ? 'is-active' : ''}`}><span>Source</span><span className="mono">1080p · 412 MB</span></div>
|
|
||||||
<div className="menu__row"><span>720p</span><span className="mono">188 MB</span></div>
|
|
||||||
<div className="menu__row"><span>Preview</span><span className="mono">480p · 64 MB</span></div>
|
|
||||||
</div>
|
|
||||||
</article>
|
|
||||||
<article className="post">
|
|
||||||
<header className="post__head">
|
|
||||||
<span className="avatar avatar--b" />
|
|
||||||
<span><strong>Jun Okada</strong><em>@junokada · 5h</em></span>
|
|
||||||
</header>
|
|
||||||
<div className="post__grid">
|
|
||||||
<div className="post__media post__media--p1" />
|
|
||||||
<div className="post__media post__media--p2" />
|
|
||||||
<div className="post__media post__media--p3" />
|
|
||||||
</div>
|
|
||||||
<PostToolbar>
|
|
||||||
<span className="pill pill--saved"><CheckIcon size={14} /> Saved</span>
|
|
||||||
</PostToolbar>
|
|
||||||
</article>
|
|
||||||
</div>
|
|
||||||
<aside className={`toast ${toast ? 'is-in' : ''}`}>
|
|
||||||
<div className="toast__row">
|
|
||||||
<span className="toast__title">{saved ? 'Saved rooftop.mp4' : 'Saving rooftop.mp4'}</span>
|
|
||||||
<span className="mono toast__pct">{pct}%</span>
|
|
||||||
</div>
|
|
||||||
<div className="toast__track"><span style={{ transform: `scaleX(${pct / 100})` }} /></div>
|
|
||||||
<div className="mono toast__path">Mira Lane/Videos/2026-11-29_rooftop.mp4</div>
|
|
||||||
</aside>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export function Hero() {
|
|
||||||
return (
|
|
||||||
<section className="hero" id="top">
|
|
||||||
<Reveal className="hero__copy">
|
|
||||||
<h1 className="hero__title">Every post saved<br /><em>in one click</em></h1>
|
|
||||||
<p className="hero__sub">
|
|
||||||
ofsaver adds a Download button to every post and message on onlyfans.com. Photos, videos
|
|
||||||
and audio, DRM included, go straight to your Downloads folder. Free, including the parts
|
|
||||||
other downloaders charge for.
|
|
||||||
</p>
|
|
||||||
<div className="hero__actions">
|
|
||||||
<AddToChrome />
|
|
||||||
<a href="#how" className="btn btn--ghost">See how it works</a>
|
|
||||||
</div>
|
|
||||||
</Reveal>
|
|
||||||
<Reveal delay={80} className="hero__shot">
|
|
||||||
<FeedPreview />
|
|
||||||
</Reveal>
|
|
||||||
</section>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* --------------------------------- Compare ------------------------------- */
|
|
||||||
const FACTS = [
|
|
||||||
{ n: '0', label: 'Servers your files pass through' },
|
|
||||||
{ n: '0', label: 'Accounts, logins or passwords to hand over' },
|
|
||||||
{ n: '1', unit: 'click', label: 'From any post to a file on disk' },
|
|
||||||
{ n: '$0', label: 'For DRM video and whole profiles, paid extras elsewhere' },
|
|
||||||
]
|
|
||||||
const WITHOUT = [
|
|
||||||
'Videos stream in pieces, so there is nothing to right-click and save',
|
|
||||||
'Protected videos arrive encrypted and only play inside the page',
|
|
||||||
'Keeping a profile means hundreds of saves, one post at a time',
|
|
||||||
'Files land as IMG_0043 with no creator, date or type',
|
|
||||||
'Downloaders that do handle DRM and bulk charge a monthly plan for them',
|
|
||||||
]
|
|
||||||
const WITH = [
|
|
||||||
'A Download pill on every post and message',
|
|
||||||
'DRM videos decrypted in your browser into one playable mp4',
|
|
||||||
'A whole profile queued in one click, duplicates skipped',
|
|
||||||
'Files sorted as Creator/Videos/2026-11-29_rooftop.mp4',
|
|
||||||
'DRM video and whole profiles included, free, no plan to pick',
|
|
||||||
]
|
|
||||||
|
|
||||||
export function FactBand() {
|
|
||||||
return (
|
|
||||||
<section className="factband">
|
|
||||||
<Reveal className="facts container">
|
|
||||||
{FACTS.map((f) => (
|
|
||||||
<div key={f.label} className="fact">
|
|
||||||
<span className="fact__n">{f.n}{f.unit && <small> {f.unit}</small>}</span>
|
|
||||||
<span className="fact__label">{f.label}</span>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</Reveal>
|
|
||||||
</section>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export function Compare() {
|
|
||||||
return (
|
|
||||||
<section className="compare container">
|
|
||||||
<SectionHeading eyebrow="Why ofsaver" muted="Photos save fine" strong="Videos never did" />
|
|
||||||
<Reveal as="p" className="compare__sub">
|
|
||||||
The site streams video in signed, encrypted pieces, so the usual right-click does nothing.
|
|
||||||
ofsaver works from inside your own signed-in tab, where those pieces make sense.
|
|
||||||
</Reveal>
|
|
||||||
<Reveal delay={60} className="compare__grid">
|
|
||||||
<div className="compare__col compare__col--them">
|
|
||||||
<div className="compare__head">Without ofsaver</div>
|
|
||||||
<ul className="compare__list">
|
|
||||||
{WITHOUT.map((t) => <li key={t}><XIcon /> {t}</li>)}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div className="compare__col compare__col--us">
|
|
||||||
<div className="compare__head"><img src="/assets/logo-light.svg" alt="" /> With ofsaver</div>
|
|
||||||
<ul className="compare__list">
|
|
||||||
{WITH.map((t) => <li key={t}><CheckIcon /> {t}</li>)}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</Reveal>
|
|
||||||
</section>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------- Showcase ------------------------------- */
|
|
||||||
const TAB_ICONS = { pills: <DownloadIcon />, drm: <LockIcon />, bundle: <LayersIcon /> }
|
|
||||||
const TAB_DURATION = 6000
|
|
||||||
|
|
||||||
export function Showcase() {
|
|
||||||
const [active, setActive] = useState(0)
|
|
||||||
useEffect(() => {
|
|
||||||
const t = setTimeout(() => setActive((a) => (a + 1) % SHOWCASE_TABS.length), TAB_DURATION)
|
|
||||||
return () => clearTimeout(t)
|
|
||||||
}, [active])
|
|
||||||
|
|
||||||
return (
|
|
||||||
<section className="showcase container" id="how">
|
|
||||||
<div className="showcase__left">
|
|
||||||
<Reveal className="section-heading section-heading--left">
|
|
||||||
<span className="eyebrow">How it works</span>
|
|
||||||
<h2>Saved without<br />leaving the page</h2>
|
|
||||||
</Reveal>
|
|
||||||
<Reveal delay={60} className="tabs">
|
|
||||||
{SHOWCASE_TABS.map((tab, i) => (
|
|
||||||
<button
|
|
||||||
key={tab.key}
|
|
||||||
className={`tab ${i === active ? 'tab--active' : ''}`}
|
|
||||||
onClick={() => setActive(i)}
|
|
||||||
aria-pressed={i === active}
|
|
||||||
>
|
|
||||||
<span className="tab__head">{TAB_ICONS[tab.key]} {tab.title}</span>
|
|
||||||
<span className="tab__body"><span>{tab.body}</span></span>
|
|
||||||
{i === active && <span key={active} className="tab__progress" style={{ animationDuration: `${TAB_DURATION}ms` }} />}
|
|
||||||
</button>
|
|
||||||
))}
|
|
||||||
</Reveal>
|
|
||||||
</div>
|
|
||||||
<Reveal delay={120} className="showcase__visual">
|
|
||||||
<div className="stage">
|
|
||||||
<div className="stage__bar"><i /><i /><i /><span className="mono">onlyfans.com</span></div>
|
|
||||||
{SHOWCASE_TABS.map((tab, i) => {
|
|
||||||
const Scene = SHOWCASE_SCENES[tab.key]
|
|
||||||
return (
|
|
||||||
<div key={tab.key} className={`stage__scene ${i === active ? 'is-active' : ''}`} aria-hidden={i !== active}>
|
|
||||||
{i === active && <Scene key={active} />}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
</Reveal>
|
|
||||||
</section>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------- Features ------------------------------- */
|
|
||||||
function FeatureCard({ title, body, path, children, className = '', delay = 0 }) {
|
|
||||||
return (
|
|
||||||
<Reveal delay={delay} className={`feature-card ${className}`}>
|
|
||||||
<div className="feature-card__copy">
|
|
||||||
<h3>{title}</h3>
|
|
||||||
<p>{body}</p>
|
|
||||||
{path && <code className="path">{path}</code>}
|
|
||||||
</div>
|
|
||||||
<div className="feature-card__media">{children}</div>
|
|
||||||
</Reveal>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
const TREE = [
|
|
||||||
{ depth: 0, kind: 'folder', name: 'Mira Lane' },
|
|
||||||
{ depth: 1, kind: 'folder', name: 'Videos' },
|
|
||||||
{ depth: 2, kind: 'file', name: '2026-11-29_rooftop.mp4', meta: '412 MB', fresh: true },
|
|
||||||
{ depth: 2, kind: 'file', name: '2026-11-14_studio-tour.mp4', meta: '286 MB' },
|
|
||||||
{ depth: 2, kind: 'file', name: '2026-10-30_q-and-a.mp4', meta: '1.2 GB' },
|
|
||||||
{ depth: 1, kind: 'folder', name: 'Photos', meta: '318 files' },
|
|
||||||
{ depth: 1, kind: 'folder', name: 'Audio', meta: '12 files' },
|
|
||||||
]
|
|
||||||
|
|
||||||
function FolderTree() {
|
|
||||||
return (
|
|
||||||
<div className="tree" aria-label="Downloads folder after a DRM video is saved">
|
|
||||||
<div className="tree__head">
|
|
||||||
<FolderIcon /> <span>Downloads</span>
|
|
||||||
</div>
|
|
||||||
<ul>
|
|
||||||
{TREE.map((row) => (
|
|
||||||
<li key={row.name} className={`tree__row ${row.fresh ? 'is-fresh' : ''}`} style={{ '--depth': row.depth }}>
|
|
||||||
{row.kind === 'folder' ? <FolderIcon /> : <FileIcon />}
|
|
||||||
<span className="tree__name">{row.name}</span>
|
|
||||||
{row.meta && <span className="mono tree__meta">{row.meta}</span>}
|
|
||||||
</li>
|
|
||||||
))}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export function Features() {
|
|
||||||
return (
|
|
||||||
<section className="features container" id="features">
|
|
||||||
<SectionHeading eyebrow="Features" muted="From a single post" strong="to a whole profile" />
|
|
||||||
<div className="features__grid">
|
|
||||||
<FeatureCard title={<>Right in<br />the toolbar</>} body="A Download pill appears on every post and message, exactly where the site should have put one." className="media-scene">
|
|
||||||
<ToolbarScene />
|
|
||||||
</FeatureCard>
|
|
||||||
<FeatureCard delay={60} title={<>Pick your<br />quality</>} body="Tap a pill and choose source, a resolution or the preview, with sizes shown before you commit." className="media-scene">
|
|
||||||
<QualityScene />
|
|
||||||
</FeatureCard>
|
|
||||||
|
|
||||||
<Reveal className="feature-card feature-card--dark">
|
|
||||||
<div className="feature-card__copy">
|
|
||||||
<h3>DRM,<br />handled</h3>
|
|
||||||
<p>Protected videos run the whole Widevine flow locally, license, WebAssembly decryption and mux, and land as one playable mp4 at source quality.</p>
|
|
||||||
<AddToChrome variant="light" />
|
|
||||||
</div>
|
|
||||||
<HairlineFigure src={padlockSrc} zone=".feature-card--dark" value={420} className="drm-lock" />
|
|
||||||
<div className="feature-card__media">
|
|
||||||
<FolderTree />
|
|
||||||
</div>
|
|
||||||
</Reveal>
|
|
||||||
|
|
||||||
<FeatureCard title={<>Whole profiles<br />in one go</>} body="Bulk mode crawls a creator's timeline and queues every photo and video, DRM included." className="media-scene">
|
|
||||||
<ProfileScene />
|
|
||||||
</FeatureCard>
|
|
||||||
<FeatureCard delay={60} title={<>Saved, and it<br />stays marked</>} body="Everything you already have gets a check, and your naming scheme keeps folders in order." path="{creator}/{type}/{date}_{name}" className="media-scene">
|
|
||||||
<NamingScene />
|
|
||||||
</FeatureCard>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------- Platforms ------------------------------ */
|
|
||||||
export function Platforms() {
|
|
||||||
return (
|
|
||||||
<section className="platforms">
|
|
||||||
<div className="container platforms__inner">
|
|
||||||
<span className="platforms__label mono">Works on</span>
|
|
||||||
<ul className="platforms__list">
|
|
||||||
{PLATFORMS.filter((p) => p.live).map((p) => (
|
|
||||||
<li key={p.name} className="is-live"><span className="platforms__dot" />{p.name}</li>
|
|
||||||
))}
|
|
||||||
<li className="platforms__soon mono" aria-hidden="true">coming soon</li>
|
|
||||||
{PLATFORMS.filter((p) => !p.live).map((p) => (
|
|
||||||
<li key={p.name}><span className="platforms__dot" />{p.name}</li>
|
|
||||||
))}
|
|
||||||
</ul>
|
|
||||||
<div className="platforms__runs">
|
|
||||||
<span className="platforms__label mono">Runs as</span>
|
|
||||||
<span className="chip"><PuzzleIcon size={14} /> Chrome extension</span>
|
|
||||||
<span className="chip chip--soon"><PhoneIcon size={14} /> iPhone and Android <span className="mono">soon</span></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* --------------------------------- Mobile -------------------------------- */
|
|
||||||
export function Mobile() {
|
|
||||||
return (
|
|
||||||
<section className="mobile container" id="mobile">
|
|
||||||
<Reveal className="mobile__card">
|
|
||||||
<div className="mobile__copy">
|
|
||||||
<span className="eyebrow">Coming soon</span>
|
|
||||||
<h2>ofsaver,<br />in your pocket</h2>
|
|
||||||
<p>
|
|
||||||
The same Download button, on your phone. Save from the feed or your messages straight to
|
|
||||||
your camera roll or Files, DRM videos included, and still free.
|
|
||||||
</p>
|
|
||||||
<ul className="mobile__list">
|
|
||||||
<li><CheckIcon /> iPhone and Android</li>
|
|
||||||
<li><CheckIcon /> Saves to Photos or Files</li>
|
|
||||||
<li><CheckIcon /> Same naming scheme as desktop</li>
|
|
||||||
</ul>
|
|
||||||
<p className="mobile__note mono">On desktop today: Chrome, Brave and Arc</p>
|
|
||||||
</div>
|
|
||||||
<div className="mobile__visual" aria-hidden="true">
|
|
||||||
<div className="handset">
|
|
||||||
<div className="handset__screen">
|
|
||||||
<div className="handset__status mono"><span>9:41</span><span className="handset__island" /><span>100%</span></div>
|
|
||||||
<div className="handset__head"><span className="pf__avatar" /><span><strong>Mira Lane</strong><span className="mono">@mira.lane</span></span></div>
|
|
||||||
<div className="handset__media" style={{ background: 'radial-gradient(120% 90% at 70% 20%, #e8c3a5, #9c6a52)' }}>
|
|
||||||
<span className="mono post__dur">04:12</span>
|
|
||||||
</div>
|
|
||||||
<div className="handset__bar">
|
|
||||||
<span className="post__icons"><HeartIcon size={18} /><MessageIcon size={18} /></span>
|
|
||||||
<span className="pill pill--open"><DownloadIcon size={14} /> Download</span>
|
|
||||||
</div>
|
|
||||||
<div className="handset__sheet">
|
|
||||||
<span className="handset__grab" />
|
|
||||||
<div className="handset__sheet-title">Save rooftop.mp4</div>
|
|
||||||
<div className="menu__row is-active"><span>Source</span><span className="mono">1080p · 412 MB</span></div>
|
|
||||||
<div className="menu__row"><span>720p</span><span className="mono">188 MB</span></div>
|
|
||||||
<div className="handset__dest mono"><FolderIcon size={14} /> Files/ofsaver/Mira Lane</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</Reveal>
|
|
||||||
</section>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* --------------------------------- Safety -------------------------------- */
|
|
||||||
const ROUTE = [
|
|
||||||
{ icon: <GlobeIcon size={18} />, title: 'Your signed-in tab', meta: 'onlyfans.com, as you' },
|
|
||||||
{ icon: <CpuIcon size={18} />, title: 'Your browser', meta: 'decrypts and names files' },
|
|
||||||
{ icon: <DriveIcon size={18} />, title: 'Your Downloads folder', meta: 'Mira Lane/Videos/…' },
|
|
||||||
]
|
|
||||||
const AUDIT = [
|
|
||||||
{
|
|
||||||
q: 'Does it ask for your password?',
|
|
||||||
flag: 'A login form for your OnlyFans account',
|
|
||||||
us: 'Never. It works inside the tab you are already signed into',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
q: 'Where do your files go?',
|
|
||||||
flag: 'Downloads "processed in the cloud"',
|
|
||||||
us: 'Only to your Downloads folder. ofsaver has no servers at all',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
q: 'How hard does it hit the site?',
|
|
||||||
flag: 'Hundreds of requests at once, flagged accounts',
|
|
||||||
us: 'Bulk mode waits politely between requests',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
q: 'What does it charge for?',
|
|
||||||
flag: 'DRM video and whole profiles behind a monthly plan',
|
|
||||||
us: 'Nothing. Every feature is free, DRM and bulk included',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
export function Safety() {
|
|
||||||
const [ref, inView] = useInView({ threshold: 0.5 })
|
|
||||||
return (
|
|
||||||
<section className="safety container" id="safety">
|
|
||||||
<div className="safety__top">
|
|
||||||
<SectionHeading eyebrow="Safety" muted="Before a downloader sees your account" strong="ask it four questions" align="left" />
|
|
||||||
<Reveal as="p" delay={60} className="safety__intro">
|
|
||||||
Any tool that saves from a subscription site can see your logged-in session. That is a lot of trust
|
|
||||||
to hand over, so here is what to check in any downloader, and how ofsaver answers each one.
|
|
||||||
</Reveal>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<Reveal className="route">
|
|
||||||
<div className="route__line">
|
|
||||||
{ROUTE.map((r, i) => (
|
|
||||||
<div key={r.title} className="route__stop">
|
|
||||||
<span className="route__icon">{r.icon}</span>
|
|
||||||
<span><strong>{r.title}</strong><span className="mono">{r.meta}</span></span>
|
|
||||||
{i < ROUTE.length - 1 && <span className="route__arrow" aria-hidden="true" />}
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
<div ref={ref} className={`route__stop route__stop--never ${inView ? 'is-struck' : ''}`}>
|
|
||||||
<span className="route__icon"><ServerIcon size={18} /></span>
|
|
||||||
<span><strong>Someone else's server</strong><span className="mono">never on the route</span></span>
|
|
||||||
<svg className="strike" viewBox="0 0 100 20" preserveAspectRatio="none" aria-hidden="true">
|
|
||||||
<path d="M2 14 C 30 11, 62 9, 98 6" pathLength="1" />
|
|
||||||
</svg>
|
|
||||||
</div>
|
|
||||||
</Reveal>
|
|
||||||
|
|
||||||
<Reveal delay={60} className="audit">
|
|
||||||
<div className="audit__head">
|
|
||||||
<span />
|
|
||||||
<span>Red flag</span>
|
|
||||||
<span>ofsaver</span>
|
|
||||||
</div>
|
|
||||||
{AUDIT.map((row, i) => (
|
|
||||||
<div key={row.q} className="audit__row">
|
|
||||||
<span className="audit__q"><span className="mono">0{i + 1}</span>{row.q}</span>
|
|
||||||
<span className="audit__flag"><XIcon size={14} />{row.flag}</span>
|
|
||||||
<span className="audit__us"><CheckIcon size={14} />{row.us}</span>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</Reveal>
|
|
||||||
<Reveal as="p" className="safety__rule">
|
|
||||||
Rule of thumb: if a downloader wants your password, a server or a subscription, ask what it is doing with them
|
|
||||||
</Reveal>
|
|
||||||
</section>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------- Pricing -------------------------------- */
|
|
||||||
function StruckPlan({ plan, delay }) {
|
|
||||||
const [ref, inView] = useInView({ threshold: 0.5 })
|
|
||||||
return (
|
|
||||||
<Reveal delay={delay} className="plan plan--struck">
|
|
||||||
<div className="plan__name">{plan.name}</div>
|
|
||||||
<div ref={ref} className={`plan__price ${inView ? 'is-struck' : ''}`}>
|
|
||||||
<span className="plan__was">
|
|
||||||
<span className="plan__amount">${plan.price}</span>
|
|
||||||
<span className="plan__per">{plan.per}</span>
|
|
||||||
<svg className="strike" viewBox="0 0 100 20" preserveAspectRatio="none" aria-hidden="true">
|
|
||||||
<path d="M2 15 C 30 11, 62 8, 98 4" pathLength="1" />
|
|
||||||
</svg>
|
|
||||||
</span>
|
|
||||||
<span className="plan__now mono">$0</span>
|
|
||||||
</div>
|
|
||||||
<p className="plan__desc">{plan.note}</p>
|
|
||||||
<span className="btn btn--block btn--void">Nothing to buy</span>
|
|
||||||
</Reveal>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export function Pricing() {
|
|
||||||
return (
|
|
||||||
<section className="pricing" id="pricing">
|
|
||||||
<div className="container">
|
|
||||||
<SectionHeading eyebrow="Pricing" muted="We drew up a pricing page" strong="then made all of it free" />
|
|
||||||
<Reveal as="p" className="pricing__sub">
|
|
||||||
Other downloaders put DRM video and whole-profile backups behind a paid plan.
|
|
||||||
ofsaver gives you both, and everything else, for nothing.
|
|
||||||
</Reveal>
|
|
||||||
<div className="pricing__grid">
|
|
||||||
<Reveal className="plan plan--featured">
|
|
||||||
<div className="plan__name">{FREE_PLAN.name}</div>
|
|
||||||
<div className="plan__price">
|
|
||||||
<span className="plan__amount">$0</span>
|
|
||||||
<span className="plan__per">forever</span>
|
|
||||||
</div>
|
|
||||||
<p className="plan__desc">{FREE_PLAN.description}</p>
|
|
||||||
<AddToChrome variant="primary" />
|
|
||||||
<ul className="plan__features">
|
|
||||||
{FREE_PLAN.features.map((f) => (
|
|
||||||
<li key={f}><CheckIcon /> {f}</li>
|
|
||||||
))}
|
|
||||||
</ul>
|
|
||||||
</Reveal>
|
|
||||||
{STRUCK_PLANS.map((plan, i) => <StruckPlan key={plan.name} plan={plan} delay={(i + 1) * 60} />)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------- Reviews -------------------------------- */
|
|
||||||
function ReviewCard({ r }) {
|
|
||||||
return (
|
|
||||||
<article className="review">
|
|
||||||
<p>{r.text}</p>
|
|
||||||
<footer>
|
|
||||||
<strong>{r.name}</strong>
|
|
||||||
<span className="mono">{r.date}</span>
|
|
||||||
</footer>
|
|
||||||
</article>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
const COLUMNS = [[0, 3, 6], [1, 4, 7], [2, 5, 8]]
|
|
||||||
|
|
||||||
export function Reviews() {
|
|
||||||
return (
|
|
||||||
<section className="reviews container" id="reviews">
|
|
||||||
<SectionHeading eyebrow="Reviews" muted="A tool you forget you installed" strong="until you need it" />
|
|
||||||
<Reveal as="p" className="ratings">
|
|
||||||
4.8 on the Chrome Web Store <span aria-hidden="true">·</span> 4.8 on Product Hunt
|
|
||||||
</Reveal>
|
|
||||||
<Reveal className="reviews__wall">
|
|
||||||
{COLUMNS.map((col, ci) => (
|
|
||||||
<div key={ci} className="reviews__col">
|
|
||||||
{col.map((idx) => <ReviewCard key={idx} r={REVIEWS[idx]} />)}
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</Reveal>
|
|
||||||
</section>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------------------------------- FAQ ---------------------------------- */
|
|
||||||
export function Faq() {
|
|
||||||
const [open, setOpen] = useState(0)
|
|
||||||
return (
|
|
||||||
<section className="faq container" id="faq">
|
|
||||||
<div className="faq__left">
|
|
||||||
<SectionHeading eyebrow="FAQ" muted="Questions" strong="before you install" align="left" />
|
|
||||||
<Reveal as="p" delay={60} className="faq__help">
|
|
||||||
Can't find the answer? Email{' '}
|
|
||||||
<a href="mailto:help@ofsaver.app">help@ofsaver.app</a>
|
|
||||||
</Reveal>
|
|
||||||
</div>
|
|
||||||
<Reveal as="ul" delay={60} className="faq__list">
|
|
||||||
{FAQS.map((item, i) => {
|
|
||||||
const isOpen = open === i
|
|
||||||
return (
|
|
||||||
<li key={item.q} className={`faq__item ${isOpen ? 'is-open' : ''}`}>
|
|
||||||
<button onClick={() => setOpen(isOpen ? -1 : i)} aria-expanded={isOpen}>
|
|
||||||
<span>{item.q}</span>
|
|
||||||
<PlusMinus open={isOpen} />
|
|
||||||
</button>
|
|
||||||
<div className="faq__answer"><p>{item.a}</p></div>
|
|
||||||
</li>
|
|
||||||
)
|
|
||||||
})}
|
|
||||||
</Reveal>
|
|
||||||
</section>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------------------------------- CTA ---------------------------------- */
|
|
||||||
export function Cta() {
|
|
||||||
return (
|
|
||||||
<section className="container">
|
|
||||||
<Reveal className="cta">
|
|
||||||
<h2>Stop re-finding posts<br />Start keeping them</h2>
|
|
||||||
<AddToChrome variant="dark" />
|
|
||||||
<p className="cta__meta mono">Free, DRM included · Runs locally · Chrome, Brave and Arc</p>
|
|
||||||
</Reveal>
|
|
||||||
</section>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export function Footer() {
|
|
||||||
return (
|
|
||||||
<footer className="footer container">
|
|
||||||
<span>ofsaver is a personal downloader</span>
|
|
||||||
<span className="mono">© 2026</span>
|
|
||||||
</footer>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
import { useEffect, useRef, useState } from 'react'
|
|
||||||
|
|
||||||
export function useInView(options = { threshold: 0.15 }) {
|
|
||||||
const ref = useRef(null)
|
|
||||||
const [inView, setInView] = useState(false)
|
|
||||||
useEffect(() => {
|
|
||||||
const el = ref.current
|
|
||||||
if (!el) return
|
|
||||||
const io = new IntersectionObserver(([entry]) => {
|
|
||||||
if (entry.isIntersecting) {
|
|
||||||
setInView(true)
|
|
||||||
io.disconnect()
|
|
||||||
}
|
|
||||||
}, options)
|
|
||||||
io.observe(el)
|
|
||||||
return () => io.disconnect()
|
|
||||||
}, [])
|
|
||||||
return [ref, inView]
|
|
||||||
}
|
|
||||||
|
|
||||||
/** A short fade and rise when a block first scrolls into view. */
|
|
||||||
export function Reveal({ as: Tag = 'div', delay = 0, className = '', children, ...rest }) {
|
|
||||||
const [ref, inView] = useInView()
|
|
||||||
return (
|
|
||||||
<Tag
|
|
||||||
ref={ref}
|
|
||||||
className={`reveal ${inView ? 'is-in' : ''} ${className}`}
|
|
||||||
style={{ transitionDelay: `${delay}ms` }}
|
|
||||||
{...rest}
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</Tag>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AddToChrome({ variant = 'primary' }) {
|
|
||||||
return (
|
|
||||||
<a href="/ofsaver-extension.zip" download className={`btn btn--${variant}`}>
|
|
||||||
Add to Chrome
|
|
||||||
<span className="btn__meta">Free</span>
|
|
||||||
</a>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export function SectionHeading({ eyebrow, muted, strong, align = 'center' }) {
|
|
||||||
return (
|
|
||||||
<Reveal className={`section-heading section-heading--${align}`}>
|
|
||||||
<span className="eyebrow">{eyebrow}</span>
|
|
||||||
<h2>
|
|
||||||
<span className="muted">{muted}</span>
|
|
||||||
<br />
|
|
||||||
{strong}
|
|
||||||
</h2>
|
|
||||||
</Reveal>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
96
src/data.js
96
src/data.js
@@ -1,96 +0,0 @@
|
|||||||
export const NAV_LINKS = [
|
|
||||||
{ label: 'Features', href: '#features' },
|
|
||||||
{ label: 'Install', href: '#install' },
|
|
||||||
{ label: 'Reviews', href: '#reviews' },
|
|
||||||
{ label: 'Pricing', href: '#pricing' },
|
|
||||||
{ label: 'FAQ', href: '#faq' },
|
|
||||||
]
|
|
||||||
|
|
||||||
export const SHOWCASE_TABS = [
|
|
||||||
{
|
|
||||||
key: 'pills',
|
|
||||||
title: 'Download pills',
|
|
||||||
body: 'A Download button appears right inside every post and message. Click it, pick a quality, done.',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'drm',
|
|
||||||
title: 'DRM decryption',
|
|
||||||
body: 'Protected videos run the full Widevine flow in your browser: license, decrypt, and mux into a clean mp4.',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'bundle',
|
|
||||||
title: 'Bulk archive',
|
|
||||||
body: 'One button queues an entire profile, photos and videos alike, sorted into folders as it saves.',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
export const FREE_PLAN = {
|
|
||||||
name: 'Free',
|
|
||||||
description: 'Every feature, for everyone. No account, no trial, no card, no server.',
|
|
||||||
features: [
|
|
||||||
'Download pills on posts and chats',
|
|
||||||
'Photos, GIFs, videos and audio',
|
|
||||||
'Quality menu per media',
|
|
||||||
'Widevine DRM decryption',
|
|
||||||
'Unlimited bulk downloads',
|
|
||||||
'Full-timeline crawling',
|
|
||||||
'Custom folder and file naming',
|
|
||||||
'Every future update',
|
|
||||||
],
|
|
||||||
}
|
|
||||||
|
|
||||||
export const STRUCK_PLANS = [
|
|
||||||
{
|
|
||||||
name: 'Pro',
|
|
||||||
price: 6,
|
|
||||||
per: 'per month',
|
|
||||||
note: 'Was going to hold bulk downloads and timeline crawling. They are in Free now.',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Lifetime',
|
|
||||||
price: 39,
|
|
||||||
per: 'once',
|
|
||||||
note: 'Pay once, keep it forever. Free already lasts forever, and costs less.',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
export const REVIEWS = [
|
|
||||||
{ text: "The pill just sits there in the toolbar like it was always part of the site. One click and the video lands in my folder, decrypted. That's it.", name: 'Kevin Patterson', date: 'Apr 13, 2026' },
|
|
||||||
{ text: 'Archived three creators I\'ve subscribed to for years in one evening. 4,200 files, sorted into folders, named properly. Wild.', name: 'Maya Chen', date: 'Nov 12, 2025' },
|
|
||||||
{ text: "Every other downloader wants my login or runs through some sketchy site. ofsaver doesn't phone home at all — everything stays in my browser.", name: 'Sara Lindqvist', date: 'May 2, 2025' },
|
|
||||||
{ text: 'The DRM ones actually work. License handshake, decrypt, mux — I get one playable mp4 instead of a scrambled stream I can\'t open.', name: 'Marcus Thompson', date: 'Feb 13, 2026' },
|
|
||||||
{ text: 'The naming schemes sold me. {creator}/{type}/{date} means my archive looks like a media library instead of a swamp of IMG_0043 files.', name: 'Tyler Brooks', date: 'Aug 7, 2025' },
|
|
||||||
{ text: 'It marks what you already saved, so re-downloading a profile doesn\'t duplicate everything. Small detail, huge quality of life.', name: 'Daniel Brooks', date: 'Mar 1, 2025' },
|
|
||||||
{ text: 'Download all on a 30-photo post is exactly what the site was missing. The site has had a download button design flaw for a decade.', name: 'James Okafor', date: 'Jan 13, 2026' },
|
|
||||||
{ text: 'Picked 720p for one video and source for another from the same little menu. No settings page spelunking, no re-downloading to change quality.', name: 'Chiara Romano', date: 'May 13, 2025' },
|
|
||||||
{ text: 'Runs entirely local, works offline for plain media, no accounts, no upsell popups. Feels like something you\'d write for yourself.', name: 'Aleksandra Volkov', date: 'May 13, 2024' },
|
|
||||||
]
|
|
||||||
|
|
||||||
export const FAQS = [
|
|
||||||
{
|
|
||||||
q: 'Does it work with DRM-protected videos?',
|
|
||||||
a: 'Yes. ofsaver runs the full Widevine flow locally in your browser — it fetches the manifest, requests a license with your own session, decrypts the video and audio tracks with WebAssembly, and muxes them into a single playable mp4.',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
q: 'Do you see or store my login or downloads?',
|
|
||||||
a: "No. ofsaver has no servers and no accounts. It uses your existing logged-in session on onlyfans.com, and everything — downloads, keys, settings — lives in your own browser storage.",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
q: 'Where do the files go?',
|
|
||||||
a: 'Straight to your browser\'s Downloads folder. You choose the folder structure and file names in the settings page, with tokens like {creator}, {type}, {date} and {quality} — e.g. Creator/Videos/date_name.mp4.',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
q: 'Which media types are supported?',
|
|
||||||
a: 'Photos, GIFs, audio, plain videos, and Widevine DRM-protected videos. Plain media saves in its original quality; DRM videos are decrypted and muxed to mp4 at source quality.',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
q: 'Can I download a whole profile at once?',
|
|
||||||
a: 'Yes. The bulk mode crawls a creator\'s timeline with your own signed requests and queues every photo and video — DRM included — with a polite delay between requests.',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
export const PLATFORMS = [
|
|
||||||
{ name: 'OnlyFans', live: true },
|
|
||||||
{ name: 'Fansly' }, { name: 'JustForFans' }, { name: 'privacy.com.br' }, { name: 'Fanvue' }, { name: 'Patreon' },
|
|
||||||
{ name: 'LoyalFans' }, { name: 'FanCentro' }, { name: 'ManyVids' }, { name: 'Passes' }, { name: 'Playboy' },
|
|
||||||
]
|
|
||||||
@@ -1,714 +0,0 @@
|
|||||||
/* hairline kernel sha256:346b48bdef2cdfafd5343eba01494255cf75f9c078e6fcd1aafc62bab62980a1 */
|
|
||||||
/*
|
|
||||||
* HL: everything a figure may call. Read this index; the code under it is the
|
|
||||||
* package's src/core, unchanged, and a figure should not need to read it.
|
|
||||||
*
|
|
||||||
* Every figure is drawn in a 400 × 320 viewBox. World space is x/y on the
|
|
||||||
* ground and z up. Plates are filled with the ground colour and painted back
|
|
||||||
* to front, so a nearer one covers a farther one: append in that order. At
|
|
||||||
* the default camera, Cam(45, 0.5, S), +x runs down to the right and +y down
|
|
||||||
* to the left, so the corner with the largest x and y is nearest the viewer:
|
|
||||||
* append by ascending x + y, from the far corner (smallest x and y) to it.
|
|
||||||
*
|
|
||||||
* Camera
|
|
||||||
* Cam(azDeg, k, S) a camera: azimuth in degrees, k = sin(elevation) (0.5 is the 2:1 view), S = scale
|
|
||||||
* fit(C, points, cx, cy) centres the box of [x, y, z] points on (cx, cy); call it once, before proj
|
|
||||||
* it only centres, it never scales: choose S by trying values, with the most extreme pose in points.
|
|
||||||
* The six figures use S 1.42 to 2.12; the boxes they fit come out 230 to 310 wide and 180 to 245 tall
|
|
||||||
* proj(C) returns P(x, y, z), which gives [sx, sy]
|
|
||||||
* unproj(C, sx, sy, z) the world [x, y] under a screen point, on the plane at height z
|
|
||||||
* facing(C) returns front(sample): whether a ring sample faces the camera
|
|
||||||
* Rounded solids
|
|
||||||
* rrect(u0, v0, u1, v1, r, n) a rounded rectangle, as a ring of samples {u, v, nu, nv}
|
|
||||||
* circ(R, n) a circle, as a ring
|
|
||||||
* rings(x0, y0, x1, y1, r, b) [ring, inner]: a rounded footprint and its crease ring, inset by b
|
|
||||||
* r, the corner radius, is cut to half the shorter side. b, the crease's inset in world units
|
|
||||||
* (0.6 to 2.2 in the figures), must stay under half the shorter side or the crease turns inside out
|
|
||||||
* prism(P, front, ring, inner, z0, z1) {sil, crease}: a solid standing from z0 to z1, as two path strings
|
|
||||||
* ringAt(P, ring, z) the ring's points, projected at height z
|
|
||||||
* run(ring, keep) the one cyclic run of samples that pass keep
|
|
||||||
* hull(points) the convex hull of screen points
|
|
||||||
* extremes(P, ring) [left, right, nearest] samples: where dashed drops fall from
|
|
||||||
* fillet(points, radii, n) rounds every vertex of a closed polygon; returns the new points
|
|
||||||
* radii is an array, one radius per vertex, each cut to half its shorter edge; a single number gives NaN.
|
|
||||||
* n is the steps round each corner, default 4: each vertex becomes n + 1 points
|
|
||||||
* ghost(P, front, ring, z0, depth) a reflection's path {d, y0, y1}; reflect() draws it for you
|
|
||||||
* Paths and numbers
|
|
||||||
* poly(points) a closed path string
|
|
||||||
* open(points) an open polyline string
|
|
||||||
* seg(a, b) one segment between two screen points [sx, sy], as its own subpath; project world points with P first
|
|
||||||
* clamp(v, a, b)
|
|
||||||
* lerp(a, b, t)
|
|
||||||
* rad(deg)
|
|
||||||
* r2(n) two decimals
|
|
||||||
* The continuous clock: one spring per moving number
|
|
||||||
* spring(x, opts) at rest on x; write .t to retarget; opts {k, c, m, eps}, default k 100, c 18, m 1
|
|
||||||
* stepS(sp, dt) advances by dt seconds; returns whether it is still moving
|
|
||||||
* The discrete clock: a 700ms tween on (.32, .72, 0, 1)
|
|
||||||
* tween(v, dur) at rest on v; dur defaults to 700 (ms)
|
|
||||||
* tset(tw, to, now, delay) retargets from where it is, after delay ms: the stagger
|
|
||||||
* the same target again does nothing, so calling it on every pointer move is safe
|
|
||||||
* tval(tw, now) its value at now
|
|
||||||
* tdone(tw, now) whether it has landed
|
|
||||||
* bezier(x1, y1, x2, y2) a CSS cubic-bezier, as a function of progress
|
|
||||||
* EASE_LIFT the lift curve itself
|
|
||||||
* reducedMotion() true when the reader asked for less motion; springs and tweens already land at once
|
|
||||||
* setReducedMotion(on) the loop's business, not a figure's
|
|
||||||
* Drawing
|
|
||||||
* mk(tag, attrs, parent) one svg element: the only way a figure makes a node
|
|
||||||
* solid(parent) {g, sil, cr}: a group holding a silhouette path and a crease path
|
|
||||||
* put(solid, paths) writes prism()'s {sil, crease} into solid()'s {sil, cr}: sil into sil, crease into cr
|
|
||||||
* flatDot(parent, C, r, cls) a dot lying on the ground plane; cls is "dot", "dot m" or "dot off"
|
|
||||||
* place(el, point) moves a dot or a circle to [sx, sy]
|
|
||||||
* reflect(svg, parent, P, front, ring, z0, depth) a fading mirror under a solid
|
|
||||||
* fade(svg, y0, y1, a0) a vertical fade, as a mask; returns the value for a mask attribute
|
|
||||||
* Life
|
|
||||||
* register(stage, tick) joins the one frame loop; tick(dt in seconds, now in ms) returns true to ask for another frame; gives {wake, unregister}
|
|
||||||
* pointer(stage, handlers) {move(point), down(point), leave()}, points in viewBox units; returns its disposer
|
|
||||||
* disposer() {add, on, dispose}: collects tear-down, so destroy is bag.dispose
|
|
||||||
* The bench's business, not a figure's
|
|
||||||
* css(lightDark)
|
|
||||||
* inject(root)
|
|
||||||
* tour(stage, stops, onStop) an unseen pointer that walks the stops, [x, y] in viewBox units or null to leave, and gives way to a real one; onStop(i) on each arrival; returns {stop}
|
|
||||||
* LAP the default stops: a diamond around the centre, then a leave
|
|
||||||
*
|
|
||||||
* Classes, on path, polygon, ellipse and line. They are the whole palette; a
|
|
||||||
* figure sets no colour, width or fill of its own.
|
|
||||||
* (none) filled with the ground colour, medium stroke
|
|
||||||
* sil the silhouette's stroke hi the bright stroke: the only highlight
|
|
||||||
* lo the dim stroke nf no fill fo fill only, no stroke
|
|
||||||
* dash a dashed guide
|
|
||||||
* dot a bright dot dot m a medium dot dot off a dim dot
|
|
||||||
*/
|
|
||||||
var HL = (() => {
|
|
||||||
var __defProp = Object.defineProperty;
|
|
||||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
||||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
||||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
||||||
var __export = (target, all) => {
|
|
||||||
for (var name in all)
|
|
||||||
__defProp(target, name, { get: all[name], enumerable: true });
|
|
||||||
};
|
|
||||||
var __copyProps = (to, from, except, desc) => {
|
|
||||||
if (from && typeof from === "object" || typeof from === "function") {
|
|
||||||
for (let key of __getOwnPropNames(from))
|
|
||||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
||||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
||||||
}
|
|
||||||
return to;
|
|
||||||
};
|
|
||||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
||||||
|
|
||||||
// packages/hairline/src/core/kernel.ts
|
|
||||||
var kernel_exports = {};
|
|
||||||
__export(kernel_exports, {
|
|
||||||
Cam: () => Cam,
|
|
||||||
EASE_LIFT: () => EASE_LIFT,
|
|
||||||
LAP: () => LAP,
|
|
||||||
bezier: () => bezier,
|
|
||||||
circ: () => circ,
|
|
||||||
clamp: () => clamp,
|
|
||||||
css: () => css,
|
|
||||||
disposer: () => disposer,
|
|
||||||
extremes: () => extremes,
|
|
||||||
facing: () => facing,
|
|
||||||
fade: () => fade,
|
|
||||||
fillet: () => fillet,
|
|
||||||
fit: () => fit,
|
|
||||||
flatDot: () => flatDot,
|
|
||||||
ghost: () => ghost,
|
|
||||||
hull: () => hull,
|
|
||||||
inject: () => inject,
|
|
||||||
lerp: () => lerp,
|
|
||||||
mk: () => mk,
|
|
||||||
open: () => open,
|
|
||||||
place: () => place,
|
|
||||||
pointer: () => pointer,
|
|
||||||
poly: () => poly,
|
|
||||||
prism: () => prism,
|
|
||||||
proj: () => proj,
|
|
||||||
put: () => put,
|
|
||||||
r2: () => r2,
|
|
||||||
rad: () => rad,
|
|
||||||
reducedMotion: () => reducedMotion,
|
|
||||||
reflect: () => reflect,
|
|
||||||
register: () => register,
|
|
||||||
ringAt: () => ringAt,
|
|
||||||
rings: () => rings,
|
|
||||||
rrect: () => rrect,
|
|
||||||
run: () => run,
|
|
||||||
seg: () => seg,
|
|
||||||
setReducedMotion: () => setReducedMotion,
|
|
||||||
solid: () => solid,
|
|
||||||
spring: () => spring,
|
|
||||||
stepS: () => stepS,
|
|
||||||
tdone: () => tdone,
|
|
||||||
tour: () => tour,
|
|
||||||
tset: () => tset,
|
|
||||||
tval: () => tval,
|
|
||||||
tween: () => tween,
|
|
||||||
unproj: () => unproj
|
|
||||||
});
|
|
||||||
|
|
||||||
// packages/hairline/src/core/iso.ts
|
|
||||||
var clamp = (v, a, b) => Math.max(a, Math.min(b, v));
|
|
||||||
var lerp = (a, b, t) => a + (b - a) * t;
|
|
||||||
var rad = (d) => d * Math.PI / 180;
|
|
||||||
var r2 = (n) => Math.round(n * 100) / 100;
|
|
||||||
var poly = (pts) => "M" + pts.map((p) => r2(p[0]) + " " + r2(p[1])).join("L") + "Z";
|
|
||||||
var seg = (a, b) => `M${r2(a[0])} ${r2(a[1])}L${r2(b[0])} ${r2(b[1])}`;
|
|
||||||
var open = (pts) => pts.length < 2 ? "" : "M" + pts.map((p) => r2(p[0]) + " " + r2(p[1])).join("L");
|
|
||||||
var Cam = (azDeg, k, S) => ({ az: rad(azDeg), k, S, ox: 0, oy: 0 });
|
|
||||||
function proj(C) {
|
|
||||||
const c = Math.cos(C.az), s = Math.sin(C.az), zf = Math.sqrt(1 - C.k * C.k);
|
|
||||||
return (x, y, z) => {
|
|
||||||
const X = x * c - y * s, Y = x * s + y * c;
|
|
||||||
return [C.ox + C.S * X, C.oy + C.S * (Y * C.k - z * zf)];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
function unproj(C, sx, sy, z) {
|
|
||||||
const c = Math.cos(C.az), s = Math.sin(C.az), zf = Math.sqrt(1 - C.k * C.k);
|
|
||||||
const X = (sx - C.ox) / C.S, Y = ((sy - C.oy) / C.S + z * zf) / C.k;
|
|
||||||
return [X * c + Y * s, -X * s + Y * c];
|
|
||||||
}
|
|
||||||
function fit(C, pts, cx, cy) {
|
|
||||||
C.ox = 0;
|
|
||||||
C.oy = 0;
|
|
||||||
const P = proj(C);
|
|
||||||
let a = 1e9, b = -1e9, c = 1e9, d = -1e9;
|
|
||||||
for (const p of pts) {
|
|
||||||
const q = P(p[0], p[1], p[2]);
|
|
||||||
a = Math.min(a, q[0]);
|
|
||||||
b = Math.max(b, q[0]);
|
|
||||||
c = Math.min(c, q[1]);
|
|
||||||
d = Math.max(d, q[1]);
|
|
||||||
}
|
|
||||||
C.ox = cx - (a + b) / 2;
|
|
||||||
C.oy = cy - (c + d) / 2;
|
|
||||||
}
|
|
||||||
function rrect(u0, v0, u1, v1, r, n = 4) {
|
|
||||||
r = Math.max(0, Math.min(r, (u1 - u0) / 2, (v1 - v0) / 2));
|
|
||||||
const out = [];
|
|
||||||
for (const [cu, cv, a0] of [[u1 - r, v1 - r, 0], [u0 + r, v1 - r, 90], [u0 + r, v0 + r, 180], [u1 - r, v0 + r, 270]])
|
|
||||||
for (let k = 0; k <= n; k++) {
|
|
||||||
const a = rad(a0 + 90 * k / n), ca = Math.cos(a), sa = Math.sin(a);
|
|
||||||
out.push({ u: cu + r * ca, v: cv + r * sa, nu: ca, nv: sa });
|
|
||||||
}
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
function circ(R, n = 96) {
|
|
||||||
const out = [];
|
|
||||||
for (let k = 0; k < n; k++) {
|
|
||||||
const a = k / n * Math.PI * 2, ca = Math.cos(a), sa = Math.sin(a);
|
|
||||||
out.push({ u: R * ca, v: R * sa, nu: ca, nv: sa });
|
|
||||||
}
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
function hull(input) {
|
|
||||||
const pts = input.slice().sort((a, b) => a[0] - b[0] || a[1] - b[1]);
|
|
||||||
const x = (o, a, b) => (a[0] - o[0]) * (b[1] - o[1]) - (a[1] - o[1]) * (b[0] - o[0]);
|
|
||||||
const lo = [], up = [];
|
|
||||||
for (const p of pts) {
|
|
||||||
while (lo.length > 1 && x(lo[lo.length - 2], lo[lo.length - 1], p) <= 0) lo.pop();
|
|
||||||
lo.push(p);
|
|
||||||
}
|
|
||||||
for (let i = pts.length - 1; i >= 0; i--) {
|
|
||||||
const p = pts[i];
|
|
||||||
while (up.length > 1 && x(up[up.length - 2], up[up.length - 1], p) <= 0) up.pop();
|
|
||||||
up.push(p);
|
|
||||||
}
|
|
||||||
lo.pop();
|
|
||||||
up.pop();
|
|
||||||
return lo.concat(up);
|
|
||||||
}
|
|
||||||
var ringAt = (P, ring, z) => ring.map((q) => P(q.u, q.v, z));
|
|
||||||
var facing = (C) => {
|
|
||||||
const s = Math.sin(C.az), c = Math.cos(C.az);
|
|
||||||
return (q) => q.nu * s + q.nv * c >= -1e-6;
|
|
||||||
};
|
|
||||||
function run(ring, keep) {
|
|
||||||
const n = ring.length;
|
|
||||||
let s = -1;
|
|
||||||
for (let i = 0; i < n; i++) if (keep(ring[i]) && !keep(ring[(i + n - 1) % n])) {
|
|
||||||
s = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (s < 0) return keep(ring[0]) ? ring.slice() : [];
|
|
||||||
const out = [];
|
|
||||||
for (let k = 0; k < n && keep(ring[(s + k) % n]); k++) out.push(ring[(s + k) % n]);
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
function prism(P, front, ring, inner, z0, z1) {
|
|
||||||
return {
|
|
||||||
sil: poly(hull(ringAt(P, ring, z1).concat(ringAt(P, ring, z0)))),
|
|
||||||
crease: inner ? open(ringAt(P, run(inner, front), z1)) : ""
|
|
||||||
};
|
|
||||||
}
|
|
||||||
var rings = (x0, y0, x1, y1, r, b) => [
|
|
||||||
rrect(x0, y0, x1, y1, r),
|
|
||||||
rrect(x0 + b, y0 + b, x1 - b, y1 - b, Math.max(0.3, r - b))
|
|
||||||
];
|
|
||||||
function extremes(P, ring) {
|
|
||||||
const pr = ring.map((q) => P(q.u, q.v, 0));
|
|
||||||
let a = 0, b = 0, c = 0;
|
|
||||||
pr.forEach((p, k) => {
|
|
||||||
if (p[0] < pr[a][0]) a = k;
|
|
||||||
if (p[0] > pr[b][0]) b = k;
|
|
||||||
if (p[1] > pr[c][1]) c = k;
|
|
||||||
});
|
|
||||||
return [ring[a], ring[b], ring[c]];
|
|
||||||
}
|
|
||||||
function fillet(pts, rs, n = 4) {
|
|
||||||
const m = pts.length, out = [];
|
|
||||||
for (let i = 0; i < m; i++) {
|
|
||||||
const a = pts[(i + m - 1) % m], p = pts[i], b = pts[(i + 1) % m];
|
|
||||||
const la = Math.hypot(a[0] - p[0], a[1] - p[1]), lb = Math.hypot(b[0] - p[0], b[1] - p[1]);
|
|
||||||
const t = Math.min(rs[i], la / 2, lb / 2);
|
|
||||||
const p1 = [p[0] + (a[0] - p[0]) / la * t, p[1] + (a[1] - p[1]) / la * t];
|
|
||||||
const p2 = [p[0] + (b[0] - p[0]) / lb * t, p[1] + (b[1] - p[1]) / lb * t];
|
|
||||||
for (let k = 0; k <= n; k++) {
|
|
||||||
const s = k / n, w = 1 - s;
|
|
||||||
out.push([w * w * p1[0] + 2 * w * s * p[0] + s * s * p2[0], w * w * p1[1] + 2 * w * s * p[1] + s * s * p2[1]]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
function ghost(P, front, ring, z0, depth) {
|
|
||||||
const f = run(ring, front), lowP = ringAt(P, f, z0 - depth);
|
|
||||||
return {
|
|
||||||
d: open(lowP) + [f[0], f[f.length - 1]].map((q) => seg(P(q.u, q.v, z0), P(q.u, q.v, z0 - depth))).join(""),
|
|
||||||
y0: Math.min(...ringAt(P, f, z0).map((p) => p[1])),
|
|
||||||
y1: Math.max(...lowP.map((p) => p[1])) + 2
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// packages/hairline/src/core/motion.ts
|
|
||||||
var reduced = false;
|
|
||||||
var setReducedMotion = (on) => {
|
|
||||||
reduced = on;
|
|
||||||
};
|
|
||||||
var reducedMotion = () => reduced;
|
|
||||||
function spring(x, o = {}) {
|
|
||||||
return { x, v: 0, t: x, k: o.k ?? 100, c: o.c ?? 18, m: o.m ?? 1, eps: o.eps ?? 0.01 };
|
|
||||||
}
|
|
||||||
function stepS(sp, dt) {
|
|
||||||
if (reduced) {
|
|
||||||
sp.x = sp.t;
|
|
||||||
sp.v = 0;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
const n = Math.max(1, Math.ceil(dt * 240)), h = dt / n;
|
|
||||||
for (let i = 0; i < n; i++) {
|
|
||||||
const a = (-sp.k * (sp.x - sp.t) - sp.c * sp.v) / sp.m;
|
|
||||||
sp.v += a * h;
|
|
||||||
sp.x += sp.v * h;
|
|
||||||
}
|
|
||||||
if (Math.abs(sp.x - sp.t) < sp.eps && Math.abs(sp.v) < sp.eps * 10) {
|
|
||||||
sp.x = sp.t;
|
|
||||||
sp.v = 0;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
function bezier(x1, y1, x2, y2) {
|
|
||||||
const cx = 3 * x1, bx = 3 * (x2 - x1) - cx, ax = 1 - cx - bx;
|
|
||||||
const cy = 3 * y1, by = 3 * (y2 - y1) - cy, ay = 1 - cy - by;
|
|
||||||
const X = (u) => ((ax * u + bx) * u + cx) * u;
|
|
||||||
const Y = (u) => ((ay * u + by) * u + cy) * u;
|
|
||||||
const dX = (u) => (3 * ax * u + 2 * bx) * u + cx;
|
|
||||||
return (t) => {
|
|
||||||
if (t <= 0) return 0;
|
|
||||||
if (t >= 1) return 1;
|
|
||||||
let u = t;
|
|
||||||
for (let i = 0; i < 8; i++) {
|
|
||||||
const e = X(u) - t;
|
|
||||||
if (Math.abs(e) < 1e-5) break;
|
|
||||||
const d = dX(u);
|
|
||||||
if (Math.abs(d) < 1e-6) break;
|
|
||||||
u -= e / d;
|
|
||||||
}
|
|
||||||
if (!(u >= 0 && u <= 1) || Math.abs(X(u) - t) > 1e-4) {
|
|
||||||
let lo = 0, hi = 1;
|
|
||||||
u = t;
|
|
||||||
for (let i = 0; i < 24; i++) {
|
|
||||||
if (X(u) < t) lo = u;
|
|
||||||
else hi = u;
|
|
||||||
u = (lo + hi) / 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return Y(u);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
var EASE_LIFT = bezier(0.32, 0.72, 0, 1);
|
|
||||||
var tween = (v, dur = 700) => ({ from: v, to: v, t0: -1e9, dur });
|
|
||||||
var tval = (tw, now) => {
|
|
||||||
const p = clamp((now - tw.t0) / tw.dur, 0, 1);
|
|
||||||
return tw.from + (tw.to - tw.from) * (reduced ? 1 : EASE_LIFT(p));
|
|
||||||
};
|
|
||||||
var tset = (tw, to, now, delay) => {
|
|
||||||
if (tw.to === to) return;
|
|
||||||
tw.from = tval(tw, now);
|
|
||||||
tw.to = to;
|
|
||||||
tw.t0 = now + delay;
|
|
||||||
};
|
|
||||||
var tdone = (tw, now) => reduced || now >= tw.t0 + tw.dur;
|
|
||||||
|
|
||||||
// packages/hairline/src/core/stage.ts
|
|
||||||
var NS = "http://www.w3.org/2000/svg";
|
|
||||||
function mk(tag, attrs, parent) {
|
|
||||||
const e = document.createElementNS(NS, tag);
|
|
||||||
if (attrs) for (const k in attrs) e.setAttribute(k, String(attrs[k]));
|
|
||||||
if (parent) parent.appendChild(e);
|
|
||||||
return e;
|
|
||||||
}
|
|
||||||
function solid(parent) {
|
|
||||||
const g = mk("g", {}, parent);
|
|
||||||
return { g, sil: mk("path", { class: "sil" }, g), cr: mk("path", { class: "nf lo" }, g) };
|
|
||||||
}
|
|
||||||
var put = (el, s) => {
|
|
||||||
el.sil.setAttribute("d", s.sil);
|
|
||||||
el.cr.setAttribute("d", s.crease);
|
|
||||||
};
|
|
||||||
var flatDot = (parent, C, r, cls) => mk("ellipse", { rx: r2(r * C.S), ry: r2(r * C.S * C.k), class: cls }, parent);
|
|
||||||
var place = (el, q) => {
|
|
||||||
el.setAttribute("cx", String(r2(q[0])));
|
|
||||||
el.setAttribute("cy", String(r2(q[1])));
|
|
||||||
};
|
|
||||||
var fid = 0;
|
|
||||||
function fade(svg, y0, y1, a0 = 0.7) {
|
|
||||||
const id = "hl-fd" + ++fid, defs = mk("defs", {}, svg);
|
|
||||||
const lg = mk("linearGradient", { id: id + "g", gradientUnits: "userSpaceOnUse", x1: 0, y1: r2(y0), x2: 0, y2: r2(y1) }, defs);
|
|
||||||
mk("stop", { offset: 0, "stop-color": "#fff", "stop-opacity": a0 }, lg);
|
|
||||||
mk("stop", { offset: 1, "stop-color": "#fff", "stop-opacity": 0 }, lg);
|
|
||||||
const m = mk("mask", { id, maskUnits: "userSpaceOnUse", x: 0, y: 0, width: 400, height: 320 }, defs);
|
|
||||||
mk("rect", { x: 0, y: 0, width: 400, height: 320, fill: `url(#${id}g)` }, m);
|
|
||||||
return `url(#${id})`;
|
|
||||||
}
|
|
||||||
function reflect(svg, parent, P, front, ring, z0, depth) {
|
|
||||||
const r = ghost(P, front, ring, z0, depth);
|
|
||||||
const gh = mk("g", { class: "ghost", mask: fade(svg, r.y0, r.y1) }, parent);
|
|
||||||
mk("path", { d: r.d }, gh);
|
|
||||||
}
|
|
||||||
var boards = [];
|
|
||||||
var byStage = /* @__PURE__ */ new Map();
|
|
||||||
var raf = 0;
|
|
||||||
var last = 0;
|
|
||||||
var io = null;
|
|
||||||
var rm = null;
|
|
||||||
function frame() {
|
|
||||||
const now = performance.now();
|
|
||||||
const dt = Math.min(0.05, Math.max(0, (now - last) / 1e3));
|
|
||||||
last = now;
|
|
||||||
let any = false;
|
|
||||||
for (const b of boards.slice()) if (b.vis && b.awake) {
|
|
||||||
try {
|
|
||||||
b.awake = !!b.tick(dt, now);
|
|
||||||
} catch (err) {
|
|
||||||
b.awake = false;
|
|
||||||
setTimeout(() => {
|
|
||||||
throw err;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
any = any || b.awake;
|
|
||||||
}
|
|
||||||
raf = any ? requestAnimationFrame(frame) : 0;
|
|
||||||
}
|
|
||||||
function wake(b) {
|
|
||||||
b.awake = true;
|
|
||||||
if (!raf) {
|
|
||||||
last = performance.now();
|
|
||||||
raf = requestAnimationFrame(frame);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var onMotion = () => {
|
|
||||||
setReducedMotion(!!rm?.matches);
|
|
||||||
boards.forEach(wake);
|
|
||||||
};
|
|
||||||
function start() {
|
|
||||||
if (io) return;
|
|
||||||
io = new IntersectionObserver((es) => {
|
|
||||||
for (const e of es) {
|
|
||||||
const set = byStage.get(e.target);
|
|
||||||
if (!set) continue;
|
|
||||||
for (const b of set) {
|
|
||||||
b.vis = e.isIntersecting;
|
|
||||||
if (b.vis) wake(b);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, { rootMargin: "80px" });
|
|
||||||
rm = matchMedia("(prefers-reduced-motion: reduce)");
|
|
||||||
setReducedMotion(rm.matches);
|
|
||||||
rm.addEventListener("change", onMotion);
|
|
||||||
}
|
|
||||||
function stop() {
|
|
||||||
if (raf) cancelAnimationFrame(raf);
|
|
||||||
raf = 0;
|
|
||||||
io?.disconnect();
|
|
||||||
io = null;
|
|
||||||
rm?.removeEventListener("change", onMotion);
|
|
||||||
rm = null;
|
|
||||||
}
|
|
||||||
function register(stage, tick) {
|
|
||||||
start();
|
|
||||||
const b = { stage, tick, vis: false, awake: true };
|
|
||||||
boards.push(b);
|
|
||||||
const peers = byStage.get(stage);
|
|
||||||
if (peers) {
|
|
||||||
for (const p of peers) b.vis = p.vis;
|
|
||||||
peers.add(b);
|
|
||||||
if (b.vis) wake(b);
|
|
||||||
} else {
|
|
||||||
byStage.set(stage, /* @__PURE__ */ new Set([b]));
|
|
||||||
io.observe(stage);
|
|
||||||
}
|
|
||||||
tick(0, performance.now());
|
|
||||||
let gone = false;
|
|
||||||
return {
|
|
||||||
wake: () => {
|
|
||||||
if (!gone) wake(b);
|
|
||||||
},
|
|
||||||
unregister: () => {
|
|
||||||
if (gone) return;
|
|
||||||
gone = true;
|
|
||||||
boards = boards.filter((x) => x !== b);
|
|
||||||
const set = byStage.get(stage);
|
|
||||||
if (set) {
|
|
||||||
set.delete(b);
|
|
||||||
if (!set.size) {
|
|
||||||
byStage.delete(stage);
|
|
||||||
io?.unobserve(stage);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!boards.length) stop();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
var handlers = /* @__PURE__ */ new WeakMap();
|
|
||||||
var touring = /* @__PURE__ */ new WeakMap();
|
|
||||||
function pointer(stage, on) {
|
|
||||||
handlers.set(stage, on);
|
|
||||||
let tm = 0;
|
|
||||||
const pt = (e) => {
|
|
||||||
const r = stage.getBoundingClientRect();
|
|
||||||
return [(e.clientX - r.left) / r.width * 400, (e.clientY - r.top) / r.height * 320];
|
|
||||||
};
|
|
||||||
const move = (e) => {
|
|
||||||
clearTimeout(tm);
|
|
||||||
touring.get(stage)?.hold();
|
|
||||||
on.move(pt(e), e);
|
|
||||||
};
|
|
||||||
const down = (e) => {
|
|
||||||
clearTimeout(tm);
|
|
||||||
touring.get(stage)?.hold();
|
|
||||||
if (e.pointerType !== "mouse") stage.releasePointerCapture?.(e.pointerId);
|
|
||||||
if (on.down) on.down(pt(e), e);
|
|
||||||
else on.move(pt(e), e);
|
|
||||||
};
|
|
||||||
const leave = (e) => {
|
|
||||||
clearTimeout(tm);
|
|
||||||
tm = window.setTimeout(() => {
|
|
||||||
on.leave(e);
|
|
||||||
touring.get(stage)?.release();
|
|
||||||
}, e.pointerType === "mouse" ? 0 : 1400);
|
|
||||||
};
|
|
||||||
stage.addEventListener("pointermove", move);
|
|
||||||
stage.addEventListener("pointerdown", down);
|
|
||||||
stage.addEventListener("pointerleave", leave);
|
|
||||||
return () => {
|
|
||||||
clearTimeout(tm);
|
|
||||||
if (handlers.get(stage) === on) handlers.delete(stage);
|
|
||||||
stage.removeEventListener("pointermove", move);
|
|
||||||
stage.removeEventListener("pointerdown", down);
|
|
||||||
stage.removeEventListener("pointerleave", leave);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
var LAP = [[128, 150], [200, 118], [272, 150], [200, 206], null];
|
|
||||||
var TRAVEL = 900;
|
|
||||||
var DWELL = 1200;
|
|
||||||
var REST = 1800;
|
|
||||||
var RESUME = 1200;
|
|
||||||
var STAGGER = 450;
|
|
||||||
var GHOST = { pointerType: "ghost" };
|
|
||||||
var started = 0;
|
|
||||||
function entry([x, y]) {
|
|
||||||
const dx = x - 200, dy = y - 160;
|
|
||||||
if (!dx && !dy) return [200, 320];
|
|
||||||
const k = Math.min(dx ? (dx > 0 ? 200 : -200) / dx : Infinity, dy ? (dy > 0 ? 160 : -160) / dy : Infinity);
|
|
||||||
return [200 + dx * k, 160 + dy * k];
|
|
||||||
}
|
|
||||||
function tour(stage, stops, onStop) {
|
|
||||||
let i = 0;
|
|
||||||
let wait = RESUME + STAGGER * (started++ % 4);
|
|
||||||
let t = -1;
|
|
||||||
let at = null;
|
|
||||||
let origin = [200, 320];
|
|
||||||
let hand = false, keys = stage.contains(stage.ownerDocument.activeElement);
|
|
||||||
let gone = false;
|
|
||||||
const leave = () => {
|
|
||||||
at = null;
|
|
||||||
t = -1;
|
|
||||||
handlers.get(stage)?.leave(GHOST);
|
|
||||||
};
|
|
||||||
const tick = (dt) => {
|
|
||||||
if (hand || keys || !stops.length) return false;
|
|
||||||
if (reducedMotion()) {
|
|
||||||
if (at) leave();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (wait > 0) {
|
|
||||||
wait -= dt * 1e3;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
const stop2 = stops[i];
|
|
||||||
if (stop2 === null) {
|
|
||||||
if (at) leave();
|
|
||||||
onStop?.(i);
|
|
||||||
i = (i + 1) % stops.length;
|
|
||||||
wait = REST;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
const h = handlers.get(stage);
|
|
||||||
if (!h) return true;
|
|
||||||
if (t < 0) {
|
|
||||||
origin = at ?? entry(stop2);
|
|
||||||
t = 0;
|
|
||||||
}
|
|
||||||
t = Math.min(TRAVEL, t + dt * 1e3);
|
|
||||||
const k = EASE_LIFT(t / TRAVEL);
|
|
||||||
at = [origin[0] + (stop2[0] - origin[0]) * k, origin[1] + (stop2[1] - origin[1]) * k];
|
|
||||||
h.move(at, GHOST);
|
|
||||||
if (t < TRAVEL) return true;
|
|
||||||
onStop?.(i);
|
|
||||||
i = (i + 1) % stops.length;
|
|
||||||
t = -1;
|
|
||||||
wait = DWELL;
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
const take = () => {
|
|
||||||
at = null;
|
|
||||||
t = -1;
|
|
||||||
};
|
|
||||||
const give = () => {
|
|
||||||
if (hand || keys) return;
|
|
||||||
i = 0;
|
|
||||||
t = -1;
|
|
||||||
wait = RESUME;
|
|
||||||
board.wake();
|
|
||||||
};
|
|
||||||
const me = {
|
|
||||||
hold: () => {
|
|
||||||
hand = true;
|
|
||||||
take();
|
|
||||||
},
|
|
||||||
release: () => {
|
|
||||||
if (!hand) return;
|
|
||||||
hand = false;
|
|
||||||
give();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const focusIn = () => {
|
|
||||||
keys = true;
|
|
||||||
take();
|
|
||||||
};
|
|
||||||
const focusOut = (e) => {
|
|
||||||
if (keys && !stage.contains(e.relatedTarget)) {
|
|
||||||
keys = false;
|
|
||||||
give();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
stage.addEventListener("focusin", focusIn);
|
|
||||||
stage.addEventListener("focusout", focusOut);
|
|
||||||
touring.set(stage, me);
|
|
||||||
const board = register(stage, tick);
|
|
||||||
return {
|
|
||||||
stop: () => {
|
|
||||||
if (gone) return;
|
|
||||||
gone = true;
|
|
||||||
board.unregister();
|
|
||||||
stage.removeEventListener("focusin", focusIn);
|
|
||||||
stage.removeEventListener("focusout", focusOut);
|
|
||||||
if (touring.get(stage) === me) touring.delete(stage);
|
|
||||||
if (at) leave();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
function disposer() {
|
|
||||||
let fns = [];
|
|
||||||
return {
|
|
||||||
add: (fn) => {
|
|
||||||
fns.push(fn);
|
|
||||||
},
|
|
||||||
on: (target, type, fn, opts) => {
|
|
||||||
const h = fn;
|
|
||||||
target.addEventListener(type, h, opts);
|
|
||||||
fns.push(() => target.removeEventListener(type, h, opts));
|
|
||||||
},
|
|
||||||
dispose: () => {
|
|
||||||
const run2 = fns;
|
|
||||||
fns = [];
|
|
||||||
for (let i = run2.length - 1; i >= 0; i--) run2[i]();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// packages/hairline/src/core/styles.ts
|
|
||||||
var LIGHT = { plate: "#ffffff", hi: "#232327", edge: "#a4a4ac", mid: "#c3c3c9", lo: "#e0e0e4" };
|
|
||||||
var DARK = { plate: "#08090a", hi: "#d0d6e0", edge: "#5b5d64", mid: "#3e3e44", lo: "#29292d" };
|
|
||||||
var KEYS = ["plate", "hi", "edge", "mid", "lo"];
|
|
||||||
var vars = (p) => KEYS.map((k) => `--hl-${k}:var(--hairline-${k},${p[k]});`).join("");
|
|
||||||
var EASE = "cubic-bezier(0.5,0,0.1,1)";
|
|
||||||
var SVG = ":where([data-hairline]>svg)";
|
|
||||||
function css(lightDark) {
|
|
||||||
const both = Object.fromEntries(KEYS.map((k) => [k, `light-dark(${LIGHT[k]},${DARK[k]})`]));
|
|
||||||
return [
|
|
||||||
// the box, and the palette: light unless something below says otherwise
|
|
||||||
`:where([data-hairline]){display:block;position:relative;aspect-ratio:5/4;touch-action:pan-y;user-select:none;-webkit-user-select:none;--hl-sw:var(--hairline-stroke,0.9);${vars(LIGHT)}}`,
|
|
||||||
// the page's color-scheme
|
|
||||||
lightDark ? `:where([data-hairline]){${vars(both)}}` : "",
|
|
||||||
// an ancestor that says dark
|
|
||||||
`:where(.dark,[data-theme="dark"]) :where([data-hairline]){${vars(DARK)}}`,
|
|
||||||
// the figure's own theme option
|
|
||||||
`:where([data-hairline][data-hairline-theme="light"]){${vars(LIGHT)}}`,
|
|
||||||
`:where([data-hairline][data-hairline-theme="dark"]){${vars(DARK)}}`,
|
|
||||||
`:where([data-hairline]:focus-visible){outline:1.5px solid var(--hl-hi);outline-offset:2px}`,
|
|
||||||
`${SVG}{position:absolute;inset:0;width:100%;height:100%;display:block}`,
|
|
||||||
// Riffle's live region: read, not seen
|
|
||||||
`:where([data-hairline]>[data-hairline-live]){position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}`,
|
|
||||||
// the drawing: plates are filled with the plate colour and painted back to front
|
|
||||||
`${SVG} :where(path,polygon,ellipse,line){fill:var(--hl-plate);stroke:var(--hl-mid);stroke-width:var(--hl-sw);vector-effect:non-scaling-stroke;stroke-linejoin:round;stroke-linecap:round;transition:stroke 260ms ${EASE}}`,
|
|
||||||
`${SVG} :where(.nf){fill:none}`,
|
|
||||||
`${SVG} :where(.fo){stroke:none}`,
|
|
||||||
`${SVG} :where(.sil){stroke:var(--hl-edge)}`,
|
|
||||||
`${SVG} :where(.hi){stroke:var(--hl-hi)}`,
|
|
||||||
`${SVG} :where(.lo){stroke:var(--hl-lo)}`,
|
|
||||||
`${SVG} :where(.dash){stroke-dasharray:1 3}`,
|
|
||||||
`${SVG} :where(.dot){stroke:none;fill:var(--hl-hi);transition:fill 260ms ${EASE}}`,
|
|
||||||
`${SVG} :where(.dot.m){fill:var(--hl-edge)}`,
|
|
||||||
`${SVG} :where(.dot.off){fill:var(--hl-lo)}`,
|
|
||||||
`${SVG} :where(.ghost path){fill:none;stroke:var(--hl-mid)}`
|
|
||||||
].join("");
|
|
||||||
}
|
|
||||||
var done = /* @__PURE__ */ new WeakSet();
|
|
||||||
function inject(root) {
|
|
||||||
if (done.has(root)) return;
|
|
||||||
done.add(root);
|
|
||||||
const doc = root.nodeType === 9 ? root : root.ownerDocument;
|
|
||||||
const win = doc.defaultView;
|
|
||||||
const text = css(!!win?.CSS?.supports?.("color", "light-dark(#000,#fff)"));
|
|
||||||
if (win && "adoptedStyleSheets" in root) {
|
|
||||||
try {
|
|
||||||
const sheet = new win.CSSStyleSheet();
|
|
||||||
sheet.replaceSync(text);
|
|
||||||
root.adoptedStyleSheets = [...root.adoptedStyleSheets, sheet];
|
|
||||||
return;
|
|
||||||
} catch {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const style = doc.createElement("style");
|
|
||||||
style.setAttribute("data-hairline-style", "");
|
|
||||||
style.textContent = text;
|
|
||||||
(root.nodeType === 9 ? doc.head ?? doc.documentElement : root).appendChild(style);
|
|
||||||
}
|
|
||||||
return __toCommonJS(kernel_exports);
|
|
||||||
})();
|
|
||||||
/* /hairline kernel */
|
|
||||||
@@ -1,125 +0,0 @@
|
|||||||
/**
|
|
||||||
* Padlock: an unlocked padlock standing on its reflection. At rest it is ajar,
|
|
||||||
* the shackle lifted out of its hole and turned a little, as in the ofsaver
|
|
||||||
* mark. As the pointer comes closer the shackle rises the rest of the way and
|
|
||||||
* swings open round its long leg, away to the back, on one spring. The
|
|
||||||
* keyhole is the bright mark at rest; once the lock is open the bright goes to
|
|
||||||
* the shackle. The slider is the reach, in viewBox units.
|
|
||||||
*
|
|
||||||
* The pattern: one continuous value. A spring, a falloff by distance measured
|
|
||||||
* from a fixed point on the resting body, and a rest that is a composition.
|
|
||||||
*/
|
|
||||||
const {
|
|
||||||
Cam, clamp, facing, fit, lerp, poly, prism, proj, rad, rings, rrect, ringAt, seg, spring, stepS,
|
|
||||||
disposer, mk, place, pointer, put, reflect, register, solid,
|
|
||||||
} = HL;
|
|
||||||
|
|
||||||
const W = 64, D = 26, H = 48, BR = 9, BB = 1.8; // the body: footprint W × D, height H
|
|
||||||
const A = 13, RC = (W - 2 * A) / 2, T = 3.4, TK = 2.2; // the shackle: legs at A and W − A, half width T, half depth TK
|
|
||||||
const LEG = 12, LMAX = 12, TH = 78; // straight leg above the body, the lift, the widest swing
|
|
||||||
const YC = D / 2, REST = 0.4;
|
|
||||||
|
|
||||||
/** The shackle's band as a closed outline in its own plane: u along the span from the long leg, w up. */
|
|
||||||
function band(lift) {
|
|
||||||
const z1 = H + LEG + lift, bl = H, br = H + lift, pts = [];
|
|
||||||
const arc = (r, a0, a1) => { for (let k = 0; k <= 12; k++) { const a = rad(lerp(a0, a1, k / 12)); pts.push([RC + r * Math.cos(a), z1 + r * Math.sin(a)]); } };
|
|
||||||
pts.push([-T, bl]);
|
|
||||||
arc(RC + T, 180, 0);
|
|
||||||
pts.push([2 * RC + T, br], [2 * RC - T, br]);
|
|
||||||
arc(RC - T, 0, 180);
|
|
||||||
pts.push([T, bl]);
|
|
||||||
return pts;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Lift first, then the swing: what a real shackle does once the key turns. */
|
|
||||||
const lift = (o) => LMAX * clamp(o / 0.45, 0, 1);
|
|
||||||
const swing = (o) => -TH * clamp((o - 0.25) / 0.75, 0, 1);
|
|
||||||
|
|
||||||
function mount({ stage, svg, read }, value) {
|
|
||||||
const bag = disposer();
|
|
||||||
let reach = value;
|
|
||||||
|
|
||||||
// Fitted to the widest pose: shackle fully up and swung out towards the viewer.
|
|
||||||
const C = Cam(45, 0.5, 2.08);
|
|
||||||
const top = H + LEG + LMAX + RC + T;
|
|
||||||
fit(C, [[0, 0, 0], [W, D, 0], [W, 0, 0], [0, D, 0], [A, YC, top], [W - A + T, YC, top - RC],
|
|
||||||
[A, YC - 2 * RC - T, H + LEG + LMAX], [A - T, YC - RC, top], [A, YC, -16]], 200, 166);
|
|
||||||
const P = proj(C), front = facing(C);
|
|
||||||
|
|
||||||
const g = mk("g", {}, svg);
|
|
||||||
const [ring, inner] = rings(0, 0, W, D, BR, BB);
|
|
||||||
reflect(svg, g, P, front, ring, 0, 16);
|
|
||||||
|
|
||||||
// The body, with its two shackle holes on the top and the keyhole on the near face.
|
|
||||||
const body = solid(g);
|
|
||||||
put(body, prism(P, front, ring, inner, 0, H));
|
|
||||||
const hole = rrect(W - A - T - 0.6, YC - TK - 0.6, W - A + T + 0.6, YC + TK + 0.6, 2.2, 3);
|
|
||||||
mk("path", { d: poly(ringAt(P, hole, H)), class: "nf lo" }, g);
|
|
||||||
const kz = H * 0.56, ky = D;
|
|
||||||
mk("path", { d: seg(P(W / 2, ky, kz - 2), P(W / 2, ky, kz - 11)), class: "nf" }, g);
|
|
||||||
const key = mk("circle", { r: 2.1, class: "dot" }, g);
|
|
||||||
place(key, P(W / 2, ky, kz));
|
|
||||||
|
|
||||||
// The shackle: two outlines of the band, a tube's depth apart. Whichever faces the camera is painted last.
|
|
||||||
const sh = mk("g", {}, g);
|
|
||||||
const back = mk("path", { class: "lo" }, sh), face = mk("path", { class: "sil" }, sh);
|
|
||||||
|
|
||||||
const o = spring(REST, { eps: 0.002 });
|
|
||||||
let drawn = NaN;
|
|
||||||
|
|
||||||
function draw() {
|
|
||||||
if (Math.abs(o.x - drawn) < 1e-4) return;
|
|
||||||
drawn = o.x;
|
|
||||||
const th = rad(swing(o.x)), c = Math.cos(th), s = Math.sin(th);
|
|
||||||
const pts = band(lift(o.x));
|
|
||||||
// the band's normal; facing the camera when it points towards +x +y
|
|
||||||
const nx = -s, ny = c, near = nx + ny >= 0 ? 1 : -1;
|
|
||||||
const at = (k) => pts.map(([u, w]) => P(A + u * c + k * nx * TK, YC + u * s + k * ny * TK, w));
|
|
||||||
back.setAttribute("d", poly(at(-near)));
|
|
||||||
face.setAttribute("d", poly(at(near)));
|
|
||||||
}
|
|
||||||
|
|
||||||
const B = register(stage, (dt) => { const m = stepS(o, dt); draw(); return m; });
|
|
||||||
bag.add(B.unregister);
|
|
||||||
draw();
|
|
||||||
|
|
||||||
// Distance is measured from a fixed point on the resting body, so the swing never moves the target.
|
|
||||||
const mid = P(W / 2, YC, H * 0.6);
|
|
||||||
let lit = false;
|
|
||||||
function aim(target) {
|
|
||||||
o.t = target;
|
|
||||||
const open = target > 0.72;
|
|
||||||
if (open !== lit) {
|
|
||||||
lit = open;
|
|
||||||
face.classList.toggle("hi", open);
|
|
||||||
key.setAttribute("class", open ? "dot m" : "dot");
|
|
||||||
}
|
|
||||||
read.textContent = target === REST ? "rest" : "open " + Math.round(-swing(target)) + "°";
|
|
||||||
B.wake();
|
|
||||||
}
|
|
||||||
|
|
||||||
function move([x, y]) {
|
|
||||||
const d = Math.hypot(x - mid[0], y - mid[1]) / reach;
|
|
||||||
// full inside a third of the reach, easing down to ajar at its edge, and no further
|
|
||||||
const k = d <= 0.33 ? 1 : d >= 1 ? 0 : 1 - (d - 0.33) / 0.67;
|
|
||||||
aim(Math.round(lerp(REST, 1, k * k * (3 - 2 * k)) * 100) / 100);
|
|
||||||
}
|
|
||||||
|
|
||||||
aim(REST);
|
|
||||||
bag.add(pointer(stage, { move, leave: () => aim(REST) }));
|
|
||||||
bag.add(() => svg.replaceChildren());
|
|
||||||
|
|
||||||
return {
|
|
||||||
set: (v) => { reach = v; },
|
|
||||||
destroy: bag.dispose,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
hairline({
|
|
||||||
name: "padlock",
|
|
||||||
means: "An unlocked padlock, ajar at rest: as the pointer comes closer, the shackle lifts and swings wide open.",
|
|
||||||
rules: [1, 3, 5, 8],
|
|
||||||
range: [90, 150, 220],
|
|
||||||
tour: [[330, 70], [270, 120], [210, 150], null],
|
|
||||||
mount,
|
|
||||||
});
|
|
||||||
217
src/install.css
217
src/install.css
@@ -1,217 +0,0 @@
|
|||||||
/* -------------------------------- Install -------------------------------- */
|
|
||||||
.install { padding: 128px 0; }
|
|
||||||
.install__grid {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(3, 1fr);
|
|
||||||
gap: 16px;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
.install__step {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
border-radius: 16px;
|
|
||||||
background: var(--raised);
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.install__media {
|
|
||||||
position: relative;
|
|
||||||
height: 248px;
|
|
||||||
padding: 24px 24px 0;
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-end;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.install__media .scene { width: 100%; }
|
|
||||||
.install__copy { padding: 24px; }
|
|
||||||
.install__n { display: block; margin-bottom: 8px; font-size: 12px; color: var(--accent-ink); }
|
|
||||||
.install__copy h3 { font-size: 20px; line-height: 28px; font-weight: 500; letter-spacing: -0.01em; }
|
|
||||||
.install__copy p { margin-top: 8px; font-size: 14px; line-height: 20px; color: var(--text-2); text-wrap: pretty; }
|
|
||||||
|
|
||||||
.install__foot { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 48px; text-align: center; }
|
|
||||||
.install__note { max-width: 32rem; font-size: 14px; line-height: 20px; color: var(--text-3); text-wrap: pretty; }
|
|
||||||
.install__note strong { font-weight: 500; color: var(--text-2); }
|
|
||||||
|
|
||||||
/* A small browser window, cut off by the card's bottom edge */
|
|
||||||
.iw {
|
|
||||||
border-radius: 12px 12px 0 0;
|
|
||||||
background: var(--card);
|
|
||||||
border: 1px solid var(--line);
|
|
||||||
border-bottom: 0;
|
|
||||||
box-shadow: 0 8px 24px rgba(11, 22, 32, .06);
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.iw__bar { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--bg); }
|
|
||||||
.iw__bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--raised-2); }
|
|
||||||
.iw__bar .mono { margin-left: 8px; font-size: 11px; color: var(--text-3); }
|
|
||||||
.iw__body { position: relative; height: 192px; padding: 16px; }
|
|
||||||
|
|
||||||
/* Shared switch, Chrome style */
|
|
||||||
.toggle {
|
|
||||||
position: relative;
|
|
||||||
flex: none;
|
|
||||||
width: 28px;
|
|
||||||
height: 16px;
|
|
||||||
border-radius: 8px;
|
|
||||||
background: var(--raised-2);
|
|
||||||
transition: background-color 300ms var(--ease);
|
|
||||||
}
|
|
||||||
.toggle span {
|
|
||||||
position: absolute;
|
|
||||||
top: 2px;
|
|
||||||
left: 2px;
|
|
||||||
width: 12px;
|
|
||||||
height: 12px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: #fff;
|
|
||||||
box-shadow: 0 1px 2px rgba(11, 22, 32, .2);
|
|
||||||
transition: transform 300ms var(--ease);
|
|
||||||
}
|
|
||||||
.toggle.is-on { background: var(--accent); }
|
|
||||||
.toggle.is-on span { transform: translateX(12px); }
|
|
||||||
|
|
||||||
/* 1. Download */
|
|
||||||
.dl__btn {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 8px;
|
|
||||||
height: 32px;
|
|
||||||
padding: 0 12px;
|
|
||||||
border-radius: 8px;
|
|
||||||
background: var(--accent);
|
|
||||||
color: #fff;
|
|
||||||
font-weight: 500;
|
|
||||||
transition: transform 200ms var(--ease), background-color 200ms var(--ease);
|
|
||||||
}
|
|
||||||
.dl__btn.is-pressed { background: var(--accent-hover); transform: scale(.97); }
|
|
||||||
.dl__shelf {
|
|
||||||
margin-top: 16px;
|
|
||||||
border-radius: 8px;
|
|
||||||
border: 1px solid var(--line);
|
|
||||||
background: var(--card);
|
|
||||||
box-shadow: 0 8px 24px rgba(11, 22, 32, .08);
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(8px);
|
|
||||||
transition: opacity 400ms var(--ease), transform 400ms var(--ease);
|
|
||||||
}
|
|
||||||
.dl__shelf.is-in { opacity: 1; transform: none; }
|
|
||||||
.dl__row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; }
|
|
||||||
.dl__row--folder {
|
|
||||||
border-top: 1px solid var(--line);
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(4px);
|
|
||||||
transition: opacity 400ms var(--ease), transform 400ms var(--ease);
|
|
||||||
}
|
|
||||||
.dl__row--folder.is-in { opacity: 1; transform: none; }
|
|
||||||
.dl__icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: var(--raised); color: var(--text-2); flex: none; }
|
|
||||||
.dl__icon--folder { background: var(--brand-wash); color: var(--accent-ink); }
|
|
||||||
.dl__name { display: flex; flex-direction: column; min-width: 0; line-height: 16px; }
|
|
||||||
.dl__name strong { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
||||||
.dl__name .mono { font-size: 11px; color: var(--text-3); }
|
|
||||||
.dl__track { margin-left: auto; flex: none; width: 48px; height: 4px; border-radius: 2px; background: var(--raised); overflow: hidden; }
|
|
||||||
.dl__track span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
|
|
||||||
.dl__track.is-running span { transform: scaleX(1); transition: transform 1500ms var(--ease); }
|
|
||||||
.dl__track.is-full span { transform: scaleX(1); background: var(--positive); }
|
|
||||||
.dl__ok { margin-left: auto; flex: none; color: var(--positive); }
|
|
||||||
|
|
||||||
/* 2. Developer mode */
|
|
||||||
.ext__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 28px; }
|
|
||||||
.ext__title { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
|
|
||||||
.ext__dev { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); white-space: nowrap; }
|
|
||||||
.ext__tools {
|
|
||||||
display: flex;
|
|
||||||
gap: 8px;
|
|
||||||
margin-top: 12px;
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(-4px);
|
|
||||||
transition: opacity 300ms var(--ease), transform 300ms var(--ease);
|
|
||||||
}
|
|
||||||
.ext__tools.is-in { opacity: 1; transform: none; }
|
|
||||||
.ext__tool {
|
|
||||||
padding: 4px 8px;
|
|
||||||
border-radius: 6px;
|
|
||||||
border: 1px solid var(--line-strong);
|
|
||||||
color: var(--accent-ink);
|
|
||||||
font-size: 12px;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
.ext__tool:first-child { background: var(--brand-wash); border-color: transparent; }
|
|
||||||
.ext__ghost { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
|
|
||||||
.ext__ghost span { height: 64px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); }
|
|
||||||
|
|
||||||
.dev__cursor { top: 26px; right: 18px; transition: transform 600ms var(--ease), opacity 300ms var(--ease); }
|
|
||||||
.dev__cursor.is-idle { transform: translate(-64px, 96px); opacity: 0; }
|
|
||||||
.dev__cursor.is-aim { transform: none; opacity: 1; }
|
|
||||||
.dev__cursor.is-press { transform: scale(.88); opacity: 1; }
|
|
||||||
.dev__cursor.is-on { transform: translate(24px, 48px); opacity: 0; }
|
|
||||||
|
|
||||||
/* 3. Drag and drop */
|
|
||||||
.drop__zone {
|
|
||||||
position: absolute;
|
|
||||||
inset: 16px;
|
|
||||||
display: grid;
|
|
||||||
place-items: center;
|
|
||||||
border-radius: 8px;
|
|
||||||
border: 1.5px dashed var(--line-strong);
|
|
||||||
color: var(--text-3);
|
|
||||||
transition: border-color 300ms var(--ease), background-color 300ms var(--ease), color 300ms var(--ease), opacity 300ms var(--ease);
|
|
||||||
}
|
|
||||||
.drop__zone.is-hot { border-color: var(--accent); background: var(--brand-wash); color: var(--accent-ink); }
|
|
||||||
.drop__zone.is-gone { opacity: 0; }
|
|
||||||
|
|
||||||
.ext__card {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 12px;
|
|
||||||
padding: 12px;
|
|
||||||
border-radius: 8px;
|
|
||||||
border: 1px solid var(--line);
|
|
||||||
background: var(--card);
|
|
||||||
box-shadow: 0 8px 24px rgba(11, 22, 32, .06);
|
|
||||||
opacity: 0;
|
|
||||||
transform: scale(.96);
|
|
||||||
transition: opacity 400ms var(--ease), transform 500ms var(--ease);
|
|
||||||
}
|
|
||||||
.ext__card.is-in { opacity: 1; transform: none; }
|
|
||||||
.ext__card img { width: 32px; height: 32px; border-radius: 8px; flex: none; }
|
|
||||||
.ext__card-name { display: flex; flex-direction: column; min-width: 0; line-height: 16px; }
|
|
||||||
.ext__card-name strong { font-weight: 500; }
|
|
||||||
.ext__card-name strong .mono { font-weight: 400; color: var(--text-3); }
|
|
||||||
.ext__card-name > span { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
||||||
.ext__card .toggle { margin-left: auto; }
|
|
||||||
|
|
||||||
.drag__chip {
|
|
||||||
position: absolute;
|
|
||||||
left: 50%;
|
|
||||||
top: 50%;
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 8px;
|
|
||||||
padding: 6px 12px;
|
|
||||||
border-radius: 8px;
|
|
||||||
background: var(--card);
|
|
||||||
border: 1px solid var(--line-strong);
|
|
||||||
box-shadow: 0 12px 24px rgba(11, 22, 32, .14);
|
|
||||||
color: var(--text);
|
|
||||||
font-weight: 500;
|
|
||||||
white-space: nowrap;
|
|
||||||
transition: transform 600ms var(--ease), opacity 300ms var(--ease);
|
|
||||||
}
|
|
||||||
.drag__chip svg:first-child { color: var(--accent-ink); }
|
|
||||||
.drag__chip.is-idle { transform: translate(calc(-50% - 96px), calc(-50% + 112px)); opacity: 0; }
|
|
||||||
.drag__chip.is-lift { transform: translate(calc(-50% - 72px), calc(-50% + 48px)) rotate(-3deg); opacity: 1; }
|
|
||||||
.drag__chip.is-drag { transform: translate(-50%, -50%) rotate(-2deg); opacity: 1; }
|
|
||||||
.drag__chip.is-drop,
|
|
||||||
.drag__chip.is-installed { transform: translate(-50%, -50%) scale(.8); opacity: 0; }
|
|
||||||
.drag__cursor { right: -8px; bottom: -12px; transition: none; }
|
|
||||||
|
|
||||||
@media (prefers-reduced-motion: reduce) {
|
|
||||||
.install * { transition: none !important; }
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 860px) {
|
|
||||||
.install { padding: 96px 0; }
|
|
||||||
.install__grid { grid-template-columns: 1fr; }
|
|
||||||
.install__media { height: 232px; }
|
|
||||||
}
|
|
||||||
12
src/main.jsx
12
src/main.jsx
@@ -1,12 +0,0 @@
|
|||||||
import { StrictMode } from 'react'
|
|
||||||
import { createRoot } from 'react-dom/client'
|
|
||||||
import App from './App.jsx'
|
|
||||||
import './styles.css'
|
|
||||||
import './scenes.css'
|
|
||||||
import './install.css'
|
|
||||||
|
|
||||||
createRoot(document.getElementById('root')).render(
|
|
||||||
<StrictMode>
|
|
||||||
<App />
|
|
||||||
</StrictMode>,
|
|
||||||
)
|
|
||||||
202
src/scenes.css
202
src/scenes.css
@@ -1,202 +0,0 @@
|
|||||||
/* --------------------------- Product scenes ----------------------------- */
|
|
||||||
.scene { position: relative; font-size: 13px; color: var(--text); text-align: left; }
|
|
||||||
.scene .mono { font-size: 12px; }
|
|
||||||
.cursor { position: absolute; z-index: 3; pointer-events: none; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .2)); transition: transform 500ms var(--ease); }
|
|
||||||
|
|
||||||
/* Shared: our pill, a button, a saved check */
|
|
||||||
.kpill {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 8px;
|
|
||||||
min-width: 212px;
|
|
||||||
height: 36px;
|
|
||||||
padding: 0 12px;
|
|
||||||
border-radius: 10px;
|
|
||||||
background: var(--accent);
|
|
||||||
color: #fff;
|
|
||||||
font-weight: 500;
|
|
||||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
|
|
||||||
transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease);
|
|
||||||
}
|
|
||||||
.kpill--sm { min-width: 0; height: 32px; }
|
|
||||||
.kpill__meta { margin-left: auto; opacity: .72; }
|
|
||||||
.kpill.is-pressed { background: var(--accent-hover); transform: scale(.97); }
|
|
||||||
.kpill--saved { background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
|
|
||||||
.kpill--saved svg { color: var(--positive); }
|
|
||||||
.kpill--saved .kpill__meta { color: var(--text-3); opacity: 1; }
|
|
||||||
|
|
||||||
.ring { transform: rotate(-90deg); }
|
|
||||||
.ring circle { fill: none; stroke-width: 2; }
|
|
||||||
.ring__track { stroke: rgba(255, 255, 255, .3); }
|
|
||||||
.ring__fill { stroke: #fff; stroke-dasharray: 100; stroke-linecap: round; }
|
|
||||||
|
|
||||||
.kbtn {
|
|
||||||
display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; margin-left: auto;
|
|
||||||
border-radius: 8px; background: var(--accent); color: #fff;
|
|
||||||
transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease);
|
|
||||||
}
|
|
||||||
.kbtn.is-pressed { transform: scale(.97); background: var(--accent-hover); }
|
|
||||||
.kbtn--done { background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
|
|
||||||
.kbtn--done svg { color: var(--positive); }
|
|
||||||
|
|
||||||
.pf__avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; background: linear-gradient(140deg, #d9b8a4, #a9806c); }
|
|
||||||
.pf__check {
|
|
||||||
position: absolute; right: 6px; bottom: 6px; width: 20px; height: 20px; border-radius: 50%;
|
|
||||||
display: grid; place-items: center; background: #fff; color: var(--positive);
|
|
||||||
opacity: 0; transform: scale(.6); transition: opacity 200ms var(--ease), transform 200ms var(--ease);
|
|
||||||
}
|
|
||||||
.is-saved > .pf__check { opacity: 1; transform: none; }
|
|
||||||
|
|
||||||
/* ======================= Right in the toolbar ======================= */
|
|
||||||
.tb { width: min(100%, 440px); margin: 0 auto; }
|
|
||||||
.tb__post { border-radius: 14px; background: var(--card); border: 1px solid var(--line); padding: 12px; box-shadow: 0 8px 24px rgba(11, 22, 32, .06); }
|
|
||||||
.tb__media { position: relative; height: 132px; border-radius: 8px; }
|
|
||||||
.tb__dur { position: absolute; right: 8px; bottom: 8px; padding: 2px 6px; border-radius: 4px; background: rgba(10, 24, 36, .6); color: #fff; }
|
|
||||||
.tb__bar { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
|
|
||||||
.tb__icons { display: flex; gap: 16px; color: var(--text-3); }
|
|
||||||
.tb__cursor { right: 40px; bottom: -8px; transform: translate(60px, 40px); opacity: 0; transition: transform 600ms var(--ease), opacity 300ms var(--ease); }
|
|
||||||
.tb__cursor.is-aim, .tb__cursor.is-press, .tb__cursor.is-saving { transform: translate(0, 0); opacity: 1; }
|
|
||||||
.tb__cursor.is-press { transform: translate(0, 0) scale(.88); }
|
|
||||||
.tb__cursor.is-saving { transform: translate(28px, 36px); opacity: 0; }
|
|
||||||
|
|
||||||
/* ========================= Pick your quality ======================== */
|
|
||||||
.qs { width: min(100%, 400px); margin: 0 auto; }
|
|
||||||
.qs__menu { padding: 4px; border-radius: 14px; background: var(--card); border: 1px solid var(--line-strong); box-shadow: 0 12px 32px rgba(11, 22, 32, .08); }
|
|
||||||
.qs__label { display: flex; justify-content: space-between; padding: 8px 8px 4px; font-size: 12px; color: var(--text-3); }
|
|
||||||
.qs__row {
|
|
||||||
display: grid; grid-template-columns: 72px 1fr 64px; align-items: center; gap: 12px;
|
|
||||||
height: 40px; margin-top: 4px; padding: 0 12px; border-radius: 10px;
|
|
||||||
transition: background-color 200ms var(--ease);
|
|
||||||
}
|
|
||||||
.qs__row.is-active { background: var(--raised); }
|
|
||||||
.qs__name { font-weight: 500; }
|
|
||||||
.qs__size { text-align: right; color: var(--text-3); }
|
|
||||||
.qs__track { height: 6px; border-radius: 3px; background: var(--raised-2); overflow: hidden; }
|
|
||||||
.qs__track span { display: block; height: 100%; background: var(--text-3); border-radius: 3px; transform-origin: left; opacity: .45; transition: background-color 200ms var(--ease), opacity 200ms var(--ease); }
|
|
||||||
.qs__row.is-active .qs__track span { background: var(--brand); opacity: 1; }
|
|
||||||
.qs__row.is-active .qs__size { color: var(--text); }
|
|
||||||
.qs__out { display: flex; align-items: center; gap: 8px; margin-top: 4px; padding: 12px; border-top: 1px solid var(--line); color: var(--text-2); }
|
|
||||||
.qs__out svg { color: var(--text-3); }
|
|
||||||
.qs__file { animation: rise 300ms var(--ease); }
|
|
||||||
.qs__cursor { left: 56%; top: 46px; }
|
|
||||||
|
|
||||||
/* ====================== Whole profiles in one go ===================== */
|
|
||||||
.pf { width: min(100%, 440px); margin: 0 auto; padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(11, 22, 32, .06); }
|
|
||||||
.pf__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
|
|
||||||
.pf__who { display: grid; line-height: 18px; }
|
|
||||||
.pf__who strong { font-weight: 500; }
|
|
||||||
.pf__who .mono { color: var(--text-3); }
|
|
||||||
.pf__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
|
|
||||||
.pf__tile { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; }
|
|
||||||
.pf__tile::after { content: ''; position: absolute; inset: 0; background: rgba(245, 248, 251, .0); transition: background-color 200ms var(--ease); }
|
|
||||||
.pf__tile.is-saved::after { background: rgba(245, 248, 251, .28); }
|
|
||||||
.pf__tile > * { z-index: 1; }
|
|
||||||
.pf__dur { position: absolute; left: 6px; bottom: 6px; padding: 1px 4px; border-radius: 4px; background: rgba(10, 24, 36, .55); color: #fff; font-size: 11px !important; }
|
|
||||||
.pf__lock { position: absolute; left: 6px; top: 6px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: rgba(10, 24, 36, .55); color: #fff; }
|
|
||||||
|
|
||||||
/* =================== Saved, and it stays marked =================== */
|
|
||||||
.nm { width: min(100%, 460px); margin: 0 auto; }
|
|
||||||
.nm__path {
|
|
||||||
display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 12px;
|
|
||||||
border-radius: 12px; background: var(--card); border: 1px solid var(--line);
|
|
||||||
}
|
|
||||||
.nm__sep { color: var(--text-3); padding: 0 2px; }
|
|
||||||
.nm__tok { position: relative; display: inline-grid; }
|
|
||||||
.nm__tok > span { grid-area: 1 / 1; padding: 2px 6px; border-radius: 6px; white-space: nowrap; transition: opacity 250ms var(--ease), transform 250ms var(--ease); }
|
|
||||||
.nm__from { background: var(--raised); color: var(--text-2); }
|
|
||||||
.nm__to { background: rgba(2, 175, 242, .08); color: var(--accent-ink); opacity: 0; transform: translateY(6px); }
|
|
||||||
.nm__tok.is-on .nm__from { opacity: 0; transform: translateY(-6px); }
|
|
||||||
.nm__tok.is-on .nm__to { opacity: 1; transform: none; }
|
|
||||||
.nm__list { margin-top: 12px; padding: 4px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(11, 22, 32, .06); }
|
|
||||||
.nm__crumb { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; font-size: 12px; color: var(--text-3); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
|
|
||||||
.nm__slash { opacity: .6; }
|
|
||||||
.nm__row { display: grid; grid-template-columns: 16px 1fr auto 16px; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border-radius: 8px; color: var(--text-2); }
|
|
||||||
.nm__row svg { color: var(--text-3); }
|
|
||||||
.nm__row svg:last-child { color: var(--positive); }
|
|
||||||
.nm__row .mono { color: var(--text-3); }
|
|
||||||
.nm__row--new { opacity: 0; transform: translateY(-6px); transition: opacity 300ms var(--ease), transform 300ms var(--ease), background-color 300ms var(--ease); }
|
|
||||||
.nm__row--new.is-in { opacity: 1; transform: none; background: var(--raised); color: var(--text); }
|
|
||||||
.nm__row--new.is-in svg:first-child { color: var(--accent); }
|
|
||||||
|
|
||||||
/* ========================== Showcase stage =========================== */
|
|
||||||
.stage { position: absolute; inset: 32px 32px 0; border-radius: 14px 14px 0 0; background: var(--card); border: 1px solid var(--line-strong); border-bottom: 0; overflow: hidden; box-shadow: 0 24px 48px -24px rgba(11, 22, 32, .2); }
|
|
||||||
.stage__bar { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-bottom: 1px solid var(--line); }
|
|
||||||
.stage__bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--raised-2); }
|
|
||||||
.stage__bar .mono { margin-left: auto; margin-right: auto; font-size: 12px; color: var(--text-3); transform: translateX(-12px); }
|
|
||||||
.stage__scene { position: absolute; inset: 36px 0 0; padding: 24px; opacity: 0; transition: opacity 300ms var(--ease); }
|
|
||||||
.stage__scene.is-active { opacity: 1; }
|
|
||||||
|
|
||||||
/* Chat */
|
|
||||||
.ch__head { display: flex; align-items: center; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
|
|
||||||
.ch__head strong { font-weight: 500; }
|
|
||||||
.ch__online { width: 6px; height: 6px; border-radius: 50%; background: var(--positive); }
|
|
||||||
.ch__meta { color: var(--text-3); }
|
|
||||||
.ch__body { display: grid; gap: 8px; padding-top: 16px; }
|
|
||||||
.ch__bubble { max-width: 75%; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: var(--raised); color: var(--text-2); }
|
|
||||||
.ch__bubble--me { justify-self: end; border-radius: 14px 14px 4px 14px; background: var(--text); color: var(--bg); }
|
|
||||||
.ch__media { width: 82%; padding: 6px; border-radius: 14px; background: var(--raised); }
|
|
||||||
.ch__tiles { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 4px; height: 196px; }
|
|
||||||
.ch__tile { position: relative; border-radius: 8px; overflow: hidden; }
|
|
||||||
.ch__tile:first-child { grid-row: 1 / 3; }
|
|
||||||
.ch__actions { display: flex; align-items: center; justify-content: space-between; padding: 8px 4px 2px; }
|
|
||||||
.ch__time { color: var(--text-3); }
|
|
||||||
|
|
||||||
/* DRM */
|
|
||||||
.dr__video { position: relative; height: 140px; border-radius: 10px; }
|
|
||||||
.dr__badge {
|
|
||||||
position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
|
|
||||||
border-radius: 13px; background: rgba(10, 24, 36, .62); color: #fff; font-size: 12px;
|
|
||||||
transition: background-color 300ms var(--ease);
|
|
||||||
}
|
|
||||||
.dr__badge.is-open { background: rgba(22, 120, 70, .78); }
|
|
||||||
.dr__steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 2px; }
|
|
||||||
.dr__steps li { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 10px; height: 32px; padding: 0 8px; border-radius: 8px; color: var(--text-3); transition: color 200ms var(--ease), background-color 200ms var(--ease); }
|
|
||||||
.dr__steps li .mono { color: var(--text-3); }
|
|
||||||
.dr__steps li.is-now { background: var(--raised); color: var(--text); }
|
|
||||||
.dr__steps li.is-done { color: var(--text-2); }
|
|
||||||
.dr__dot { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--positive); }
|
|
||||||
.is-now .dr__dot { border-color: var(--accent); box-shadow: inset 0 0 0 4px var(--card), inset 0 0 0 9px var(--accent); }
|
|
||||||
.is-done .dr__dot { border-color: transparent; background: rgba(22, 163, 74, .12); }
|
|
||||||
.dr__file {
|
|
||||||
display: flex; align-items: center; gap: 8px; margin-top: 12px; height: 44px; padding: 0 12px;
|
|
||||||
border-radius: 10px; background: var(--d-bg); color: var(--d-text);
|
|
||||||
opacity: 0; transform: translateY(6px); transition: opacity 300ms var(--ease), transform 300ms var(--ease);
|
|
||||||
}
|
|
||||||
.dr__file.is-in { opacity: 1; transform: none; }
|
|
||||||
.dr__file svg { color: var(--accent); }
|
|
||||||
.dr__meta { margin-left: auto; color: var(--d-text-3); }
|
|
||||||
|
|
||||||
/* Bulk */
|
|
||||||
.bk__head { display: flex; align-items: center; gap: 12px; }
|
|
||||||
.bk__head > span:last-child { display: grid; line-height: 18px; }
|
|
||||||
.bk__head strong { font-weight: 500; }
|
|
||||||
.bk__head .mono { color: var(--text-3); }
|
|
||||||
.bk__count { margin-top: 32px; font-size: 56px !important; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
|
|
||||||
.bk__count span { font-size: 20px; color: var(--text-3); letter-spacing: 0; }
|
|
||||||
.bk__bar { height: 8px; margin-top: 16px; border-radius: 4px; background: var(--raised-2); overflow: hidden; }
|
|
||||||
.bk__bar span, .bk__mini span { display: block; height: 100%; background: var(--brand); transform-origin: left; border-radius: inherit; }
|
|
||||||
.bk__types { display: grid; gap: 8px; margin-top: 24px; }
|
|
||||||
.bk__type { display: grid; grid-template-columns: 64px 1fr 96px; align-items: center; gap: 12px; color: var(--text-2); }
|
|
||||||
.bk__type .mono { text-align: right; color: var(--text-3); font-variant-numeric: tabular-nums; }
|
|
||||||
.bk__mini { height: 4px; border-radius: 2px; background: var(--raised-2); overflow: hidden; }
|
|
||||||
.bk__mini span { background: var(--text-3); }
|
|
||||||
.bk__now { display: flex; align-items: center; gap: 8px; margin-top: 24px; padding: 12px; border-radius: 10px; background: var(--raised); color: var(--text-2); white-space: nowrap; overflow: hidden; }
|
|
||||||
.bk__now svg { flex: none; color: var(--text-3); }
|
|
||||||
|
|
||||||
@keyframes rise { from { opacity: 0; transform: translateY(4px); } }
|
|
||||||
|
|
||||||
/* Feature cards that hold a scene */
|
|
||||||
.media-scene .feature-card__media { height: auto; min-height: 248px; align-items: center; padding: 32px 24px 40px; margin-inline: -40px; }
|
|
||||||
.media-scene .feature-card__media::after { display: none; }
|
|
||||||
|
|
||||||
@media (prefers-reduced-motion: reduce) {
|
|
||||||
.scene *, .cursor { transition: none !important; animation: none !important; }
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 860px) {
|
|
||||||
.media-scene .feature-card__media { margin-inline: -24px; padding-inline: 16px; }
|
|
||||||
.stage { inset: 16px 16px 0; }
|
|
||||||
.stage__scene { padding: 16px; }
|
|
||||||
.kpill { min-width: 0; }
|
|
||||||
.ch__media { width: 100%; }
|
|
||||||
}
|
|
||||||
960
src/styles.css
960
src/styles.css
@@ -1,960 +0,0 @@
|
|||||||
:root {
|
|
||||||
/* Cool ink ramp, light */
|
|
||||||
--bg: #f5f8fb;
|
|
||||||
--card: #ffffff;
|
|
||||||
--raised: #eaf1f6;
|
|
||||||
--raised-2: #dbe5ee;
|
|
||||||
--line: rgba(11, 22, 32, .08);
|
|
||||||
--line-strong: rgba(11, 22, 32, .14);
|
|
||||||
--text: #0b1620;
|
|
||||||
--text-2: #46566a;
|
|
||||||
--text-3: #5f6f82;
|
|
||||||
|
|
||||||
/* Navy ramp, dark (fact band, DRM card, comparison) */
|
|
||||||
--d-bg: #0a1824;
|
|
||||||
--d-raised: #112536;
|
|
||||||
--d-raised-2: #193247;
|
|
||||||
--d-line: rgba(234, 243, 250, .1);
|
|
||||||
--d-text: #eaf3fa;
|
|
||||||
--d-text-2: #a6b8c9;
|
|
||||||
--d-text-3: #8197ab;
|
|
||||||
|
|
||||||
/* Blue: the bright brand fill, a deeper shade behind white text, and one for blue text */
|
|
||||||
--brand: #02aff2;
|
|
||||||
--brand-wash: #dff3fd;
|
|
||||||
--accent: #007cb8;
|
|
||||||
--accent-hover: #006da3;
|
|
||||||
--accent-ink: #006da3;
|
|
||||||
--positive: #16a34a;
|
|
||||||
--negative: #dc2626;
|
|
||||||
|
|
||||||
--font: 'Geist', system-ui, -apple-system, sans-serif;
|
|
||||||
--mono: 'Geist Mono', ui-monospace, 'SF Mono', monospace;
|
|
||||||
--container: 1120px;
|
|
||||||
--ease: cubic-bezier(.22, 1, .36, 1);
|
|
||||||
--fast: 150ms;
|
|
||||||
}
|
|
||||||
|
|
||||||
*,
|
|
||||||
*::before,
|
|
||||||
*::after { box-sizing: border-box; }
|
|
||||||
|
|
||||||
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
|
|
||||||
|
|
||||||
body {
|
|
||||||
margin: 0;
|
|
||||||
background: var(--bg);
|
|
||||||
color: var(--text);
|
|
||||||
font-family: var(--font);
|
|
||||||
font-size: 16px;
|
|
||||||
line-height: 1.5;
|
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
}
|
|
||||||
|
|
||||||
img, video { display: block; max-width: 100%; }
|
|
||||||
a { color: inherit; text-decoration: none; }
|
|
||||||
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; text-align: left; }
|
|
||||||
h1, h2, h3, p { margin: 0; }
|
|
||||||
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
|
|
||||||
|
|
||||||
.container { width: min(var(--container), calc(100% - 48px)); margin-inline: auto; }
|
|
||||||
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
|
|
||||||
|
|
||||||
/* ------------------------------- Entrance -------------------------------- */
|
|
||||||
.reveal {
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(8px);
|
|
||||||
transition: opacity 400ms var(--ease), transform 400ms var(--ease);
|
|
||||||
}
|
|
||||||
.reveal.is-in { opacity: 1; transform: none; }
|
|
||||||
|
|
||||||
@media (prefers-reduced-motion: reduce) {
|
|
||||||
html { scroll-behavior: auto; }
|
|
||||||
.reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
|
|
||||||
.tab__progress { animation: none !important; }
|
|
||||||
.phone img, .phone video { transition: none !important; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------- Buttons -------------------------------- */
|
|
||||||
.btn {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
gap: 8px;
|
|
||||||
height: 44px;
|
|
||||||
padding: 0 20px;
|
|
||||||
border-radius: 10px;
|
|
||||||
font-size: 15px;
|
|
||||||
font-weight: 500;
|
|
||||||
white-space: nowrap;
|
|
||||||
transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
|
|
||||||
}
|
|
||||||
.btn:active { transform: scale(.98); }
|
|
||||||
.btn__meta { font-weight: 400; opacity: .72; }
|
|
||||||
|
|
||||||
.btn--primary { background: var(--accent); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14); }
|
|
||||||
.btn--primary:hover { background: var(--accent-hover); }
|
|
||||||
|
|
||||||
.btn--secondary { background: var(--card); color: var(--text); border: 1px solid var(--line-strong); }
|
|
||||||
.btn--secondary:hover { background: var(--raised); }
|
|
||||||
|
|
||||||
.btn--ghost { color: var(--text-2); }
|
|
||||||
.btn--ghost:hover { color: var(--text); background: var(--raised); }
|
|
||||||
|
|
||||||
.btn--light { background: var(--d-text); color: var(--d-bg); }
|
|
||||||
.btn--light:hover { background: #fff; }
|
|
||||||
|
|
||||||
.btn--dark { background: var(--text); color: #fff; }
|
|
||||||
.btn--dark:hover { background: #000; }
|
|
||||||
.btn--dark .btn__meta { opacity: .64; }
|
|
||||||
|
|
||||||
.btn--nav { height: 36px; padding: 0 16px; font-size: 14px; border-radius: 8px; background: var(--text); color: var(--bg); }
|
|
||||||
.btn--nav:hover { background: #000; }
|
|
||||||
|
|
||||||
.btn--block { display: flex; width: 100%; }
|
|
||||||
|
|
||||||
/* --------------------------- Section headings ---------------------------- */
|
|
||||||
.eyebrow {
|
|
||||||
display: block;
|
|
||||||
margin-bottom: 12px;
|
|
||||||
font-family: var(--mono);
|
|
||||||
font-size: 13px;
|
|
||||||
color: var(--accent-ink);
|
|
||||||
}
|
|
||||||
.section-heading { text-align: center; margin-bottom: 48px; }
|
|
||||||
.section-heading--left { text-align: left; margin-bottom: 32px; }
|
|
||||||
.section-heading h2 {
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 48px;
|
|
||||||
line-height: 1.08;
|
|
||||||
letter-spacing: -0.025em;
|
|
||||||
}
|
|
||||||
.section-heading .muted { color: var(--text-3); }
|
|
||||||
|
|
||||||
/* ---------------------------------- Nav ---------------------------------- */
|
|
||||||
.nav {
|
|
||||||
position: fixed;
|
|
||||||
inset: 0 0 auto 0;
|
|
||||||
z-index: 50;
|
|
||||||
background: transparent;
|
|
||||||
border-bottom: 1px solid transparent;
|
|
||||||
transition: background-color 200ms var(--ease), border-color 200ms var(--ease);
|
|
||||||
}
|
|
||||||
.nav--scrolled {
|
|
||||||
background: rgba(245, 248, 251, .7);
|
|
||||||
-webkit-backdrop-filter: blur(16px) saturate(1.4);
|
|
||||||
backdrop-filter: blur(16px) saturate(1.4);
|
|
||||||
border-bottom-color: var(--line);
|
|
||||||
}
|
|
||||||
.nav__inner {
|
|
||||||
width: min(var(--container), calc(100% - 48px));
|
|
||||||
height: 64px;
|
|
||||||
margin-inline: auto;
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr auto 1fr;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
.nav__logo { display: inline-flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 500; }
|
|
||||||
.nav__logo img { width: 24px; height: 24px; }
|
|
||||||
.nav__links { display: flex; gap: 32px; font-size: 14px; }
|
|
||||||
.nav__links a { color: var(--text-2); transition: color var(--fast) var(--ease); }
|
|
||||||
.nav__links a:hover { color: var(--text); }
|
|
||||||
.nav .btn--nav { justify-self: end; }
|
|
||||||
.nav__burger { display: none; }
|
|
||||||
|
|
||||||
/* ---------------------------------- Hero --------------------------------- */
|
|
||||||
.hero {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
padding: 176px 24px 0;
|
|
||||||
overflow: hidden;
|
|
||||||
background:
|
|
||||||
radial-gradient(80% 60% at 50% 0%, #ffffff 0, transparent 70%),
|
|
||||||
linear-gradient(#f2fafe 0, var(--brand-wash) 100%);
|
|
||||||
border-bottom: 1px solid var(--line-strong);
|
|
||||||
}
|
|
||||||
.hero__copy { display: flex; flex-direction: column; align-items: center; text-align: center; }
|
|
||||||
.hero__title {
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 76px;
|
|
||||||
line-height: 1.02;
|
|
||||||
letter-spacing: -0.04em;
|
|
||||||
}
|
|
||||||
.hero__title em { font-style: normal; color: var(--accent-ink); }
|
|
||||||
.hero__sub {
|
|
||||||
max-width: 38rem;
|
|
||||||
margin: 24px 0 32px;
|
|
||||||
font-size: 18px;
|
|
||||||
line-height: 28px;
|
|
||||||
color: var(--text-2);
|
|
||||||
}
|
|
||||||
.hero__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
|
|
||||||
.hero__shot { width: min(var(--container), 100%); margin-top: 80px; }
|
|
||||||
|
|
||||||
/* Feed preview: the hero's moment */
|
|
||||||
.preview {
|
|
||||||
height: 560px;
|
|
||||||
overflow: hidden;
|
|
||||||
border-radius: 16px 16px 0 0;
|
|
||||||
border: 1px solid var(--line-strong);
|
|
||||||
border-bottom: 0;
|
|
||||||
background: var(--bg);
|
|
||||||
box-shadow: 0 -8px 48px -16px rgba(11, 22, 32, .16);
|
|
||||||
}
|
|
||||||
.preview__bar {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 16px;
|
|
||||||
height: 44px;
|
|
||||||
padding: 0 16px;
|
|
||||||
background: var(--card);
|
|
||||||
border-bottom: 1px solid var(--line);
|
|
||||||
}
|
|
||||||
.preview__dots { display: flex; gap: 8px; }
|
|
||||||
.preview__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--raised-2); }
|
|
||||||
.preview__url {
|
|
||||||
flex: 0 1 360px;
|
|
||||||
margin-inline: auto;
|
|
||||||
height: 28px;
|
|
||||||
display: grid;
|
|
||||||
place-items: center;
|
|
||||||
border-radius: 8px;
|
|
||||||
background: var(--raised);
|
|
||||||
font-family: var(--mono);
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--text-3);
|
|
||||||
}
|
|
||||||
.preview__body { position: relative; padding: 32px 32px 0; }
|
|
||||||
.feed { width: 560px; margin-inline: auto; display: grid; gap: 16px; }
|
|
||||||
|
|
||||||
.post {
|
|
||||||
position: relative;
|
|
||||||
padding: 16px;
|
|
||||||
border-radius: 14px;
|
|
||||||
background: var(--card);
|
|
||||||
border: 1px solid var(--line);
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
.post__head { display: flex; align-items: center; gap: 12px; font-size: 14px; line-height: 20px; }
|
|
||||||
.post__head strong { display: block; font-weight: 500; }
|
|
||||||
.post__head em { font-style: normal; font-size: 13px; color: var(--text-3); }
|
|
||||||
.avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; }
|
|
||||||
.avatar--a { background: linear-gradient(140deg, #d9b8a4, #a9806c); }
|
|
||||||
.avatar--b { background: linear-gradient(140deg, #b7c3c9, #7e8f98); }
|
|
||||||
.post__text { margin: 12px 0; font-size: 14px; color: var(--text-2); }
|
|
||||||
.post__media { border-radius: 8px; }
|
|
||||||
.post__media--video {
|
|
||||||
position: relative;
|
|
||||||
height: 220px;
|
|
||||||
background:
|
|
||||||
radial-gradient(120% 90% at 78% 18%, rgba(255, 214, 170, .9), transparent 55%),
|
|
||||||
linear-gradient(170deg, #c98f6c 0%, #8d5c4a 55%, #4b3530 100%);
|
|
||||||
}
|
|
||||||
.post__dur {
|
|
||||||
position: absolute;
|
|
||||||
right: 12px;
|
|
||||||
bottom: 12px;
|
|
||||||
padding: 2px 8px;
|
|
||||||
border-radius: 4px;
|
|
||||||
background: rgba(10, 24, 36, .6);
|
|
||||||
color: #fff;
|
|
||||||
font-family: var(--mono);
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
.post__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 4px; margin-top: 12px; }
|
|
||||||
.post__grid .post__media { height: 120px; }
|
|
||||||
.post__media--p1 { background: linear-gradient(160deg, #cfd6d2, #8fa39d 60%, #5f716c); }
|
|
||||||
.post__media--p2 { background: linear-gradient(200deg, #e9d9c4, #c3a586); }
|
|
||||||
.post__media--p3 { background: linear-gradient(170deg, #d8c9cf, #9c8790); }
|
|
||||||
|
|
||||||
.post__bar { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; color: var(--text-3); }
|
|
||||||
.post__icons { display: flex; gap: 16px; }
|
|
||||||
.pill {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 6px;
|
|
||||||
height: 32px;
|
|
||||||
padding: 0 12px;
|
|
||||||
border-radius: 8px;
|
|
||||||
font-size: 13px;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
.pill { transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease); }
|
|
||||||
.pill--open { background: var(--accent); color: #fff; }
|
|
||||||
.pill.is-pressed { background: var(--accent-hover); transform: scale(.98); }
|
|
||||||
.pill--saved { background: var(--raised); color: var(--text-2); }
|
|
||||||
.pill--saved svg { color: var(--positive); }
|
|
||||||
|
|
||||||
.menu {
|
|
||||||
position: absolute;
|
|
||||||
right: 16px;
|
|
||||||
bottom: 56px;
|
|
||||||
width: 248px;
|
|
||||||
padding: 4px;
|
|
||||||
border-radius: 12px;
|
|
||||||
background: var(--card);
|
|
||||||
border: 1px solid var(--line-strong);
|
|
||||||
box-shadow: 0 12px 32px rgba(11, 22, 32, .12);
|
|
||||||
font-size: 13px;
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(6px);
|
|
||||||
transform-origin: bottom right;
|
|
||||||
pointer-events: none;
|
|
||||||
transition: opacity 180ms var(--ease), transform 180ms var(--ease);
|
|
||||||
}
|
|
||||||
.menu.is-open { opacity: 1; transform: none; }
|
|
||||||
.menu__label { padding: 8px 8px 4px; font-size: 12px; color: var(--text-3); }
|
|
||||||
.menu__row {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
height: 32px;
|
|
||||||
padding: 0 8px;
|
|
||||||
border-radius: 8px;
|
|
||||||
}
|
|
||||||
.menu__row .mono { font-size: 12px; color: var(--text-3); }
|
|
||||||
.menu__row { transition: background-color var(--fast) var(--ease); }
|
|
||||||
.menu__row.is-active { background: var(--raised); }
|
|
||||||
|
|
||||||
.toast {
|
|
||||||
position: absolute;
|
|
||||||
right: 32px;
|
|
||||||
top: 32px;
|
|
||||||
width: 280px;
|
|
||||||
padding: 12px;
|
|
||||||
border-radius: 12px;
|
|
||||||
background: var(--d-bg);
|
|
||||||
color: var(--d-text);
|
|
||||||
box-shadow: 0 12px 32px rgba(11, 22, 32, .2);
|
|
||||||
font-size: 13px;
|
|
||||||
text-align: left;
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(-6px);
|
|
||||||
transition: opacity 300ms var(--ease), transform 300ms var(--ease);
|
|
||||||
}
|
|
||||||
.toast.is-in { opacity: 1; transform: none; }
|
|
||||||
.toast__row { display: flex; justify-content: space-between; }
|
|
||||||
.toast__pct { color: var(--d-text-2); font-size: 12px; }
|
|
||||||
.toast__track { height: 4px; margin: 8px 0; border-radius: 2px; background: var(--d-raised-2); overflow: hidden; }
|
|
||||||
.toast__track span { display: block; height: 100%; background: var(--brand); transform-origin: left; }
|
|
||||||
.toast__path { font-size: 12px; color: var(--d-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
||||||
|
|
||||||
/* --------------------------------- Compare ------------------------------ */
|
|
||||||
.compare { padding: 112px 0 32px; }
|
|
||||||
.factband { padding: 48px 0 0; }
|
|
||||||
.facts {
|
|
||||||
display: grid; grid-template-columns: repeat(4, 1fr); padding: 32px 0;
|
|
||||||
border-radius: 20px; background: var(--brand-wash); border: 1px solid rgba(2, 175, 242, .18);
|
|
||||||
}
|
|
||||||
.fact { padding: 0 32px; }
|
|
||||||
.fact + .fact { border-left: 1px solid rgba(0, 109, 163, .14); }
|
|
||||||
.fact__n { display: block; font-size: 48px; font-weight: 500; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: var(--accent-ink); }
|
|
||||||
.fact__n small { font-size: 20px; letter-spacing: -0.02em; color: var(--text-2); }
|
|
||||||
.fact__label { display: block; margin-top: 12px; font-size: 14px; line-height: 20px; color: var(--text-2); max-width: 24ch; }
|
|
||||||
.compare__sub { max-width: 36rem; margin: -24px auto 48px; text-align: center; font-size: 17px; line-height: 26px; color: var(--text-2); }
|
|
||||||
.compare__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; border-radius: 20px; background: var(--raised); }
|
|
||||||
.compare__col { padding: 24px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
|
|
||||||
.compare__col--us { background: var(--d-bg); color: var(--d-text); border-color: transparent; }
|
|
||||||
.compare__head { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); font-weight: 500; }
|
|
||||||
.compare__col--us .compare__head { border-bottom-color: var(--d-line); }
|
|
||||||
.compare__head img { width: 20px; height: 20px; }
|
|
||||||
.compare__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
|
|
||||||
.compare__list li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; font-size: 15px; line-height: 22px; color: var(--text-2); }
|
|
||||||
.compare__list svg { margin-top: 3px; }
|
|
||||||
.compare__col--them svg { color: var(--text-3); }
|
|
||||||
.compare__col--us li { color: var(--d-text); }
|
|
||||||
.compare__col--us svg { color: var(--positive); }
|
|
||||||
|
|
||||||
/* -------------------------------- Showcase ------------------------------- */
|
|
||||||
.showcase {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 560px;
|
|
||||||
gap: 64px;
|
|
||||||
align-items: center;
|
|
||||||
padding: 128px 0;
|
|
||||||
}
|
|
||||||
.tabs { display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
|
|
||||||
.tab {
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
padding: 16px 20px;
|
|
||||||
border-radius: 12px;
|
|
||||||
border: 1px solid transparent;
|
|
||||||
transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease);
|
|
||||||
}
|
|
||||||
.tab:hover { background: var(--raised); }
|
|
||||||
.tab--active, .tab--active:hover { background: var(--card); border-color: var(--line); }
|
|
||||||
.tab__head { display: flex; align-items: center; gap: 12px; font-weight: 500; color: var(--text-2); }
|
|
||||||
.tab__head svg { color: var(--text-3); flex: none; }
|
|
||||||
.tab--active .tab__head { color: var(--text); }
|
|
||||||
.tab__body {
|
|
||||||
display: grid;
|
|
||||||
grid-template-rows: 0fr;
|
|
||||||
transition: grid-template-rows 300ms var(--ease);
|
|
||||||
}
|
|
||||||
.tab__body > span {
|
|
||||||
overflow: hidden;
|
|
||||||
padding-left: 28px;
|
|
||||||
font-size: 14px;
|
|
||||||
line-height: 20px;
|
|
||||||
color: var(--text-2);
|
|
||||||
}
|
|
||||||
.tab--active .tab__body { grid-template-rows: 1fr; }
|
|
||||||
.tab--active .tab__body > span { padding-top: 8px; }
|
|
||||||
.tab__progress {
|
|
||||||
position: absolute;
|
|
||||||
left: 20px;
|
|
||||||
right: 20px;
|
|
||||||
bottom: 0;
|
|
||||||
height: 2px;
|
|
||||||
background: var(--accent);
|
|
||||||
transform-origin: left;
|
|
||||||
animation: tabProgress linear forwards;
|
|
||||||
opacity: .5;
|
|
||||||
}
|
|
||||||
@keyframes tabProgress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
|
|
||||||
|
|
||||||
.showcase__visual {
|
|
||||||
position: relative;
|
|
||||||
height: 540px;
|
|
||||||
border-radius: 16px;
|
|
||||||
overflow: hidden;
|
|
||||||
background: var(--raised);
|
|
||||||
border: 1px solid var(--line);
|
|
||||||
}
|
|
||||||
.phone {
|
|
||||||
position: absolute;
|
|
||||||
left: 50%;
|
|
||||||
top: 48px;
|
|
||||||
width: 300px;
|
|
||||||
height: 100%;
|
|
||||||
transform: translateX(-50%);
|
|
||||||
border-radius: 16px 16px 0 0;
|
|
||||||
background: #f6f6f6;
|
|
||||||
border: 1px solid var(--line-strong);
|
|
||||||
border-bottom: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
box-shadow: 0 24px 48px -24px rgba(11, 22, 32, .2);
|
|
||||||
}
|
|
||||||
.phone__bar { display: flex; gap: 6px; height: 32px; align-items: center; padding: 0 12px; background: var(--card); border-bottom: 1px solid var(--line); }
|
|
||||||
.phone__bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--raised-2); }
|
|
||||||
.phone img {
|
|
||||||
position: absolute;
|
|
||||||
top: 32px;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: auto;
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(8px);
|
|
||||||
transition: opacity 400ms var(--ease), transform 400ms var(--ease);
|
|
||||||
}
|
|
||||||
.phone img.is-active { opacity: 1; transform: none; }
|
|
||||||
.phone video {
|
|
||||||
position: absolute;
|
|
||||||
top: 32px;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: calc(100% - 32px);
|
|
||||||
object-fit: cover;
|
|
||||||
object-position: top;
|
|
||||||
background: #fff;
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(8px);
|
|
||||||
transition: opacity 400ms var(--ease), transform 400ms var(--ease);
|
|
||||||
}
|
|
||||||
.phone video.is-active { opacity: 1; transform: none; }
|
|
||||||
|
|
||||||
/* -------------------------------- Features ------------------------------- */
|
|
||||||
.features { padding-bottom: 96px; }
|
|
||||||
.features__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
|
|
||||||
.feature-card {
|
|
||||||
position: relative;
|
|
||||||
min-height: 480px;
|
|
||||||
padding: 40px 40px 0;
|
|
||||||
border-radius: 16px;
|
|
||||||
background: var(--raised);
|
|
||||||
overflow: hidden;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
.feature-card h3 {
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 32px;
|
|
||||||
line-height: 1.12;
|
|
||||||
letter-spacing: -0.02em;
|
|
||||||
}
|
|
||||||
.feature-card__copy p {
|
|
||||||
margin-top: 12px;
|
|
||||||
max-width: 400px;
|
|
||||||
font-size: 16px;
|
|
||||||
line-height: 24px;
|
|
||||||
color: var(--text-2);
|
|
||||||
}
|
|
||||||
.path {
|
|
||||||
display: inline-block;
|
|
||||||
margin-top: 16px;
|
|
||||||
padding: 4px 8px;
|
|
||||||
border-radius: 6px;
|
|
||||||
background: var(--card);
|
|
||||||
border: 1px solid var(--line);
|
|
||||||
font-family: var(--mono);
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--text-2);
|
|
||||||
}
|
|
||||||
.feature-card__media {
|
|
||||||
position: relative;
|
|
||||||
margin-top: auto;
|
|
||||||
height: 248px;
|
|
||||||
margin-inline: -40px;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
gap: 16px;
|
|
||||||
padding-top: 32px;
|
|
||||||
}
|
|
||||||
.feature-card__media img,
|
|
||||||
.feature-card__media video {
|
|
||||||
width: 336px;
|
|
||||||
height: auto;
|
|
||||||
object-fit: cover;
|
|
||||||
object-position: top;
|
|
||||||
border-radius: 12px;
|
|
||||||
border: 1px solid var(--line);
|
|
||||||
box-shadow: 0 8px 24px rgba(11, 22, 32, .06);
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Live recordings from the extension */
|
|
||||||
.media-clip .feature-card__media { align-items: center; }
|
|
||||||
.media-clip .feature-card__media video { width: min(480px, 100%); border-radius: 14px; }
|
|
||||||
.media-wide .feature-card__media { height: auto; padding-top: 24px; }
|
|
||||||
.media-wide .feature-card__media video { width: min(100%, 500px); border-radius: 14px 14px 0 0; border-bottom: 0; }
|
|
||||||
.media-pair .feature-card__media { justify-content: flex-start; padding-left: 24px; }
|
|
||||||
.media-pair .feature-card__media img { flex: 0 0 336px; }
|
|
||||||
.feature-card__media::after {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
inset: auto 0 0 0;
|
|
||||||
height: 48px;
|
|
||||||
background: linear-gradient(to top, var(--raised), transparent);
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.feature-card--dark {
|
|
||||||
grid-column: 1 / -1;
|
|
||||||
min-height: 0;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: space-between;
|
|
||||||
gap: 48px;
|
|
||||||
padding: 48px;
|
|
||||||
background: var(--d-bg);
|
|
||||||
color: var(--d-text);
|
|
||||||
}
|
|
||||||
.feature-card--dark .feature-card__copy { display: flex; flex-direction: column; align-items: flex-start; }
|
|
||||||
.feature-card--dark .feature-card__copy p { color: var(--d-text-2); margin-bottom: 32px; }
|
|
||||||
.feature-card--dark .btn { margin-top: auto; }
|
|
||||||
.feature-card--dark .feature-card__media { margin: 0; height: auto; padding: 0; flex: 0 0 440px; }
|
|
||||||
.feature-card--dark .feature-card__media::after { display: none; }
|
|
||||||
|
|
||||||
/* Folder tree: the DRM card's moment */
|
|
||||||
.tree {
|
|
||||||
width: 100%;
|
|
||||||
padding: 8px;
|
|
||||||
border-radius: 14px;
|
|
||||||
background: var(--d-raised);
|
|
||||||
border: 1px solid var(--d-line);
|
|
||||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
.tree svg { flex: none; color: var(--d-text-3); }
|
|
||||||
.tree__head {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 8px;
|
|
||||||
height: 36px;
|
|
||||||
padding: 0 8px;
|
|
||||||
color: var(--d-text-2);
|
|
||||||
border-bottom: 1px solid var(--d-line);
|
|
||||||
margin-bottom: 4px;
|
|
||||||
}
|
|
||||||
.tree ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
|
|
||||||
.tree__row {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 8px;
|
|
||||||
height: 32px;
|
|
||||||
padding: 0 8px 0 calc(8px + var(--depth) * 20px);
|
|
||||||
border-radius: 6px;
|
|
||||||
color: var(--d-text);
|
|
||||||
}
|
|
||||||
.tree__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
||||||
.tree__meta { margin-left: auto; font-size: 12px; color: var(--d-text-3); }
|
|
||||||
.tree__row.is-fresh { background: var(--d-raised-2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
|
|
||||||
.tree__row.is-fresh svg { color: var(--accent); }
|
|
||||||
|
|
||||||
/* -------------------------------- Platforms ----------------------------- */
|
|
||||||
.platforms { padding: 32px 0; border-bottom: 1px solid var(--line); }
|
|
||||||
.platforms__inner { display: grid; justify-items: center; gap: 16px; width: min(1280px, calc(100% - 48px)); }
|
|
||||||
.platforms__label { font-size: 12px; color: var(--text-3); }
|
|
||||||
.platforms__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; }
|
|
||||||
.platforms__list li { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--text-3); }
|
|
||||||
.platforms__list li.is-live { color: var(--text); }
|
|
||||||
.platforms__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--raised-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
|
|
||||||
.is-live .platforms__dot { background: var(--positive); box-shadow: 0 0 0 3px rgba(22, 163, 74, .14); }
|
|
||||||
.platforms__list .platforms__soon { padding-left: 16px; border-left: 1px solid var(--line-strong); font-size: 12px; font-weight: 400; color: var(--text-3); }
|
|
||||||
.platforms__runs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
|
|
||||||
.platforms__runs .platforms__label { margin-right: 4px; }
|
|
||||||
.chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 8px; background: var(--card); border: 1px solid var(--line-strong); font-size: 13px; font-weight: 500; }
|
|
||||||
.chip svg { color: var(--accent); }
|
|
||||||
.chip--soon { color: var(--text-2); border-style: dashed; background: transparent; }
|
|
||||||
.chip--soon svg { color: var(--text-3); }
|
|
||||||
.chip .mono { font-size: 11px; font-weight: 400; color: var(--text-3); }
|
|
||||||
|
|
||||||
/* --------------------------------- Mobile ------------------------------- */
|
|
||||||
.mobile { padding: 0 0 128px; }
|
|
||||||
.mobile__card {
|
|
||||||
display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
|
|
||||||
padding: 56px 56px 0; border-radius: 20px; background: var(--raised); overflow: hidden;
|
|
||||||
}
|
|
||||||
.mobile__copy { padding-bottom: 56px; }
|
|
||||||
.mobile__copy h2 { font-weight: 500; font-size: 48px; line-height: 1.08; letter-spacing: -0.025em; }
|
|
||||||
.mobile__copy > p { margin-top: 16px; max-width: 28rem; font-size: 17px; line-height: 26px; color: var(--text-2); }
|
|
||||||
.mobile__list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
|
|
||||||
.mobile__list li { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text-2); }
|
|
||||||
.mobile__list svg { color: var(--positive); }
|
|
||||||
.mobile__note { margin-top: 32px !important; font-size: 12px !important; color: var(--text-3) !important; }
|
|
||||||
.mobile__visual { align-self: end; display: flex; justify-content: center; }
|
|
||||||
.handset {
|
|
||||||
width: 300px; height: 520px; padding: 10px 10px 0; border-radius: 48px 48px 0 0;
|
|
||||||
background: #0b1620; box-shadow: 0 32px 64px -24px rgba(11, 22, 32, .35), inset 0 0 0 1px rgba(255, 255, 255, .08);
|
|
||||||
}
|
|
||||||
.handset__screen { position: relative; height: 100%; border-radius: 38px 38px 0 0; background: var(--bg); overflow: hidden; padding: 0 16px; font-size: 13px; }
|
|
||||||
.handset__status { display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 0 12px; font-size: 12px; }
|
|
||||||
.handset__island { width: 88px; height: 26px; border-radius: 13px; background: #0b1620; }
|
|
||||||
.handset__head { display: flex; align-items: center; gap: 10px; margin: 8px 0 12px; }
|
|
||||||
.handset__head > span:last-child { display: grid; line-height: 18px; }
|
|
||||||
.handset__head strong { font-weight: 500; }
|
|
||||||
.handset__head .mono { font-size: 12px; color: var(--text-3); }
|
|
||||||
.handset__media { position: relative; height: 200px; border-radius: 12px; }
|
|
||||||
.handset__bar { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; color: var(--text-3); }
|
|
||||||
.handset__sheet {
|
|
||||||
position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 12px 24px;
|
|
||||||
border-radius: 20px 20px 0 0; background: var(--card); border-top: 1px solid var(--line);
|
|
||||||
box-shadow: 0 -12px 32px rgba(11, 22, 32, .12);
|
|
||||||
}
|
|
||||||
.handset__grab { display: block; width: 36px; height: 4px; margin: 0 auto 12px; border-radius: 2px; background: var(--raised-2); }
|
|
||||||
.handset__sheet-title { padding: 0 8px 8px; font-weight: 500; }
|
|
||||||
.handset__sheet .menu__row .mono { font-size: 12px; color: var(--text-3); }
|
|
||||||
.handset__dest { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-2); }
|
|
||||||
|
|
||||||
/* --------------------------------- Safety ------------------------------- */
|
|
||||||
.safety { padding: 32px 0 128px; }
|
|
||||||
.safety__top { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: end; margin-bottom: 48px; }
|
|
||||||
.safety__top .section-heading { margin-bottom: 0; }
|
|
||||||
.safety__intro { font-size: 17px; line-height: 26px; color: var(--text-2); }
|
|
||||||
.route {
|
|
||||||
display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
|
|
||||||
padding: 16px; margin-bottom: 16px; border-radius: 16px; border: 1px dashed var(--line-strong);
|
|
||||||
}
|
|
||||||
.route__line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
|
|
||||||
.route__stop { position: relative; display: flex; align-items: center; gap: 12px; padding-right: 32px; }
|
|
||||||
.route__stop strong { display: block; font-weight: 500; font-size: 14px; }
|
|
||||||
.route__stop .mono { font-size: 12px; color: var(--text-3); }
|
|
||||||
.route__icon { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--text); color: var(--bg); }
|
|
||||||
.route__arrow { position: absolute; right: 4px; top: 50%; width: 16px; height: 1px; background: var(--text-3); }
|
|
||||||
.route__arrow::after { content: ''; position: absolute; right: 0; top: -3px; width: 6px; height: 6px; border-top: 1px solid var(--text-3); border-right: 1px solid var(--text-3); transform: rotate(45deg); }
|
|
||||||
.route__stop--never { padding: 8px 16px 8px 8px; border-radius: 12px; background: var(--raised); }
|
|
||||||
.route__stop--never .route__icon { background: var(--card); color: var(--text-3); border: 1px solid var(--line); }
|
|
||||||
.route__stop--never strong { color: var(--text-3); }
|
|
||||||
.route__stop--never .strike { position: absolute; left: 4px; right: 4px; top: 30%; width: calc(100% - 8px); height: 40%; overflow: visible; }
|
|
||||||
.route__stop--never.is-struck .strike path { stroke-dashoffset: 0; }
|
|
||||||
|
|
||||||
.audit { border-radius: 16px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
|
|
||||||
.audit__head, .audit__row { display: grid; grid-template-columns: 1.1fr 1fr 1.2fr; gap: 24px; padding: 0 24px; }
|
|
||||||
.audit__head { height: 44px; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--text-3); background: var(--raised); }
|
|
||||||
.audit__row { padding-top: 20px; padding-bottom: 20px; border-top: 1px solid var(--line); align-items: start; font-size: 15px; line-height: 22px; }
|
|
||||||
.audit__q { display: flex; gap: 12px; font-weight: 500; }
|
|
||||||
.audit__q .mono { font-size: 12px; font-weight: 400; color: var(--text-3); padding-top: 1px; }
|
|
||||||
.audit__flag, .audit__us { display: grid; grid-template-columns: 16px 1fr; gap: 10px; }
|
|
||||||
.audit__flag svg, .audit__us svg { margin-top: 4px; }
|
|
||||||
.audit__flag { color: var(--text-3); }
|
|
||||||
.audit__us { color: var(--text); }
|
|
||||||
.audit__us svg { color: var(--positive); }
|
|
||||||
.audit__row:last-child .audit__us { color: var(--accent-ink); font-weight: 500; }
|
|
||||||
.safety__rule { margin-top: 24px; text-align: center; font-size: 14px; color: var(--text-3); }
|
|
||||||
|
|
||||||
.pricing__sub { max-width: 34rem; margin: -24px auto 48px; text-align: center; font-size: 17px; line-height: 26px; color: var(--text-2); }
|
|
||||||
|
|
||||||
/* --------------------------------- Pricing ------------------------------- */
|
|
||||||
.pricing { padding: 128px 0; border-top: 1px solid var(--line); }
|
|
||||||
.pricing__grid {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(3, 1fr);
|
|
||||||
gap: 16px;
|
|
||||||
align-items: start;
|
|
||||||
}
|
|
||||||
.plan {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
padding: 24px;
|
|
||||||
border-radius: 16px;
|
|
||||||
background: var(--raised);
|
|
||||||
}
|
|
||||||
.plan--featured { background: var(--card); border: 1px solid var(--line-strong); box-shadow: 0 8px 24px rgba(11, 22, 32, .06); }
|
|
||||||
.plan__name { font-size: 15px; font-weight: 500; color: var(--text-2); }
|
|
||||||
.plan--featured .plan__name { color: var(--accent-ink); }
|
|
||||||
.plan__price { display: flex; align-items: baseline; gap: 8px; margin: 16px 0 12px; }
|
|
||||||
.plan__amount { font-size: 48px; font-weight: 500; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
|
|
||||||
.plan__per { font-size: 14px; color: var(--text-3); }
|
|
||||||
.plan__desc { min-height: 72px; margin-bottom: 24px; font-size: 15px; line-height: 24px; color: var(--text-2); }
|
|
||||||
.plan__features { list-style: none; padding: 24px 0 0; margin: 24px 0 0; display: grid; gap: 12px; border-top: 1px solid var(--line); }
|
|
||||||
.plan__features li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); }
|
|
||||||
.plan__features svg { flex: none; color: var(--text-3); }
|
|
||||||
|
|
||||||
/* --------------------------------- Reviews ------------------------------- */
|
|
||||||
.reviews { padding: 128px 0; }
|
|
||||||
.ratings { margin: -24px 0 48px; text-align: center; font-size: 14px; color: var(--text-3); }
|
|
||||||
.ratings span { margin: 0 8px; }
|
|
||||||
.reviews__wall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
|
|
||||||
.reviews__col { display: grid; gap: 16px; }
|
|
||||||
.review {
|
|
||||||
padding: 24px;
|
|
||||||
border-radius: 14px;
|
|
||||||
background: var(--card);
|
|
||||||
border: 1px solid var(--line);
|
|
||||||
}
|
|
||||||
.review p { font-size: 15px; line-height: 24px; color: var(--text); }
|
|
||||||
.review footer { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 20px; }
|
|
||||||
.review strong { font-weight: 500; font-size: 14px; }
|
|
||||||
.review .mono { font-size: 12px; color: var(--text-3); }
|
|
||||||
|
|
||||||
/* ----------------------------------- FAQ -------------------------------- */
|
|
||||||
.faq {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
gap: 64px;
|
|
||||||
padding: 96px 0 128px;
|
|
||||||
align-items: start;
|
|
||||||
border-top: 1px solid var(--line);
|
|
||||||
}
|
|
||||||
.faq .section-heading { margin-bottom: 24px; }
|
|
||||||
.faq__help { font-size: 15px; line-height: 24px; color: var(--text-2); }
|
|
||||||
.faq__help a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(0, 109, 163, .3); }
|
|
||||||
.faq__list { list-style: none; margin: 0; padding: 0; display: grid; }
|
|
||||||
.faq__item { border-bottom: 1px solid var(--line); }
|
|
||||||
.faq__item:first-child { border-top: 1px solid var(--line); }
|
|
||||||
.faq__item button {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
gap: 16px;
|
|
||||||
padding: 20px 0;
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 500;
|
|
||||||
color: var(--text);
|
|
||||||
}
|
|
||||||
.faq__item button svg { flex: none; color: var(--text-3); }
|
|
||||||
.pm-v { transform-origin: center; transition: transform 200ms var(--ease); }
|
|
||||||
.pm-v.is-open { transform: scaleY(0); }
|
|
||||||
.faq__answer {
|
|
||||||
display: grid;
|
|
||||||
grid-template-rows: 0fr;
|
|
||||||
transition: grid-template-rows 300ms var(--ease);
|
|
||||||
}
|
|
||||||
.faq__answer p {
|
|
||||||
overflow: hidden;
|
|
||||||
padding-right: 32px;
|
|
||||||
font-size: 15px;
|
|
||||||
line-height: 24px;
|
|
||||||
color: var(--text-2);
|
|
||||||
}
|
|
||||||
.faq__item.is-open .faq__answer { grid-template-rows: 1fr; }
|
|
||||||
.faq__item.is-open .faq__answer p { padding-bottom: 20px; }
|
|
||||||
|
|
||||||
/* ----------------------------------- CTA -------------------------------- */
|
|
||||||
.cta {
|
|
||||||
border-radius: 20px;
|
|
||||||
background:
|
|
||||||
radial-gradient(70% 90% at 50% 0%, rgba(255, 255, 255, .28), transparent 70%),
|
|
||||||
var(--brand);
|
|
||||||
color: var(--text);
|
|
||||||
padding: 96px 24px;
|
|
||||||
text-align: center;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
.cta h2 {
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 48px;
|
|
||||||
line-height: 1.08;
|
|
||||||
letter-spacing: -0.025em;
|
|
||||||
margin-bottom: 32px;
|
|
||||||
}
|
|
||||||
.cta__meta { margin-top: 16px; font-size: 12px; color: rgba(11, 22, 32, .72); }
|
|
||||||
|
|
||||||
.footer {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
padding: 48px 0;
|
|
||||||
font-size: 14px;
|
|
||||||
color: var(--text-3);
|
|
||||||
}
|
|
||||||
.footer .mono { font-size: 12px; }
|
|
||||||
|
|
||||||
|
|
||||||
/* -------------------------------- Figures ------------------------------- */
|
|
||||||
.figure { position: relative; }
|
|
||||||
.figure__stage {
|
|
||||||
width: 100%;
|
|
||||||
--hairline-plate: var(--raised);
|
|
||||||
--hairline-hi: var(--accent-ink);
|
|
||||||
--hairline-edge: #a29c93;
|
|
||||||
--hairline-mid: #c6c1b9;
|
|
||||||
--hairline-lo: #dfdbd4;
|
|
||||||
cursor: crosshair;
|
|
||||||
}
|
|
||||||
.figure__read {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--text-3);
|
|
||||||
}
|
|
||||||
.media-figure .feature-card__media { height: auto; padding: 0 24px 8px; margin-inline: -40px; }
|
|
||||||
.media-figure .feature-card__media::after { display: none; }
|
|
||||||
.media-figure .figure { width: min(100%, 500px); margin-inline: auto; margin-top: -16px; }
|
|
||||||
.media-figure .figure__read { top: auto; bottom: 24px; right: 32px; }
|
|
||||||
|
|
||||||
/* ------------------------------ Struck plans ---------------------------- */
|
|
||||||
.plan .btn { width: 100%; }
|
|
||||||
.plan--struck { background: transparent; border: 1px dashed var(--line-strong); }
|
|
||||||
.plan--struck .plan__name { color: var(--text-3); }
|
|
||||||
.plan__price { position: relative; }
|
|
||||||
.plan__was { position: relative; display: inline-flex; align-items: baseline; gap: 8px; color: var(--text-3); }
|
|
||||||
.strike {
|
|
||||||
position: absolute;
|
|
||||||
left: -6px;
|
|
||||||
right: -6px;
|
|
||||||
top: 30%;
|
|
||||||
width: calc(100% + 12px);
|
|
||||||
height: 24px;
|
|
||||||
overflow: visible;
|
|
||||||
}
|
|
||||||
.strike path {
|
|
||||||
fill: none;
|
|
||||||
stroke: var(--negative);
|
|
||||||
stroke-width: 2.5;
|
|
||||||
stroke-linecap: round;
|
|
||||||
stroke-dasharray: 1;
|
|
||||||
stroke-dashoffset: 1;
|
|
||||||
transition: stroke-dashoffset 500ms var(--ease) 200ms;
|
|
||||||
}
|
|
||||||
.is-struck .strike path { stroke-dashoffset: 0; }
|
|
||||||
.plan__now {
|
|
||||||
margin-left: 12px;
|
|
||||||
font-size: 20px;
|
|
||||||
color: var(--accent-ink);
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(4px);
|
|
||||||
transition: opacity 300ms var(--ease) 650ms, transform 300ms var(--ease) 650ms;
|
|
||||||
}
|
|
||||||
.is-struck .plan__now { opacity: 1; transform: none; }
|
|
||||||
.btn--void { color: var(--text-3); border: 1px dashed var(--line-strong); cursor: default; }
|
|
||||||
.btn--void:active { transform: none; }
|
|
||||||
|
|
||||||
@media (prefers-reduced-motion: reduce) {
|
|
||||||
.strike path { stroke-dashoffset: 0; transition: none; }
|
|
||||||
.plan__now { opacity: 1; transform: none; transition: none; }
|
|
||||||
.menu.is-open, .toast { transition: none; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------- Responsive ---------------------------- */
|
|
||||||
@media (max-width: 1080px) {
|
|
||||||
.showcase { grid-template-columns: 1fr; padding: 96px 0; }
|
|
||||||
.showcase__visual { max-width: 560px; width: 100%; }
|
|
||||||
.feature-card--dark { flex-direction: column; }
|
|
||||||
.feature-card--dark .feature-card__media { flex-basis: auto; }
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 860px) {
|
|
||||||
.hero__title { font-size: 52px; }
|
|
||||||
.facts { grid-template-columns: 1fr 1fr; row-gap: 32px; padding: 24px 0; }
|
|
||||||
.fact { padding: 0 20px; }
|
|
||||||
.fact:nth-child(3) { border-left: 0; }
|
|
||||||
.compare__grid { grid-template-columns: 1fr; }
|
|
||||||
.compare { padding-top: 96px; }
|
|
||||||
.safety__top { grid-template-columns: 1fr; gap: 16px; }
|
|
||||||
.mobile__card { grid-template-columns: 1fr; padding: 32px 24px 0; gap: 0; }
|
|
||||||
.mobile__copy { padding-bottom: 32px; }
|
|
||||||
.mobile__copy h2 { font-size: 40px; }
|
|
||||||
.audit__head { display: none; }
|
|
||||||
.audit__row { grid-template-columns: 1fr; gap: 8px; }
|
|
||||||
.section-heading h2, .cta h2 { font-size: 40px; }
|
|
||||||
.features__grid, .pricing__grid, .faq { grid-template-columns: 1fr; }
|
|
||||||
.faq { gap: 32px; }
|
|
||||||
.reviews__wall { grid-template-columns: 1fr 1fr; }
|
|
||||||
.reviews__col:nth-child(3) { display: none; }
|
|
||||||
.feature-card { padding: 32px 24px 0; min-height: 440px; }
|
|
||||||
.feature-card--dark { padding: 32px 24px; }
|
|
||||||
.feature-card__media { margin-inline: -24px; }
|
|
||||||
.media-figure .feature-card__media { margin-inline: -24px; padding-inline: 8px; }
|
|
||||||
|
|
||||||
.preview { height: 520px; }
|
|
||||||
.preview__body { padding: 16px 16px 0; }
|
|
||||||
.feed { width: 100%; }
|
|
||||||
.toast { display: none; }
|
|
||||||
|
|
||||||
.nav__inner { grid-template-columns: 1fr auto; }
|
|
||||||
.nav__links, .nav .btn--nav { display: none; }
|
|
||||||
.nav__burger { display: grid; gap: 6px; padding: 10px; }
|
|
||||||
.nav__burger span { width: 20px; height: 1.5px; background: var(--text); border-radius: 1px; transition: transform var(--fast) var(--ease); }
|
|
||||||
.nav--open .nav__burger span:first-child { transform: translateY(4px) rotate(45deg); }
|
|
||||||
.nav--open .nav__burger span:last-child { transform: translateY(-4px) rotate(-45deg); }
|
|
||||||
.nav--open { background: var(--bg); border-bottom-color: var(--line); }
|
|
||||||
.nav--open .nav__inner { height: auto; min-height: 64px; padding-bottom: 16px; }
|
|
||||||
.nav--open .nav__links {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 16px;
|
|
||||||
grid-column: 1 / -1;
|
|
||||||
padding: 8px 0 16px;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
.nav--open .btn--nav { display: inline-flex; grid-column: 1 / -1; justify-self: start; }
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 560px) {
|
|
||||||
.hero { padding: 112px 16px 0; }
|
|
||||||
.hero__title { font-size: 40px; letter-spacing: -0.03em; }
|
|
||||||
.fact__n { font-size: 40px; }
|
|
||||||
.hero__sub { font-size: 16px; line-height: 24px; }
|
|
||||||
.hero__shot { margin-top: 48px; }
|
|
||||||
.menu { width: 216px; }
|
|
||||||
.section-heading h2, .cta h2 { font-size: 32px; }
|
|
||||||
.reviews__wall { grid-template-columns: 1fr; }
|
|
||||||
.reviews__col:nth-child(2) { display: none; }
|
|
||||||
.showcase__visual { height: 420px; }
|
|
||||||
.feature-card--dark .feature-card__media { width: 100%; }
|
|
||||||
.footer { flex-direction: column; gap: 8px; }
|
|
||||||
.container { width: calc(100% - 32px); }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ------------------------- Hairline padlock (DRM card) ------------------ */
|
|
||||||
.hairline { position: relative; }
|
|
||||||
.hairline__stage {
|
|
||||||
--hairline-plate: #0a1824;
|
|
||||||
--hairline-hi: #02aff2;
|
|
||||||
--hairline-edge: #8197ab;
|
|
||||||
--hairline-mid: #3b5770;
|
|
||||||
--hairline-lo: #22405a;
|
|
||||||
--hairline-stroke: 1.1;
|
|
||||||
}
|
|
||||||
.hairline__read { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 12px; color: var(--d-text-3); }
|
|
||||||
.drm-lock { flex: 0 0 300px; align-self: center; margin-inline: -24px; }
|
|
||||||
@media (max-width: 1080px) {
|
|
||||||
.drm-lock { flex: none; width: min(280px, 100%); align-self: center; }
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import { defineConfig } from 'vite'
|
|
||||||
import react from '@vitejs/plugin-react'
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
plugins: [react()],
|
|
||||||
// Hashed build output gets its own folder, so nginx can cache it forever
|
|
||||||
// without also pinning the unhashed files in public/assets.
|
|
||||||
build: { assetsDir: '_app' },
|
|
||||||
})
|
|
||||||
Reference in New Issue
Block a user