From 0644a0c1777b600bf953fba973dcc1860206cf28 Mon Sep 17 00:00:00 2001 From: Nap Joseph Calub Date: Tue, 17 Nov 2026 22:25:17 +0800 Subject: [PATCH] Build Indigitous Philippines site with Astro + Tailwind - Astro 7 static site with Tailwind 4 brand tokens taken from indigitous.org and the #HACK brand guide (orange/yellow, Noto Sans + Noto Sans Mono, pill shapes) - English and Filipino pages (/ and /fil/) from shared views in src/views - Pages: home, about, team, start here, #HACK, events, communities, projects, stories, resources, get involved, give, contact, 404 - Content collections for events, communities, projects, stories and team, seeded with clearly labelled sample content - Component library with a *.stories.ts per component, rendered at /storybook - AGENTS.md documenting conventions and recipes - GitHub Pages deploy workflow via withastro/action --- .claude/launch.json | 11 + .editorconfig | 9 + .env.example | 4 + .github/workflows/deploy.yml | 40 + .gitignore | 7 + .nvmrc | 1 + .prettierignore | 4 + .prettierrc | 6 + AGENTS.md | 138 + README.md | 41 + astro.config.mjs | 23 + index.html | 1 - package.json | 32 + pnpm-lock.yaml | 3677 +++++++++++++++++ public/favicon.svg | 1 + public/og-default.svg | 1 + public/robots.txt | 5 + src/components/cards/CommunityCard.astro | 49 + src/components/cards/CommunityCard.stories.ts | 20 + src/components/cards/EventCard.astro | 83 + src/components/cards/EventCard.stories.ts | 31 + src/components/cards/ProjectCard.astro | 64 + src/components/cards/ProjectCard.stories.ts | 33 + src/components/cards/StoryCard.astro | 80 + src/components/cards/StoryCard.stories.ts | 32 + src/components/cards/TeamCard.astro | 29 + src/components/cards/TeamCard.stories.ts | 14 + src/components/cards/TestimonialCard.astro | 42 + .../cards/TestimonialCard.stories.ts | 27 + src/components/layout/Footer.astro | 85 + src/components/layout/Footer.stories.ts | 9 + src/components/layout/Header.astro | 131 + src/components/layout/Header.stories.ts | 13 + src/components/sections/CardGrid.astro | 17 + src/components/sections/CardGrid.stories.ts | 17 + src/components/sections/CtaBand.astro | 48 + src/components/sections/CtaBand.stories.ts | 28 + src/components/sections/FAQ.astro | 22 + src/components/sections/FAQ.stories.ts | 22 + src/components/sections/FeatureGrid.astro | 49 + .../sections/FeatureGrid.stories.ts | 32 + src/components/sections/Hero.astro | 66 + src/components/sections/Hero.stories.ts | 21 + src/components/sections/NewsletterBand.astro | 90 + .../sections/NewsletterBand.stories.ts | 19 + src/components/sections/PageHeader.astro | 46 + src/components/sections/PageHeader.stories.ts | 28 + src/components/sections/Section.astro | 16 + src/components/sections/Section.stories.ts | 14 + src/components/sections/SectionHeading.astro | 44 + .../sections/SectionHeading.stories.ts | 27 + src/components/sections/StatsBand.astro | 43 + src/components/sections/StatsBand.stories.ts | 20 + src/components/ui/Button.astro | 66 + src/components/ui/Button.stories.ts | 32 + src/components/ui/Field.astro | 52 + src/components/ui/Field.stories.ts | 48 + src/components/ui/Icon.astro | 78 + src/components/ui/Icon.stories.ts | 9 + src/components/ui/Logo.astro | 27 + src/components/ui/Logo.stories.ts | 13 + src/components/ui/PillTag.astro | 28 + src/components/ui/PillTag.stories.ts | 17 + src/components/ui/Placeholder.astro | 31 + src/components/ui/Placeholder.stories.ts | 20 + src/components/ui/SwitchTabs.astro | 83 + src/components/ui/SwitchTabs.stories.ts | 34 + src/config/site.ts | 60 + src/content.config.ts | 86 + src/content/communities/en/iloilo.md | 10 + src/content/communities/en/manila.md | 12 + src/content/communities/fil/iloilo.md | 10 + src/content/communities/fil/manila.md | 10 + .../events/en/coffee-talk-faith-and-ai.md | 18 + src/content/events/en/hack2026-manila.md | 11 + .../en/hack2027-champion-info-session.md | 15 + .../events/en/iloilo-creatives-meetup.md | 10 + .../events/fil/coffee-talk-faith-and-ai.md | 16 + .../projects/en/bible-in-your-dialect.md | 10 + src/content/projects/en/church-website-kit.md | 10 + src/content/projects/en/ofw-stories.md | 10 + .../en/getting-started-as-a-creative.mdx | 14 + .../stories/en/what-happened-at-hack2026.md | 12 + .../stories/en/why-indigitous-philippines.md | 18 + .../stories/fil/why-indigitous-philippines.md | 12 + src/content/team/en/juan-dela-cruz.md | 7 + src/content/team/en/maria-dela-cruz.md | 7 + src/content/team/en/pedro-penduko.md | 7 + src/i18n/en.ts | 74 + src/i18n/fil.ts | 77 + src/i18n/index.ts | 54 + src/layouts/BaseLayout.astro | 72 + src/lib/content.ts | 38 + src/lib/story.ts | 22 + src/pages/404.astro | 5 + src/pages/about/index.astro | 5 + src/pages/about/team.astro | 5 + src/pages/communities/[slug].astro | 13 + src/pages/communities/index.astro | 5 + src/pages/contact.astro | 5 + src/pages/events/[slug].astro | 13 + src/pages/events/index.astro | 5 + src/pages/fil/about/index.astro | 5 + src/pages/fil/about/team.astro | 5 + src/pages/fil/communities/[slug].astro | 13 + src/pages/fil/communities/index.astro | 5 + src/pages/fil/contact.astro | 5 + src/pages/fil/events/[slug].astro | 13 + src/pages/fil/events/index.astro | 5 + src/pages/fil/get-involved.astro | 5 + src/pages/fil/give.astro | 5 + src/pages/fil/hack.astro | 5 + src/pages/fil/index.astro | 5 + src/pages/fil/projects/[slug].astro | 13 + src/pages/fil/projects/index.astro | 5 + src/pages/fil/resources.astro | 5 + src/pages/fil/start-here.astro | 5 + src/pages/fil/stories/[slug].astro | 13 + src/pages/fil/stories/index.astro | 5 + src/pages/get-involved.astro | 5 + src/pages/give.astro | 5 + src/pages/hack.astro | 5 + src/pages/index.astro | 5 + src/pages/projects/[slug].astro | 13 + src/pages/projects/index.astro | 5 + src/pages/resources.astro | 5 + src/pages/start-here.astro | 5 + src/pages/stories/[slug].astro | 13 + src/pages/stories/index.astro | 5 + src/pages/storybook/index.astro | 302 ++ src/styles/global.css | 116 + src/views/About.astro | 163 + src/views/Communities.astro | 75 + src/views/CommunityDetail.astro | 112 + src/views/Contact.astro | 141 + src/views/EventDetail.astro | 81 + src/views/Events.astro | 99 + src/views/GetInvolved.astro | 147 + src/views/Give.astro | 92 + src/views/Hack.astro | 208 + src/views/Home.astro | 285 ++ src/views/NotFound.astro | 22 + src/views/ProjectDetail.astro | 68 + src/views/Projects.astro | 85 + src/views/Resources.astro | 186 + src/views/StartHere.astro | 195 + src/views/Stories.astro | 65 + src/views/StoryDetail.astro | 60 + src/views/Team.astro | 63 + tsconfig.json | 9 + 150 files changed, 9464 insertions(+), 1 deletion(-) create mode 100644 .claude/launch.json create mode 100644 .editorconfig create mode 100644 .env.example create mode 100644 .github/workflows/deploy.yml create mode 100644 .gitignore create mode 100644 .nvmrc create mode 100644 .prettierignore create mode 100644 .prettierrc create mode 100644 AGENTS.md create mode 100644 README.md create mode 100644 astro.config.mjs delete mode 100644 index.html create mode 100644 package.json create mode 100644 pnpm-lock.yaml create mode 100644 public/favicon.svg create mode 100644 public/og-default.svg create mode 100644 public/robots.txt create mode 100644 src/components/cards/CommunityCard.astro create mode 100644 src/components/cards/CommunityCard.stories.ts create mode 100644 src/components/cards/EventCard.astro create mode 100644 src/components/cards/EventCard.stories.ts create mode 100644 src/components/cards/ProjectCard.astro create mode 100644 src/components/cards/ProjectCard.stories.ts create mode 100644 src/components/cards/StoryCard.astro create mode 100644 src/components/cards/StoryCard.stories.ts create mode 100644 src/components/cards/TeamCard.astro create mode 100644 src/components/cards/TeamCard.stories.ts create mode 100644 src/components/cards/TestimonialCard.astro create mode 100644 src/components/cards/TestimonialCard.stories.ts create mode 100644 src/components/layout/Footer.astro create mode 100644 src/components/layout/Footer.stories.ts create mode 100644 src/components/layout/Header.astro create mode 100644 src/components/layout/Header.stories.ts create mode 100644 src/components/sections/CardGrid.astro create mode 100644 src/components/sections/CardGrid.stories.ts create mode 100644 src/components/sections/CtaBand.astro create mode 100644 src/components/sections/CtaBand.stories.ts create mode 100644 src/components/sections/FAQ.astro create mode 100644 src/components/sections/FAQ.stories.ts create mode 100644 src/components/sections/FeatureGrid.astro create mode 100644 src/components/sections/FeatureGrid.stories.ts create mode 100644 src/components/sections/Hero.astro create mode 100644 src/components/sections/Hero.stories.ts create mode 100644 src/components/sections/NewsletterBand.astro create mode 100644 src/components/sections/NewsletterBand.stories.ts create mode 100644 src/components/sections/PageHeader.astro create mode 100644 src/components/sections/PageHeader.stories.ts create mode 100644 src/components/sections/Section.astro create mode 100644 src/components/sections/Section.stories.ts create mode 100644 src/components/sections/SectionHeading.astro create mode 100644 src/components/sections/SectionHeading.stories.ts create mode 100644 src/components/sections/StatsBand.astro create mode 100644 src/components/sections/StatsBand.stories.ts create mode 100644 src/components/ui/Button.astro create mode 100644 src/components/ui/Button.stories.ts create mode 100644 src/components/ui/Field.astro create mode 100644 src/components/ui/Field.stories.ts create mode 100644 src/components/ui/Icon.astro create mode 100644 src/components/ui/Icon.stories.ts create mode 100644 src/components/ui/Logo.astro create mode 100644 src/components/ui/Logo.stories.ts create mode 100644 src/components/ui/PillTag.astro create mode 100644 src/components/ui/PillTag.stories.ts create mode 100644 src/components/ui/Placeholder.astro create mode 100644 src/components/ui/Placeholder.stories.ts create mode 100644 src/components/ui/SwitchTabs.astro create mode 100644 src/components/ui/SwitchTabs.stories.ts create mode 100644 src/config/site.ts create mode 100644 src/content.config.ts create mode 100644 src/content/communities/en/iloilo.md create mode 100644 src/content/communities/en/manila.md create mode 100644 src/content/communities/fil/iloilo.md create mode 100644 src/content/communities/fil/manila.md create mode 100644 src/content/events/en/coffee-talk-faith-and-ai.md create mode 100644 src/content/events/en/hack2026-manila.md create mode 100644 src/content/events/en/hack2027-champion-info-session.md create mode 100644 src/content/events/en/iloilo-creatives-meetup.md create mode 100644 src/content/events/fil/coffee-talk-faith-and-ai.md create mode 100644 src/content/projects/en/bible-in-your-dialect.md create mode 100644 src/content/projects/en/church-website-kit.md create mode 100644 src/content/projects/en/ofw-stories.md create mode 100644 src/content/stories/en/getting-started-as-a-creative.mdx create mode 100644 src/content/stories/en/what-happened-at-hack2026.md create mode 100644 src/content/stories/en/why-indigitous-philippines.md create mode 100644 src/content/stories/fil/why-indigitous-philippines.md create mode 100644 src/content/team/en/juan-dela-cruz.md create mode 100644 src/content/team/en/maria-dela-cruz.md create mode 100644 src/content/team/en/pedro-penduko.md create mode 100644 src/i18n/en.ts create mode 100644 src/i18n/fil.ts create mode 100644 src/i18n/index.ts create mode 100644 src/layouts/BaseLayout.astro create mode 100644 src/lib/content.ts create mode 100644 src/lib/story.ts create mode 100644 src/pages/404.astro create mode 100644 src/pages/about/index.astro create mode 100644 src/pages/about/team.astro create mode 100644 src/pages/communities/[slug].astro create mode 100644 src/pages/communities/index.astro create mode 100644 src/pages/contact.astro create mode 100644 src/pages/events/[slug].astro create mode 100644 src/pages/events/index.astro create mode 100644 src/pages/fil/about/index.astro create mode 100644 src/pages/fil/about/team.astro create mode 100644 src/pages/fil/communities/[slug].astro create mode 100644 src/pages/fil/communities/index.astro create mode 100644 src/pages/fil/contact.astro create mode 100644 src/pages/fil/events/[slug].astro create mode 100644 src/pages/fil/events/index.astro create mode 100644 src/pages/fil/get-involved.astro create mode 100644 src/pages/fil/give.astro create mode 100644 src/pages/fil/hack.astro create mode 100644 src/pages/fil/index.astro create mode 100644 src/pages/fil/projects/[slug].astro create mode 100644 src/pages/fil/projects/index.astro create mode 100644 src/pages/fil/resources.astro create mode 100644 src/pages/fil/start-here.astro create mode 100644 src/pages/fil/stories/[slug].astro create mode 100644 src/pages/fil/stories/index.astro create mode 100644 src/pages/get-involved.astro create mode 100644 src/pages/give.astro create mode 100644 src/pages/hack.astro create mode 100644 src/pages/index.astro create mode 100644 src/pages/projects/[slug].astro create mode 100644 src/pages/projects/index.astro create mode 100644 src/pages/resources.astro create mode 100644 src/pages/start-here.astro create mode 100644 src/pages/stories/[slug].astro create mode 100644 src/pages/stories/index.astro create mode 100644 src/pages/storybook/index.astro create mode 100644 src/styles/global.css create mode 100644 src/views/About.astro create mode 100644 src/views/Communities.astro create mode 100644 src/views/CommunityDetail.astro create mode 100644 src/views/Contact.astro create mode 100644 src/views/EventDetail.astro create mode 100644 src/views/Events.astro create mode 100644 src/views/GetInvolved.astro create mode 100644 src/views/Give.astro create mode 100644 src/views/Hack.astro create mode 100644 src/views/Home.astro create mode 100644 src/views/NotFound.astro create mode 100644 src/views/ProjectDetail.astro create mode 100644 src/views/Projects.astro create mode 100644 src/views/Resources.astro create mode 100644 src/views/StartHere.astro create mode 100644 src/views/Stories.astro create mode 100644 src/views/StoryDetail.astro create mode 100644 src/views/Team.astro create mode 100644 tsconfig.json diff --git a/.claude/launch.json b/.claude/launch.json new file mode 100644 index 0000000..a792778 --- /dev/null +++ b/.claude/launch.json @@ -0,0 +1,11 @@ +{ + "version": "0.0.1", + "configurations": [ + { + "name": "astro-dev", + "runtimeExecutable": "pnpm", + "runtimeArgs": ["dev", "--port", "4321"], + "port": 4321 + } + ] +} diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..86a63dc --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..8adc4dc --- /dev/null +++ b/.env.example @@ -0,0 +1,4 @@ +# 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= diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..e1ea819 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,40 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + # Runs `pnpm build` (astro check + astro build) and uploads dist/ as a Pages artifact. + - uses: withastro/action@v6 + with: + package-manager: pnpm@12.16.1 + env: + PUBLIC_FORM_ENDPOINT: ${{ vars.PUBLIC_FORM_ENDPOINT }} + PUBLIC_NEWSLETTER_ENDPOINT: ${{ vars.PUBLIC_NEWSLETTER_ENDPOINT }} + + deploy: + if: github.event_name != 'pull_request' + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - id: deployment + uses: actions/deploy-pages@v5 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..235ca4e --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +dist/ +.astro/ +node_modules/ +.env +.env.* +!.env.example +.DS_Store diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..a45fd52 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +24 diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..d4a13c9 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,4 @@ +dist +.astro +node_modules +pnpm-lock.yaml diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..83ea840 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "singleQuote": true, + "printWidth": 100, + "plugins": ["prettier-plugin-astro", "prettier-plugin-tailwindcss"], + "overrides": [{ "files": "*.astro", "options": { "parser": "astro" } }] +} diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..1e8bb78 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,138 @@ +# 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). + +## 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. + +- Live: https://indigitousph.github.io (GitHub Pages) +- Languages: English (`/`) and Filipino (`/fil/`) +- Component showcase: `/storybook` + +## Stack + +- **Astro 7**, static output. There's 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. +- **pnpm**, Node 22+. + +## Commands + +```bash +pnpm install # install +pnpm dev # dev server → http://localhost:4321 +pnpm check # astro check (types + content schemas) +pnpm build # check + production build → dist/ +pnpm preview # serve dist/ +pnpm format # prettier +``` + +Run `pnpm build` before you call a change done. It must finish with **0 errors**. + +## 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 + */X.stories.ts ← story for X.astro, rendered on /storybook + config/site.ts nav, socials, external links (edit links HERE) + content///.md(x) + 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 + 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 +``` + +## 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/layout/Header.stories.ts b/src/components/layout/Header.stories.ts new file mode 100644 index 0000000..4ccdc66 --- /dev/null +++ b/src/components/layout/Header.stories.ts @@ -0,0 +1,13 @@ +import type { Story } from '@/lib/story'; +import Header from './Header.astro'; + +export default { + title: 'Header', + component: Header, + description: 'Sticky header. Below 1280px the nav collapses into a menu button.', + width: 'full', + variants: [ + { name: 'English', props: { lang: 'en' } }, + { name: 'Filipino', props: { lang: 'fil' } }, + ], +} satisfies Story; diff --git a/src/components/sections/CardGrid.astro b/src/components/sections/CardGrid.astro new file mode 100644 index 0000000..b0d3999 --- /dev/null +++ b/src/components/sections/CardGrid.astro @@ -0,0 +1,17 @@ +--- +/** Responsive grid for cards. */ +interface Props { + cols?: 2 | 3 | 4; + class?: string; +} +const { cols = 3, class: className } = Astro.props; +const colClasses = { + 2: 'sm:grid-cols-2', + 3: 'sm:grid-cols-2 lg:grid-cols-3', + 4: 'sm:grid-cols-2 lg:grid-cols-4', +}; +--- + +
+ +
diff --git a/src/components/sections/CardGrid.stories.ts b/src/components/sections/CardGrid.stories.ts new file mode 100644 index 0000000..5078400 --- /dev/null +++ b/src/components/sections/CardGrid.stories.ts @@ -0,0 +1,17 @@ +import type { Story } from '@/lib/story'; +import CardGrid from './CardGrid.astro'; + +const tiles = Array.from( + { length: 3 }, + (_, i) => `
Card ${i + 1}
`, +).join(''); + +export default { + title: 'CardGrid', + component: CardGrid, + width: 'full', + variants: [ + { name: '3 columns', props: { cols: 3 }, slot: tiles }, + { name: '2 columns', props: { cols: 2 }, slot: tiles }, + ], +} satisfies Story; diff --git a/src/components/sections/CtaBand.astro b/src/components/sections/CtaBand.astro new file mode 100644 index 0000000..98be429 --- /dev/null +++ b/src/components/sections/CtaBand.astro @@ -0,0 +1,48 @@ +--- +/** + * Big rounded call-to-action band ("Today, 3 billion people…", "Find your tribe here"). + * Put buttons in the default slot. + */ +interface Props { + eyebrow?: string; + title: string; + body?: string; + tone?: 'gradient' | 'ink' | 'yellow'; + class?: string; +} +const { eyebrow, title, body, tone = 'gradient', class: className } = Astro.props; +const tones = { + gradient: 'bg-brand-gradient text-ink', + ink: 'bg-ink text-white', + yellow: 'bg-brand-yellow text-ink', +}; +--- + +
+ +
+
+ {eyebrow && ( +

{eyebrow}

+ )} +

