diff --git a/.env.example b/.env.example index 8adc4dc..13eb1c9 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,6 @@ -# Optional. A form backend (e.g. Formspree, Basin, Web3Forms) that accepts POSTs. -# When unset, the contact and newsletter forms fall back to links (Messenger / email). -PUBLIC_FORM_ENDPOINT= -PUBLIC_NEWSLETTER_ENDPOINT= +# Form backends (e.g. Formspree, Basin, Web3Forms) that accept POSTs. +# Set them as GitHub repository variables for the deployed site. +# When unset, each form shows contact links instead. +PUBLIC_FORM_ENDPOINT= # contact + local network interest forms +PUBLIC_PRAYER_ENDPOINT= # prayer requests (private inbox, prayer team only) +PUBLIC_NEWSLETTER_ENDPOINT= # footer newsletter diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e1ea819..3103fb0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,6 +5,9 @@ on: branches: [main] pull_request: workflow_dispatch: + # Daily rebuild at 00:05 Manila time (16:05 UTC) so ended events and announcements drop off. + schedule: + - cron: '5 16 * * *' permissions: contents: read @@ -26,6 +29,7 @@ jobs: package-manager: pnpm@12.16.1 env: PUBLIC_FORM_ENDPOINT: ${{ vars.PUBLIC_FORM_ENDPOINT }} + PUBLIC_PRAYER_ENDPOINT: ${{ vars.PUBLIC_PRAYER_ENDPOINT }} PUBLIC_NEWSLETTER_ENDPOINT: ${{ vars.PUBLIC_NEWSLETTER_ENDPOINT }} deploy: diff --git a/AGENTS.md b/AGENTS.md index 1e8bb78..55a7971 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,21 +1,23 @@ # AGENTS.md — Indigitous Philippines website -Read this file before you change anything. It applies to human contributors and to AI coding agents (Claude Code, Cursor, Codex, Copilot and others). +Read this file before you change anything. It applies to human contributors and to AI coding agents (Cursor, Codex, Copilot and others). + +The source of truth for structure and copy is the team's **Wireframe & Copy Deck** (Nov 4, 2026). When the deck and the code disagree, follow the deck, or ask. ## What this is -This is the static website for **Indigitous Philippines**, the Philippine community of [Indigitous](https://indigitous.org). Indigitous is a global network (since 2013, partnered with Cru) helping followers of Jesus take the gospel to new people, places and spaces through tech and creativity. Its flagship program is **#HACK**, a faith-driven hackathon held every October. +This is the static website for **Indigitous Philippines**: a movement of Filipino believers using their gifts for missions in a digital age. It is part of the global [Indigitous](https://indigitous.org) movement. The name joins _indigenous_ (locally rooted, culturally adapted) and _digital_ (the tools and spaces where people now gather). - Live: https://indigitousph.github.io (GitHub Pages) -- Languages: English (`/`) and Filipino (`/fil/`) +- Language: English, with small Filipino touches. Helpers in `src/i18n/` keep the door open for Filipino later. - Component showcase: `/storybook` ## Stack -- **Astro 7**, static output. There's no UI framework, and pages ship almost zero JS. +- **Astro 7**, static output. There is no UI framework, and pages ship almost zero JS. - **Tailwind CSS 4** via `@tailwindcss/vite`. Design tokens live in `src/styles/global.css` (`@theme`). - **TypeScript** in strict mode. Path alias `@/*` points to `src/*`. -- **Content collections** (Markdown/MDX + Zod schemas) for events, communities, projects, stories and team. +- **Content collections** (Markdown + Zod schemas). A missing date or broken link fails the build instead of the live site. - **pnpm**, Node 22+. ## Commands @@ -29,110 +31,196 @@ pnpm preview # serve dist/ pnpm format # prettier ``` -Run `pnpm build` before you call a change done. It must finish with **0 errors**. +Run `pnpm build` before you call a change done. It must finish with **0 errors**. Test at **360px** wide, since most visitors arrive from Facebook or Messenger on a phone. + +## Site map (from the deck) + +| Page | URL | Primary call to action | +| --------------------- | ------------------------------------ | ----------------------------------------------------- | +| Home | `/` | Join a local network | +| About | `/about` | Meet the team (`/about#team`) | +| Local Networks | `/networks` | Find your local network (interest form at `#connect`) | +| #HACK | `/hack` | Register for the next #HACK | +| Pray & Online Workers | `/pray` | Join the prayer time | +| Stories | `/stories`, `/stories/[slug]` | Read a story | +| Partner & Give | `/partner` | Partner with us | +| Contact | `/contact` | Send a message | +| _Footer only_ | `/events`, `/projects`, `/resources` | Not in the deck; kept as extras | + +- **Header:** Home · About · Local Networks · #HACK · Pray · Stories, plus a **Partner with us** button. +- **Footer:** Brand / Explore / Get involved / Stay connected, with the newsletter. +- **Old URLs** from the first version (including the retired `/fil/` pages) redirect via `redirects` in `astro.config.mjs`. ## Folder map ``` src/ components/ - ui/ Button, PillTag, SwitchTabs, Field, Icon, Logo, Placeholder - cards/ EventCard, StoryCard, CommunityCard, ProjectCard, TeamCard, TestimonialCard - sections/ Hero, PageHeader, Section, SectionHeading, CardGrid, StatsBand, CtaBand, - FeatureGrid, FAQ, NewsletterBand - layout/ Header, Footer + ui/ Button, Field, Choices, PillTag, SwitchTabs, Icon, Logo, Placeholder, + Countdown, AnnouncementBar + cards/ EventCard, NetworkCard, StoryCard, ProjectCard, TeamCard + sections/ one file per block named in the deck (see table below) + forms/ FormShell, InterestForm, PrayerForm, ContactForm + layout/ Header, Footer */X.stories.ts ← story for X.astro, rendered on /storybook - config/site.ts nav, socials, external links (edit links HERE) - content///.md(x) + config/site.ts nav, socials, external links, form endpoints (edit links HERE) + content/ + events/ #HACK and other events (date, endDate, venue, fee, register link) + networks/ one file per local network + stories/ Markdown stories (category: hack | networks | prayer | testimonies) + challenges/ #HACK challenges (see _example.md) + team/ team members + projects/ projects (footer-only page) + site/site.json announcement bar, prayer time, monthly prayer focus content.config.ts collection schemas - i18n/ en.ts, fil.ts (short UI strings), index.ts (helpers) - layouts/BaseLayout.astro , SEO, header/footer - lib/content.ts getLocalized() + sort helpers - lib/story.ts Story type for *.stories.ts - pages/ thin route files only (EN at root, FIL under pages/fil/) - pages/storybook/ component showcase + i18n/ en.ts (short UI strings) + helpers (t, formatDate, formatRange) + layouts/BaseLayout.astro , SEO, announcement, header, footer, shared scripts + lib/content.ts getAll, getFeaturedEvent, getSite, sort helpers + pages/ one file per page; page copy sits in a `copy` object at the top styles/global.css Tailwind import + brand tokens - views/ one file per page; holds the page's layout and copy -public/ favicon, OG image, robots.txt, static images +public/ favicon, OG image, robots.txt, images ``` +## Deck block → component + +| Deck name | Component | +| -------------------------------------------- | ------------------------------------------------------------------------------------- | +| Header / Footer / AnnouncementBar | `layout/Header`, `layout/Footer`, `ui/AnnouncementBar` | +| Hero / PageHero / EventHero | `sections/Hero`, `sections/PageHero`, `sections/EventHero` (+ `ui/Countdown`) | +| Intro | `sections/Intro` | +| Pillars / IconList | `sections/FeatureGrid` (`variant="cards"` / `"plain"`) | +| EventFeature / EventDetails | `sections/EventFeature`, `sections/EventDetails` | +| Gifts / StoryCards | `sections/Gifts`, `sections/StoryCards` | +| CTABand / StartBand / GlobalBand | `sections/CTABand`, `sections/StartBand`, `sections/GlobalBand` | +| SplitText / Timeline / Beliefs | `sections/SplitText`, `sections/Timeline`, `sections/Beliefs` | +| TeamGrid | `cards/TeamCard` in a grid on `/about` | +| NetworkCards | `cards/NetworkCard` in a grid on `/networks` | +| Steps / ChallengeCards / Gallery / Accordion | `sections/Steps`, `sections/ChallengeCards`, `sections/Gallery`, `sections/Accordion` | +| PrayerFocus | `sections/PrayerFocus` | +| InterestForm / PrayerForm / Contact form | `forms/InterestForm`, `forms/PrayerForm`, `forms/ContactForm` | + ## Core conventions (follow these) -1. **Pages are written once, in `src/views/`.** Route files in `src/pages/` and `src/pages/fil/` only render a view with `lang="en"` or `lang="fil"`. Never put page markup in `src/pages/`. -2. **Every UI string is translated.** - - Short reusable strings (nav, buttons, labels) go in `src/i18n/en.ts` and `fil.ts`. TypeScript fails the build if a key is missing from `fil.ts`. - - Page copy goes in a `copy = pick({ en: {...}, fil: {...} }, lang)` object at the top of the view. -3. **Internal links go through `localizePath(path, lang)`.** Never hard-code `/fil/...`. -4. **Use design tokens only.** Use `bg-brand-orange`, `text-ink`, `rounded-pill`, `font-mono` and so on. Don't use raw hex values or arbitrary colors like `bg-[#ef4e25]` in components. -5. **Every component in `src/components/` has a `*.stories.ts` file.** Its variants show on `/storybook`. Cards and sections take plain props, not collection entries, so they can be demoed. -6. **Content lives in collections, not in views.** To add an event, add a Markdown file. Don't edit the page. -7. **Keep JavaScript minimal.** Prefer `
`, CSS, and small inline ` diff --git a/src/components/forms/PrayerForm.stories.ts b/src/components/forms/PrayerForm.stories.ts new file mode 100644 index 0000000..c2dd53e --- /dev/null +++ b/src/components/forms/PrayerForm.stories.ts @@ -0,0 +1,14 @@ +import type { Story } from '@/lib/story'; +import PrayerForm from './PrayerForm.astro'; + +export default { + title: 'PrayerForm', + component: PrayerForm, + description: + 'Posts to a form service. The first variant uses a demo endpoint; the second shows the fallback when no endpoint is configured.', + width: 'md', + variants: [ + { name: 'With endpoint', props: { endpoint: '#' } }, + { name: 'No endpoint (fallback)', props: { endpoint: '' } }, + ], +} satisfies Story; diff --git a/src/components/layout/Footer.astro b/src/components/layout/Footer.astro index 06d8a0d..8a9374a 100644 --- a/src/components/layout/Footer.astro +++ b/src/components/layout/Footer.astro @@ -1,44 +1,50 @@ --- import Logo from '../ui/Logo.astro'; import Icon from '../ui/Icon.astro'; -import { footerNav, site } from '@/config/site'; -import { localizePath, useTranslations, type Lang } from '@/i18n'; +import Button from '../ui/Button.astro'; +import { exploreNav, forms, involvedNav, site } from '@/config/site'; +import { t } from '@/i18n'; -interface Props { - lang: Lang; -} -const { lang } = Astro.props; -const t = useTranslations(lang); +/** Footer (deck: Footer.astro): dark band, four columns (Brand / Explore / Get involved / Stay connected). */ const year = new Date().getFullYear(); +const linkClass = 'text-white/85 hover:text-brand-yellow'; ---