This commit is contained in:
1 parent
f5e0ec64e4
commit
3437e21e31
14 files changed
+1078
-18
No files matched your search
@@ -15,6 +15,8 @@ Entrypoint for project memory. Read this before working in the repo.
|
|||||||
- [Hero scale, shared grid, smooth scroll](./memories/hero-grid-scroll-2026-11-01.md) — 75% hero title, one horizontal grid for all sections, smooth back-to-top.
|
- [Hero scale, shared grid, smooth scroll](./memories/hero-grid-scroll-2026-11-01.md) — 75% hero title, one horizontal grid for all sections, smooth back-to-top.
|
||||||
- [Motion pass](./memories/motion-pass-2026-11-01.md) — drifting three-aura backdrop, scroll-lit path nodes, bobbing hero peacock, iridescent footer "Project".
|
- [Motion pass](./memories/motion-pass-2026-11-01.md) — drifting three-aura backdrop, scroll-lit path nodes, bobbing hero peacock, iridescent footer "Project".
|
||||||
- [Hero scroll cue and gradient](./memories/hero-cue-gradient-2026-11-01.md) — restored scroll cue and iridescent italic hero text.
|
- [Hero scroll cue and gradient](./memories/hero-cue-gradient-2026-11-01.md) — restored scroll cue and iridescent italic hero text.
|
||||||
|
- [Cloudflare devices build](./memories/cloudflare-devices-build.md) — bundle device data and image manifest for Cloudflare prerendering.
|
||||||
|
- [Homepage headings restored](./memories/homepage-headings-2026-11-01.md) — original h2 copy and gradient spans.
|
||||||
|
|
||||||
## Current state (2026-11-01)
|
## Current state (2026-11-01)
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# Cloudflare devices build
|
||||||
|
|
||||||
|
- Cloudflare's Astro prerenderer runs in a Worker where `process.cwd()` is `/bundle`; local `public/` files cannot be read using `node:fs`.
|
||||||
|
- `src/pages/devices.astro` imports `public/devices/status.json?raw` and uses a Vite glob for the device image manifest. The generator and public URLs remain unchanged.
|
||||||
|
- Verified `npm run build` with the Cloudflare adapter, including temporary image fixtures to check image priority and output, and all device cards.
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# Homepage headings restored
|
||||||
|
|
||||||
|
Date: 2026-11-01
|
||||||
|
|
||||||
|
- Restored the three original homepage h2 texts and their italic iridescent spans, matching peacockos.org.
|
||||||
|
- The existing responsive h2 font size already matched the original: `clamp(38px,6vw,76px)`.
|
||||||
|
- Kept the redesigned surrounding copy, layout, and single-h1 page structure.
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
name: Build & Deploy (CF Workers)
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["master"]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: Set up pnpm
|
||||||
|
uses: pnpm/setup@v1
|
||||||
|
with:
|
||||||
|
version: 11
|
||||||
|
runtime: node@24
|
||||||
|
cache: true
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: pnpm build
|
||||||
|
|
||||||
|
- name: Deploy to Cloudflare Workers
|
||||||
|
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
|
||||||
|
env:
|
||||||
|
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
|
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
|
run: pnpm exec wrangler deploy --message "${{ github.sha }}"
|
||||||
@@ -10,3 +10,10 @@ node_modules/
|
|||||||
|
|
||||||
# python
|
# python
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
|
||||||
|
# wrangler files
|
||||||
|
.wrangler
|
||||||
|
.dev.vars*
|
||||||
|
!.dev.vars.example
|
||||||
|
.env*
|
||||||
|
!.env.example
|
||||||
+6
-1
@@ -1,11 +1,16 @@
|
|||||||
import { defineConfig } from 'astro/config';
|
import { defineConfig } from 'astro/config';
|
||||||
|
|
||||||
|
import cloudflare from '@astrojs/cloudflare';
|
||||||
|
|
||||||
// Static site, ported 1:1 from the hand-written build in `../site`.
|
// Static site, ported 1:1 from the hand-written build in `../site`.
|
||||||
// Pages are emitted as `<route>/index.html`, matching the original layout.
|
// Pages are emitted as `<route>/index.html`, matching the original layout.
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
site: 'https://peacockos.org',
|
site: 'https://peacockos.org',
|
||||||
|
|
||||||
build: {
|
build: {
|
||||||
format: 'directory',
|
format: 'directory',
|
||||||
},
|
},
|
||||||
|
|
||||||
trailingSlash: 'ignore',
|
trailingSlash: 'ignore',
|
||||||
});
|
adapter: cloudflare(),
|
||||||
|
});
|
||||||
Generated
+979
-3
File diff suppressed because it is too large.
Load diff
+8
-2
@@ -6,10 +6,16 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "astro dev",
|
"dev": "astro dev",
|
||||||
"build": "astro build",
|
"build": "astro build",
|
||||||
"preview": "astro preview",
|
"preview": "npm run build && wrangler dev",
|
||||||
"astro": "astro"
|
"astro": "astro",
|
||||||
|
"generate-types": "wrangler types",
|
||||||
|
"deploy": "npm run build && wrangler deploy"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@astrojs/cloudflare": "^14.4.3",
|
||||||
"astro": "^7.4.4"
|
"astro": "^7.4.4"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"wrangler": "^4.156.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
_worker.js
|
||||||
|
_routes.json
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
---
|
---
|
||||||
import fs from 'node:fs';
|
import status from '../../public/devices/status.json?raw';
|
||||||
import path from 'node:path';
|
|
||||||
import Base from '../layouts/Base.astro';
|
import Base from '../layouts/Base.astro';
|
||||||
|
|
||||||
// The device list is generated from peacock-ports' status.toml by
|
// The device list is generated from peacock-ports' status.toml by
|
||||||
// scripts/gen-devices.py, which writes public/devices/status.json. Rendering it
|
// 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
|
// here (instead of generating a whole HTML page) keeps the data pipeline and
|
||||||
// the page markup independent.
|
// the page markup independent. Vite bundles the data and image manifest so
|
||||||
const root = process.cwd();
|
// Cloudflare's prerenderer doesn't need access to the local filesystem.
|
||||||
const payload = JSON.parse(fs.readFileSync(path.join(root, 'public/devices/status.json'), 'utf8'));
|
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 WIKI = 'https://wiki.peacockos.org';
|
||||||
const IMG_EXTS = ['webp', 'png', 'jpg', 'jpeg', 'avif'];
|
const IMG_EXTS = ['webp', 'png', 'jpg', 'jpeg', 'avif'];
|
||||||
@@ -26,7 +26,7 @@ function platform(d) {
|
|||||||
|
|
||||||
function imageFor(code) {
|
function imageFor(code) {
|
||||||
for (const ext of IMG_EXTS) {
|
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}`;
|
return `/devices/img/${code}.${ext}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import Mark from '../components/Mark.astro';
|
|||||||
|
|
||||||
<section class="module">
|
<section class="module">
|
||||||
<div class="wrap stmt reveal">
|
<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>
|
<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>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@@ -28,7 +28,7 @@ import Mark from '../components/Mark.astro';
|
|||||||
<section class="module path-module">
|
<section class="module path-module">
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<div class="path-head reveal">
|
<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>
|
<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>
|
||||||
<div class="spine-wrap">
|
<div class="spine-wrap">
|
||||||
@@ -47,7 +47,7 @@ import Mark from '../components/Mark.astro';
|
|||||||
<section class="module">
|
<section class="module">
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<div class="reveal">
|
<div class="reveal">
|
||||||
<h2>Two places to start.</h2>
|
<h2>Two front doors, <span class="grad">now open.</span></h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="doors reveal">
|
<div class="doors reveal">
|
||||||
<a class="door" href="https://wiki.peacockos.org">
|
<a class="door" href="https://wiki.peacockos.org">
|
||||||
|
|||||||
@@ -127,6 +127,8 @@
|
|||||||
.module{position:relative;padding:clamp(80px,14vh,160px) var(--pad);}
|
.module{position:relative;padding:clamp(80px,14vh,160px) var(--pad);}
|
||||||
.wrap{max-width:var(--maxw);margin:0 auto;}
|
.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 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);}
|
.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);}
|
.page-head{padding-top:clamp(110px,16vh,170px);}
|
||||||
|
|
||||||
|
|||||||
+9
-3
@@ -1,5 +1,11 @@
|
|||||||
{
|
{
|
||||||
"extends": "astro/tsconfigs/strict",
|
"extends": "astro/tsconfigs/strict",
|
||||||
"include": [".astro/types.d.ts", "**/*"],
|
"include": [
|
||||||
"exclude": ["dist"]
|
".astro/types.d.ts",
|
||||||
}
|
"**/*",
|
||||||
|
"./worker-configuration.d.ts"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"dist"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"$schema": "./node_modules/wrangler/config-schema.json",
|
||||||
|
"compatibility_date": "2026-10-23",
|
||||||
|
"compatibility_flags": ["global_fetch_strictly_public"],
|
||||||
|
"name": "peacock-site",
|
||||||
|
"main": "@astrojs/cloudflare/entrypoints/server",
|
||||||
|
"assets": {
|
||||||
|
"directory": "./dist",
|
||||||
|
"binding": "ASSETS"
|
||||||
|
},
|
||||||
|
"observability": {
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user