{title}

+ {body && ( +

{body}

+ )} +
+
+ +
+
+
diff --git a/src/components/sections/CtaBand.stories.ts b/src/components/sections/CtaBand.stories.ts new file mode 100644 index 0000000..48fd516 --- /dev/null +++ b/src/components/sections/CtaBand.stories.ts @@ -0,0 +1,28 @@ +import type { Story } from '@/lib/story'; +import CtaBand from './CtaBand.astro'; + +export default { + title: 'CtaBand', + component: CtaBand, + width: 'full', + variants: [ + { + name: 'Gradient', + props: { + eyebrow: 'Why it matters', + title: 'Today, 3 billion people don’t know Jesus', + body: 'Most of them are online.', + }, + slot: 'About us', + }, + { + name: 'Ink', + props: { + tone: 'ink', + title: 'Are you a creative or developer?', + body: 'Find your tribe here.', + }, + }, + { name: 'Yellow', props: { tone: 'yellow', title: 'Host #HACK in your city' } }, + ], +} satisfies Story; diff --git a/src/components/sections/FAQ.astro b/src/components/sections/FAQ.astro new file mode 100644 index 0000000..58d68fd --- /dev/null +++ b/src/components/sections/FAQ.astro @@ -0,0 +1,22 @@ +--- +import Icon from '../ui/Icon.astro'; + +/** Accordion built on
— no JS. */ +interface Props { + items: { q: string; a: string }[]; + class?: string; +} +const { items, class: className } = Astro.props; +--- + +
+ {items.map((item) => ( +
+ + {item.q} + + +

{item.a}

+
+ ))} +
diff --git a/src/components/sections/FAQ.stories.ts b/src/components/sections/FAQ.stories.ts new file mode 100644 index 0000000..b5586c4 --- /dev/null +++ b/src/components/sections/FAQ.stories.ts @@ -0,0 +1,22 @@ +import type { Story } from '@/lib/story'; +import FAQ from './FAQ.astro'; + +export default { + title: 'FAQ', + component: FAQ, + width: 'md', + variants: [ + { + name: 'Default', + props: { + items: [ + { + q: 'Do I need to know how to code?', + a: 'No! Every team needs designers, writers, storytellers and ministry leaders.', + }, + { q: 'How much does it cost?', a: 'Most Indigitous Philippines events are free.' }, + ], + }, + }, + ], +} satisfies Story; diff --git a/src/components/sections/FeatureGrid.astro b/src/components/sections/FeatureGrid.astro new file mode 100644 index 0000000..b0cb1d6 --- /dev/null +++ b/src/components/sections/FeatureGrid.astro @@ -0,0 +1,49 @@ +--- +import Icon, { type IconName } from '../ui/Icon.astro'; + +/** Icon + title + text items, optionally linked. Used for paths, programs, ways to help. */ +export interface FeatureItem { + icon: IconName; + title: string; + body: string; + href?: string; + cta?: string; +} +interface Props { + items: FeatureItem[]; + cols?: 2 | 3 | 4; + class?: string; +} +const { items, cols = 3, class: className } = Astro.props; +const colClasses = { + 2: 'sm:grid-cols-2', + 3: 'sm:grid-cols-2 lg:grid-cols-3', + 4: 'sm:grid-cols-2 lg:grid-cols-4', +}; +--- + +
    + {items.map((item) => ( +
  • + + + +

    + {item.href ? ( + + {item.title} + + ) : ( + item.title + )} +

    +

    {item.body}

    + {item.href && item.cta && ( + + {item.cta} + + + )} +
  • + ))} +
