This commit is contained in:
1 parent
f5e0ec64e4
commit
a1b102990a
15 files changed
+4042
-18
No files matched your search
@@ -1,14 +1,14 @@
|
||||
---
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import status from '../../public/devices/status.json?raw';
|
||||
import Base from '../layouts/Base.astro';
|
||||
|
||||
// The device list is generated from peacock-ports' status.toml by
|
||||
// scripts/gen-devices.py, which writes public/devices/status.json. Rendering it
|
||||
// here (instead of generating a whole HTML page) keeps the data pipeline and
|
||||
// the page markup independent.
|
||||
const root = process.cwd();
|
||||
const payload = JSON.parse(fs.readFileSync(path.join(root, 'public/devices/status.json'), 'utf8'));
|
||||
// the page markup independent. Vite bundles the data and image manifest so
|
||||
// Cloudflare's prerenderer doesn't need access to the local filesystem.
|
||||
const payload = JSON.parse(status);
|
||||
const images = import.meta.glob('../../public/devices/img/*.{webp,png,jpg,jpeg,avif}', { eager: true, query: '?url', import: 'default' });
|
||||
|
||||
const WIKI = 'https://wiki.peacockos.org';
|
||||
const IMG_EXTS = ['webp', 'png', 'jpg', 'jpeg', 'avif'];
|
||||
@@ -26,7 +26,7 @@ function platform(d) {
|
||||
|
||||
function imageFor(code) {
|
||||
for (const ext of IMG_EXTS) {
|
||||
if (fs.existsSync(path.join(root, 'public/devices/img', `${code}.${ext}`))) {
|
||||
if (Object.hasOwn(images, `../../public/devices/img/${code}.${ext}`)) {
|
||||
return `/devices/img/${code}.${ext}`;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import Mark from '../components/Mark.astro';
|
||||
|
||||
<section class="module">
|
||||
<div class="wrap stmt reveal">
|
||||
<h2>You own the hardware. Software should be yours, too.</h2>
|
||||
<h2>Your phone, <span class="grad">handed back.</span></h2>
|
||||
<p>Peacock isn't a phone company. It's a build system, a boot chain, and a recovery environment that together let you put Linux on hardware you already own, with no account and no vendor in the middle.</p>
|
||||
</div>
|
||||
</section>
|
||||
@@ -28,7 +28,7 @@ import Mark from '../components/Mark.astro';
|
||||
<section class="module path-module">
|
||||
<div class="wrap">
|
||||
<div class="path-head reveal">
|
||||
<h2>From a stock phone to one you control.</h2>
|
||||
<h2>From factory-locked to <span class="grad">truly yours.</span></h2>
|
||||
<p class="path-sub">Four steps that run into each other, not four separate products. Each one takes the same phone closer to something you own.</p>
|
||||
</div>
|
||||
<div class="spine-wrap">
|
||||
@@ -47,7 +47,7 @@ import Mark from '../components/Mark.astro';
|
||||
<section class="module">
|
||||
<div class="wrap">
|
||||
<div class="reveal">
|
||||
<h2>Two places to start.</h2>
|
||||
<h2>Two front doors, <span class="grad">now open.</span></h2>
|
||||
</div>
|
||||
<div class="doors reveal">
|
||||
<a class="door" href="https://wiki.peacockos.org">
|
||||
|
||||
@@ -127,6 +127,8 @@
|
||||
.module{position:relative;padding:clamp(80px,14vh,160px) var(--pad);}
|
||||
.wrap{max-width:var(--maxw);margin:0 auto;}
|
||||
.module h1,.module h2{font-family:var(--serif);font-size:clamp(38px,6vw,76px);line-height:.98;letter-spacing:-.01em;margin:0;}
|
||||
.module h2 .grad{font-style:italic;background:var(--irid);-webkit-background-clip:text;background-clip:text;
|
||||
color:transparent;-webkit-text-fill-color:transparent;}
|
||||
.stmt p{margin:26px 0 0;max-width:54ch;font-size:clamp(16px,1.6vw,20px);line-height:1.6;color:var(--ink2);}
|
||||
.page-head{padding-top:clamp(110px,16vh,170px);}
|
||||
|
||||
|
||||
Reference in new issue
Block a user