Move penfield app to apps/penfield

This commit is contained in:
Lewis Wynne 2026-01-23 00:02:44 +00:00
parent 8d625b15cd
commit 9d9f213bbe
5 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,5 @@
import { defineConfig } from 'astro/config';
export default defineConfig({
output: 'static'
});

View file

@ -0,0 +1,12 @@
{
"name": "@ily/penfield",
"type": "module",
"scripts": {
"dev": "astro dev",
"build": "astro build",
"preview": "astro preview"
},
"dependencies": {
"astro": "^5.16.13"
}
}

View file

@ -0,0 +1,6 @@
export const intros = [
{ text: "You wake up. Your <b>Penfield</b> thrums." },
{ text: "Your <b>Penfield Mood Organ</b> chimes." },
{ text: "Your <b>Penfield Mood Organ</b> wakes you." },
{ text: "You are awoken by your <b>Penfield Mood Organ</b>." },
];

View file

@ -0,0 +1,17 @@
export const moods = [
{ num: 3, text: "Desire to dial" },
{ num: 382, text: "Desire to engage in creative activity" },
{ num: 481, text: "Awareness of the manifold possibilities open in the future" },
{ num: 594, text: "Pleased acknowledgment of husband's superior wisdom" },
{ num: 670, text: "Long-deserved peace" },
{ num: 888, text: "Desire to watch TV, no matter what's on" },
{ num: 443, text: "Self-accusatory depression" },
{ num: 72, text: "Vague unease about tomorrow" },
{ num: 158, text: "Acceptance of routine" },
{ num: 291, text: "Brief contentment with material possessions" },
{ num: 407, text: "Suppressed awareness of mortality" },
{ num: 531, text: "Calm readiness to consume" },
{ num: 816, text: "Desire to return to bed" },
{ num: 952, text: "Resigned compliance" },
{ num: 64, text: "Faint hope that things will improve" },
];

View file

@ -0,0 +1,11 @@
---
import { intros } from '../data/intros';
import { moods } from '../data/moods';
const epoch = Math.floor(Date.now() / 3600000);
const start = Math.floor(new Date('2026-01-22T14:00:00Z').getTime() / 3600000);
const t = epoch; // for mood selection
const ring = epoch - start;
const intro: { text: string } = intros[t % intros.length];
const mood: { num: number, text: string } = moods[t % moods.length];
---
<!DOCTYPE html><link rel=icon href=data:,><style>body{margin:9%;text-align:center}</style><title>Penfield</title><p><b>Ring #{ring}.</b> <span set:html={intro.text} /></p><p><b>{mood.num}</b>. {mood.text}.</p>