diff --git a/src/components/sections/FeatureGrid.stories.ts b/src/components/sections/FeatureGrid.stories.ts new file mode 100644 index 0000000..57104c5 --- /dev/null +++ b/src/components/sections/FeatureGrid.stories.ts @@ -0,0 +1,32 @@ +import type { Story } from '@/lib/story'; +import FeatureGrid from './FeatureGrid.astro'; + +export default { + title: 'FeatureGrid', + component: FeatureGrid, + width: 'full', + variants: [ + { + name: 'Three columns', + props: { + items: [ + { + icon: 'code', + title: 'Developers', + body: 'Build apps and tools that serve the church.', + href: '#', + cta: 'Start building', + }, + { + icon: 'palette', + title: 'Designers', + body: 'Make the gospel look as good as it is.', + href: '#', + cta: 'Start designing', + }, + { icon: 'video', title: 'Content creators', body: 'Tell stories that point to Jesus.' }, + ], + }, + }, + ], +} satisfies Story; diff --git a/src/components/sections/Hero.astro b/src/components/sections/Hero.astro new file mode 100644 index 0000000..488fb2f --- /dev/null +++ b/src/components/sections/Hero.astro @@ -0,0 +1,66 @@ +--- +/** + * Home hero. Big headline with a highlighted phrase, intro, CTAs (via `actions` slot) + * and an optional visual on the right (`visual` slot), defaulting to a brand collage. + */ +interface Props { + eyebrow?: string; + title: string; + /** Part of the title to highlight in yellow marker style. */ + highlight?: string; + intro?: string; + class?: string; +} +const { eyebrow, title, highlight, intro, class: className } = Astro.props; +const [before, after] = + highlight && title.includes(highlight) ? title.split(highlight) : [title, undefined]; +--- + +
+ +
+
+ {eyebrow &&

{eyebrow}

} +

+ {before} + {after !== undefined && ( + <> + + {highlight} + + {after} + + )} +

+ {intro &&

{intro}

} +
+ +
+
+
+ + + +
+
+
diff --git a/src/components/sections/Hero.stories.ts b/src/components/sections/Hero.stories.ts new file mode 100644 index 0000000..de31735 --- /dev/null +++ b/src/components/sections/Hero.stories.ts @@ -0,0 +1,21 @@ +import type { Story } from '@/lib/story'; +import Hero from './Hero.astro'; + +export default { + title: 'Hero', + component: Hero, + description: 'Home page hero. Put buttons in the `actions` slot.', + width: 'full', + variants: [ + { + name: 'Default', + props: { + eyebrow: 'Indigitous Philippines', + title: 'Helping Filipinos reach their world', + highlight: 'reach their world', + intro: + 'A community of Filipino followers of Jesus using tech and creativity for the gospel.', + }, + }, + ], +} satisfies Story; diff --git a/src/components/sections/NewsletterBand.astro b/src/components/sections/NewsletterBand.astro new file mode 100644 index 0000000..6c4c0c5 --- /dev/null +++ b/src/components/sections/NewsletterBand.astro @@ -0,0 +1,90 @@ +--- +import Button from '../ui/Button.astro'; +import Icon from '../ui/Icon.astro'; +import { site } from '@/config/site'; + +/** + * Newsletter signup on an orange band. Posts to PUBLIC_NEWSLETTER_ENDPOINT when set; + * otherwise shows only the WhatsApp / social links. + */ +interface Props { + title: string; + body: string; + altLabel: string; + labels: { firstName: string; email: string; subscribe: string }; + endpoint?: string; + class?: string; +} +const { + title, + body, + altLabel, + labels, + endpoint = import.meta.env.PUBLIC_NEWSLETTER_ENDPOINT, + class: className, +} = Astro.props; +--- + +
+
+
+

{title}

+

{body}

+
+
+ {endpoint && ( +
+ + + + + +
+ )} +
+ {altLabel} + + WhatsApp + + {site.socials.slice(0, 2).map((s) => ( + + {s.label} + + ))} +
+
+
+
diff --git a/src/components/sections/NewsletterBand.stories.ts b/src/components/sections/NewsletterBand.stories.ts new file mode 100644 index 0000000..f753c02 --- /dev/null +++ b/src/components/sections/NewsletterBand.stories.ts @@ -0,0 +1,19 @@ +import type { Story } from '@/lib/story'; +import NewsletterBand from './NewsletterBand.astro'; + +const base = { + title: 'Stay in the loop', + body: 'Get stories, events and #HACK news from across the Philippines.', + altLabel: 'Or follow us on', + labels: { firstName: 'First name', email: 'Email', subscribe: 'Subscribe' }, +}; + +export default { + title: 'NewsletterBand', + component: NewsletterBand, + width: 'full', + variants: [ + { name: 'With form', props: { ...base, endpoint: '#' } }, + { name: 'Links only (no endpoint)', props: { ...base, endpoint: '' } }, + ], +} satisfies Story; diff --git a/src/components/sections/PageHeader.astro b/src/components/sections/PageHeader.astro new file mode 100644 index 0000000..407aa37 --- /dev/null +++ b/src/components/sections/PageHeader.astro @@ -0,0 +1,46 @@ +--- +/** Inner-page header: eyebrow, title, intro and optional actions. */ +interface Props { + eyebrow?: string; + title: string; + intro?: string; + tone?: 'mist' | 'ink' | 'gradient'; + class?: string; +} +const { eyebrow, title, intro, tone = 'mist', class: className } = Astro.props; +const tones = { + mist: 'bg-mist text-ink', + ink: 'bg-ink text-white', + gradient: 'bg-brand-gradient text-ink', +}; +--- + +
+
+ {eyebrow && ( +

+ {eyebrow} +

+ )} +

{title}

+ {intro && ( +

+ {intro} +

+ )} +
+ +
+
+
diff --git a/src/components/sections/PageHeader.stories.ts b/src/components/sections/PageHeader.stories.ts new file mode 100644 index 0000000..067032d --- /dev/null +++ b/src/components/sections/PageHeader.stories.ts @@ -0,0 +1,28 @@ +import type { Story } from '@/lib/story'; +import PageHeader from './PageHeader.astro'; + +export default { + title: 'PageHeader', + component: PageHeader, + width: 'full', + variants: [ + { + name: 'Mist', + props: { + eyebrow: 'About', + title: 'Indigenous + digital', + intro: 'We help followers of Jesus take the gospel to new people, places and spaces.', + }, + }, + { + name: 'Ink', + props: { + tone: 'ink', + eyebrow: '#HACK Philippines', + title: 'Build for the Kingdom', + intro: 'A faith-driven hackathon every October.', + }, + }, + { name: 'Gradient', props: { tone: 'gradient', eyebrow: 'Give', title: 'Fuel the mission' } }, + ], +} satisfies Story; diff --git a/src/components/sections/Section.astro b/src/components/sections/Section.astro new file mode 100644 index 0000000..a85483f --- /dev/null +++ b/src/components/sections/Section.astro @@ -0,0 +1,16 @@ +--- +/** Vertical-rhythm wrapper. Every page section should use this for consistent spacing. */ +interface Props { + tone?: 'white' | 'mist' | 'ink'; + id?: string; + class?: string; +} +const { tone = 'white', id, class: className } = Astro.props; +const tones = { white: 'bg-white', mist: 'bg-mist', ink: 'bg-ink text-white' }; +--- + +
+
+ +
+
diff --git a/src/components/sections/Section.stories.ts b/src/components/sections/Section.stories.ts new file mode 100644 index 0000000..0a52d8d --- /dev/null +++ b/src/components/sections/Section.stories.ts @@ -0,0 +1,14 @@ +import type { Story } from '@/lib/story'; +import Section from './Section.astro'; + +export default { + title: 'Section', + component: Section, + description: 'Page section wrapper with consistent padding and container width.', + width: 'full', + variants: [ + { name: 'White', slot: '

Section content

' }, + { name: 'Mist', props: { tone: 'mist' }, slot: '

Section content

' }, + { name: 'Ink', props: { tone: 'ink' }, slot: '

Section content

' }, + ], +} satisfies Story; diff --git a/src/components/sections/SectionHeading.astro b/src/components/sections/SectionHeading.astro new file mode 100644 index 0000000..d2ac31e --- /dev/null +++ b/src/components/sections/SectionHeading.astro @@ -0,0 +1,44 @@ +--- +/** Section title with optional eyebrow, intro and a right-aligned action slot. */ +interface Props { + eyebrow?: string; + title: string; + intro?: string; + align?: 'left' | 'center'; + tone?: 'dark' | 'light'; + as?: 'h2' | 'h3'; + class?: string; +} +const { + eyebrow, + title, + intro, + align = 'left', + tone = 'dark', + as: Tag = 'h2', + class: className, +} = Astro.props; +--- + +
+
+ {eyebrow && ( +

+ {eyebrow} +

+ )} + {title} + {intro && ( +

{intro}

+ )} +
+
+ +
+
diff --git a/src/components/sections/SectionHeading.stories.ts b/src/components/sections/SectionHeading.stories.ts new file mode 100644 index 0000000..071ca1a --- /dev/null +++ b/src/components/sections/SectionHeading.stories.ts @@ -0,0 +1,27 @@ +import type { Story } from '@/lib/story'; +import SectionHeading from './SectionHeading.astro'; + +export default { + title: 'SectionHeading', + component: SectionHeading, + width: 'full', + variants: [ + { + name: 'Left', + props: { + eyebrow: 'Our events', + title: 'What’s coming up', + intro: 'Meetups, talks and #HACK across the Philippines.', + }, + }, + { + name: 'Center', + props: { align: 'center', eyebrow: 'Our community', title: 'Find your people' }, + }, + { + name: 'Light', + props: { tone: 'light', eyebrow: 'Stories', title: 'Latest from the network' }, + dark: true, + }, + ], +} satisfies Story; diff --git a/src/components/sections/StatsBand.astro b/src/components/sections/StatsBand.astro new file mode 100644 index 0000000..ee3ba85 --- /dev/null +++ b/src/components/sections/StatsBand.astro @@ -0,0 +1,43 @@ +--- +/** Row of big numbers. */ +interface Props { + stats: { value: string; label: string }[]; + tone?: 'ink' | 'yellow' | 'white'; + caption?: string; + class?: string; +} +const { stats, tone = 'ink', caption, class: className } = Astro.props; +const tones = { + ink: 'bg-ink text-white', + yellow: 'bg-brand-yellow text-ink', + white: 'bg-white text-ink ring-1 ring-stone', +}; +--- + +
+
+ {stats.map((s) => ( +
+
+ {s.label} +
+
+ {s.value} +
+
+ ))} +
+ {caption && ( +

{caption}

+ )} +
diff --git a/src/components/sections/StatsBand.stories.ts b/src/components/sections/StatsBand.stories.ts new file mode 100644 index 0000000..1b80715 --- /dev/null +++ b/src/components/sections/StatsBand.stories.ts @@ -0,0 +1,20 @@ +import type { Story } from '@/lib/story'; +import StatsBand from './StatsBand.astro'; + +const stats = [ + { value: '10,154', label: 'people at #HACK since 2016' }, + { value: '174', label: 'cities' }, + { value: '63', label: 'countries' }, + { value: '2', label: 'PH communities' }, +]; + +export default { + title: 'StatsBand', + component: StatsBand, + width: 'full', + variants: [ + { name: 'Ink', props: { stats, caption: 'Global #HACK figures from hack.indigitous.org.' } }, + { name: 'Yellow', props: { stats, tone: 'yellow' } }, + { name: 'White', props: { stats, tone: 'white' } }, + ], +} satisfies Story; diff --git a/src/components/ui/Button.astro b/src/components/ui/Button.astro new file mode 100644 index 0000000..be8d439 --- /dev/null +++ b/src/components/ui/Button.astro @@ -0,0 +1,66 @@ +--- +import Icon, { type IconName } from './Icon.astro'; + +/** + * Pill button / link. Renders when `href` is set, otherwise