Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Set the following in the Cloudflare Pages dashboard (Production and Preview are
- `EO_API_KEY` — EmailOctopus donor/member sync
- `QGIV_API_TOKEN` — Qgiv reporting API token used to verify completed transactions server-side. Permanent token, scoped to the membership, supporting-member and donation forms. **Required:** without it both completion endpoints fail closed and no member is invited.
- `PLAUSIBLE_API_KEY` — Stats API for the admin conversion dashboard
- `NAV_ASSIGNMENT_SECRET` — random string (e.g. `openssl rand -hex 32`) keying the daily, cookie-free visitor hash for the navbar A/B test (`src/lib/navAssignment.ts`). Without it the variant is re-picked on every request and a warning is logged.
- `NAV_ASSIGNMENT_SECRET` — random string (e.g. `openssl rand -hex 32`) keying the daily, cookie-free visitor hash for server-side A/B tests, currently the homepage hero photo test (`src/lib/visitorAssignment.ts`). Without it nobody is assigned (everyone sees the control) and a warning is logged. The name dates from the first test, the navbar label test.
- `ADMIN_USERNAME`, `ADMIN_PASSWORD` — HTTP Basic Auth for `/admin/conversions`

**Sentry**
Expand Down
4 changes: 4 additions & 0 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ export const onRequest = sequence(sentryInit, securityHeaders, cacheControl, csp
| **EmailOctopus** | `api/donation-complete.ts`, `api/membership-complete.ts` | Donor/member mailing list sync |
| **Sentry** | `sentry.client.config.js`, `sentry.server.config.js`, `src/lib/report-error.ts`, inbound webhook at `api/sentry-webhook.ts` | Error monitoring + Mattermost alert relay |

## Homepage hero photo A/B test

The homepage hero photo is a GrowthBook experiment (`homepage-hero-photo`, four variants), assigned server-side in `src/pages/index.astro` via `src/lib/heroPhotoAssignment.ts` and measured in Plausible through the `hero_photo` pageview property and `Homepage Link Click` events. Visitors are assigned with the daily cookieless visitor hash in `src/lib/visitorAssignment.ts`. Any assignment failure falls back to the control photo. See `docs/superpowers/specs/2026-11-25-homepage-hero-photo-ab-test-design.md`.

## Content collections

`src/content/config.ts` currently defines `collections = {}` — empty. Older documentation and some historical plans reference markdown-based `ideas/`/`projects/` content collections; that data now comes from Notion and ProjectHub respectively (see tables above). Don't assume `src/content/` holds live data without checking the collections config first.
Expand Down
64 changes: 32 additions & 32 deletions docs/ENVIRONMENT.md

Large diffs are not rendered by default.

186 changes: 186 additions & 0 deletions docs/superpowers/plans/2026-11-25-homepage-hero-photo-ab-test.md

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Binary file added public/images/hero/laptops-1600.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/hero/laptops-800.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/hero/speaker-1600.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/hero/speaker-800.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/hero/stage-1600.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/hero/stage-800.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 12 additions & 5 deletions src/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ import Socials from "./Socials.astro";

const currentYear = new Date().getFullYear();

// Mirrors the navbar's categories/links exactly (src/components/NavBar.svelte navigation map)
// Mirrors the navbar's categories/links (the navigation map in src/components/Navigation.astro)
const footerNavigation: Record<string, { href?: string; links: [string, string][] }> = {
About: {
href: "/about",
links: [
["Our Organization", "/about"],
["Team", "/team"],
["Media", "/media"],
["FAQ", "/faq"],
["Contact Us", "/contact"],
],
Expand All @@ -22,8 +21,7 @@ const footerNavigation: Record<string, { href?: string; links: [string, string][
["Start a project", "/incubator"],
["November Challenge", "/monthly-challenge"],
["All projects", "/projects"],
["Project Opportunities", "/ideas"],
["Tools", "/tools"],
["Adopt a Project", "/ideas"],
],
},
"Get Involved": {
Expand All @@ -45,6 +43,15 @@ const footerNavigation: Record<string, { href?: string; links: [string, string][
["Berlin Tech Rebellion", "https://techrebellion.techforpalestine.org/"],
],
},
Resources: {
href: "/tools",
links: [
["Updates", "https://updates.techforpalestine.org"],
["Tools", "/tools"],
["Hiring Palestinians", "/help/hire"],
["Media", "/media"],
],
},
};
---

Expand Down Expand Up @@ -95,7 +102,7 @@ const footerNavigation: Record<string, { href?: string; links: [string, string][
</div>

<!-- Right Columns: Site Index -->
<div class="grid grid-cols-2 gap-8 md:grid-cols-4 lg:col-span-7">
<div class="grid grid-cols-2 gap-8 md:grid-cols-3 lg:col-span-7 lg:grid-cols-5">
{
Object.entries(footerNavigation).map(([category, { href, links }]) => (
<div class="space-y-4">
Expand Down
36 changes: 17 additions & 19 deletions src/components/NavBar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
export let navigation: Map<string, {
href: string,
submenu: Array<[string, string]> | null,
// Set when the item is under an A/B test; read by trackNavLabel (src/utils/navLabelExperiment.ts).
experiment?: {name: string, variant: string},
}>;
export let currentRoute: string;
// Unused: only declared so @astrojs/svelte's generated types allow the named
Expand Down Expand Up @@ -107,10 +105,10 @@
</a>
</div>

<!-- Desktop Navigation: from xl (1280px). Below that the items plus the two
buttons don't fit on one line ("Member Opportunities", the nav label A/B
variant, is the longest), so narrower screens use the burger menu. -->
<nav class="hidden xl:flex xl:items-center xl:space-x-8">
<!-- Desktop Navigation: from xl (1280px). Below that the items plus the three
buttons don't fit on one line ("Member Opportunities" is the longest), so narrower screens use the burger menu. The gap
between items is tighter until 2xl so everything fits at 1280px. -->
<nav class="hidden xl:flex xl:items-center xl:space-x-6 2xl:space-x-8">
{#each navigation as [label, item]}
<div class="relative">
{#if item.submenu}
Expand All @@ -123,8 +121,6 @@
>
<a
href={item.href}
data-experiment={item.experiment?.name}
data-variant={item.experiment?.variant}
on:focus={() => activeDropdown = label}
class="whitespace-nowrap text-gray-900 hover:text-blue-600 font-medium transition-colors duration-200 {currentRoute.replace(/\/$/, '') === item.href ? 'text-blue-600' : ''}"
>
Expand Down Expand Up @@ -160,8 +156,6 @@
<a
href={subHref}
role="menuitem"
data-experiment={item.experiment?.name}
data-variant={item.experiment?.variant}
on:keydown={handleMenuKeydown}
target={subHref.startsWith('http') ? '_blank' : undefined}
rel={subHref.startsWith('http') ? 'noopener noreferrer' : undefined}
Expand All @@ -176,8 +170,6 @@
<!-- Regular Menu Item -->
<a
href={item.href}
data-experiment={item.experiment?.name}
data-variant={item.experiment?.variant}
class="whitespace-nowrap text-gray-900 hover:text-blue-600 font-medium transition-colors duration-200 {currentRoute.replace(/\/$/, '') === item.href ? 'text-blue-600' : ''}"
>
{label}
Expand All @@ -188,7 +180,7 @@
</nav>
</div>

<!-- Right side: Hub and Become a Member -->
<!-- Right side: Hub, Become a Member and Donate -->
<div class="hidden xl:flex gap-4 2xl:gap-6 items-center">
<a
href={HUB_URL}
Expand All @@ -204,6 +196,12 @@
Become a Member
</a>
</div>
<a
href="/supporting-member"
class="bg-[#101010] hover:bg-[#2c2d29] text-white font-semibold py-2.5 px-5 text-sm 2xl:py-3 2xl:px-7 2xl:text-base 2xl:font-bold rounded-lg shadow-md hover:shadow-lg transition-all duration-200 transform hover:-translate-y-0.5 whitespace-nowrap focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#101010] focus-visible:ring-offset-2"
>
Donate
</a>
</div>

<!-- Mobile Header -->
Expand Down Expand Up @@ -240,8 +238,6 @@
<div class="flex items-center justify-between w-full">
<a
href={item.href}
data-experiment={item.experiment?.name}
data-variant={item.experiment?.variant}
class="flex-1 text-lg text-gray-800 hover:text-blue-600 transition duration-200 ease-in-out {currentRoute.replace(/\/$/, '') === item.href ? 'font-semibold text-blue-600' : ''}"
>
{label}
Expand Down Expand Up @@ -274,8 +270,6 @@
<a
href={subHref}
role="menuitem"
data-experiment={item.experiment?.name}
data-variant={item.experiment?.variant}
on:keydown={handleMenuKeydown}
target={subHref.startsWith('http') ? '_blank' : undefined}
rel={subHref.startsWith('http') ? 'noopener noreferrer' : undefined}
Expand All @@ -290,8 +284,6 @@
<!-- Regular Mobile Item -->
<a
href={item.href}
data-experiment={item.experiment?.name}
data-variant={item.experiment?.variant}
class="block w-full text-lg text-gray-800 hover:text-blue-600 transition duration-200 ease-in-out {currentRoute.replace(/\/$/, '') === item.href ? 'font-semibold text-blue-600' : ''}"
>
{label}
Expand All @@ -306,6 +298,12 @@
>
Become a Member
</a>
<a
href="/supporting-member"
class="mt-3 block w-full text-center bg-[#101010] hover:bg-[#2c2d29] text-white font-bold py-3 rounded-lg shadow-md hover:shadow-lg transition-all duration-200"
>
Donate
</a>
<a
href={HUB_URL}
class="mt-3 block w-full text-center border-2 border-green-700 text-green-700 hover:bg-green-50 font-semibold py-3 rounded-lg transition-colors duration-200"
Expand Down
46 changes: 15 additions & 31 deletions src/components/Navigation.astro
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
---
import { Icon } from "astro-icon/components";
import NavBar from "./NavBar.svelte";
import { assignNavLabelVariant } from "../lib/navAssignment";
import { NAV_LABEL_EXPERIMENT, NAV_VARIANTS } from "../utils/navLabelExperiment";
import { buildSession } from "../data/challenges/november-2026";

const currentRoute = Astro.url.pathname;

// A: "Get Involved" with its submenu vs B: "Member Opportunities" linking straight to
// /volunteer. GrowthBook picks the variant on the
// server and it is rendered into the HTML, so there is no flicker. The id is a keyed hash of
// the day, IP and User-Agent (src/lib/navAssignment.ts): a visitor keeps one label all day
// and nothing is stored on their device. Without an assignment (flag off, CDN down, or
// NAV_ASSIGNMENT_SECRET unset) everyone sees variant A and nothing is tracked. Pages are served `private` (see
// src/middleware/cache-control.ts) so a shared cache never hands one visitor's label to others.
const assignedVariant = await assignNavLabelVariant(Astro.request, Astro.locals);
const navVariant = NAV_VARIANTS[assignedVariant ?? "A"];

// Temporary Events entries. The build session link drops out on its own once
// the session ends (pages are SSR'd per request).
const isBuildSessionUpcoming = Date.now() < Date.parse(buildSession.endsAt);
Expand All @@ -30,7 +18,6 @@ const eventsSubmenu: [string, string][] = [
type NavItem = {
href: string;
submenu: [string, string][] | null;
experiment?: { name: string; variant: string };
};

const navigation: Map<string, NavItem> = new Map([
Expand All @@ -48,7 +35,6 @@ const navigation: Map<string, NavItem> = new Map([
submenu: [
["Our Organization", "/about"],
["Team", "/team"],
["Media", "/media"],
["FAQ", "/faq"],
["Contact Us", "/contact"],
] as [string, string][],
Expand All @@ -62,19 +48,16 @@ const navigation: Map<string, NavItem> = new Map([
["View Projects", "/projects"],
["Start a project", "/incubator"],
["November Challenge", "/monthly-challenge"],
["Project Opportunities", "/ideas"],
["Tools", "/tools"],
["Adopt a Project", "/ideas"],
] as [string, string][],
},
],
[
navVariant.label,
// Won the "Get Involved" vs "Member Opportunities" A/B test (November 2026).
"Member Opportunities",
{
href: navVariant.href,
submenu: navVariant.submenu,
experiment: assignedVariant
? { name: NAV_LABEL_EXPERIMENT, variant: assignedVariant }
: undefined,
href: "/volunteer",
submenu: null,
},
],
[
Expand All @@ -85,10 +68,17 @@ const navigation: Map<string, NavItem> = new Map([
},
],
[
"Updates",
// Tools and Media moved here from Projects and About. The label itself has no page of
// its own, so it opens Tools, the first internal page in the list.
"Resources",
{
href: "https://updates.techforpalestine.org",
submenu: null,
href: "/tools",
submenu: [
["Updates", "https://updates.techforpalestine.org"],
["Tools", "/tools"],
["Hiring Palestinians", "/help/hire"],
["Media", "/media"],
] as [string, string][],
},
],
]);
Expand All @@ -100,9 +90,3 @@ const navigation: Map<string, NavItem> = new Map([
<Icon name="solar:hamburger-menu-outline" class="h-8 w-8" slot="burger-icon" />
<Icon name="mdi:close" class="h-8 w-8" slot="close" />
</NavBar>

<script>
import { trackNavLabel } from "../utils/navLabelExperiment";

trackNavLabel();
</script>
45 changes: 45 additions & 0 deletions src/components/donate/OtherWaysToGive.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
// "Other ways to give": stock and crypto, corporate match, major gifts.
// Shared by /donate and /supporting-member so the two never drift apart.
---

<div class="rounded-xl border border-gray-200 bg-white/70 p-6">
<h3 class="text-lg font-semibold text-gray-800">Other ways to give</h3>
<ul class="mt-4 list-disc space-y-4 pl-5 text-gray-700 marker:text-green-700">
<li>
<h4 class="font-semibold text-gray-800">Stock & Cryptocurrency</h4>
<p class="mt-1 text-sm">
To make a gift via stock or cryptocurrency, visit our <a
href="https://thegivingblock.com/donate/tech-for-palestine/"
target="_blank"
rel="noopener noreferrer"
class="font-semibold text-green-700 underline hover:text-green-800">form here</a
>.
</p>
</li>
<li>
<h4 class="font-semibold text-gray-800">Corporate Match</h4>
<p class="mt-1 text-sm">
If your employer uses Benevity to match your contribution, find us <a
href="https://causes.benevity.org/user"
target="_blank"
rel="noopener noreferrer"
class="font-semibold text-green-700 underline hover:text-green-800"
>on the Benevity Causes Portal</a
>.
</p>
</li>
<li>
<h4 class="font-semibold text-gray-800">Major Gifts</h4>
<p class="mt-1 text-sm">
For more information about making a major gift or for other questions about donations,
please contact
<a
href="mailto:[email protected]"
class="font-semibold text-green-700 underline hover:text-green-800"
>donations&#64;techforpalestine.org</a
>
</p>
</li>
</ul>
</div>
10 changes: 7 additions & 3 deletions src/components/home/ChallengePopup.astro
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,13 @@ const sessions = [
if (shouldShowPopup(readPopupState(safeLocalStorage()), Date.now())) schedule(dialog);
}

function track(event: string, props?: Record<string, string>) {
function track(
event: string,
props?: Record<string, string>,
options?: { interactive?: boolean }
) {
if (typeof window.plausible === "undefined") return;
window.plausible(event, props ? { props } : undefined);
window.plausible(event, props || options ? { props, ...options } : undefined);
}

function schedule(dialog: HTMLDialogElement) {
Expand Down Expand Up @@ -475,7 +479,7 @@ const sessions = [
dialog.showModal();
document.documentElement.setAttribute(SHOWN_ATTRIBUTE, "");
window.dispatchEvent(new Event(SHOWN_EVENT));
track("Challenge Popup Shown", { challenge: "2026-11" });
track("Challenge Popup Shown", { challenge: "2026-11" }, { interactive: false });
};
const onScroll = () => {
const docHeight = document.documentElement.scrollHeight;
Expand Down
2 changes: 1 addition & 1 deletion src/components/home/NewsletterPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function Popup() {
useEffect(() => {
if (!visible || shownRef.current) return;
shownRef.current = true;
window.plausible("Newsletter Popup Shown");
window.plausible("Newsletter Popup Shown", { interactive: false });
}, [visible]);

// Auto-collapse the open card/bar after COLLAPSE_IDLE_MS of no activity.
Expand Down
10 changes: 7 additions & 3 deletions src/components/home/ReportPopup.astro
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,13 @@ const live = isReportPopupLive();
}
}

function track(event: string, props?: Record<string, string>) {
function track(
event: string,
props?: Record<string, string>,
options?: { interactive?: boolean }
) {
if (typeof window.plausible === "undefined") return;
window.plausible(event, props ? { props } : undefined);
window.plausible(event, props || options ? { props, ...options } : undefined);
}

function schedule(dialog: HTMLDialogElement) {
Expand Down Expand Up @@ -314,7 +318,7 @@ const live = isReportPopupLive();
dialog.showModal();
document.documentElement.setAttribute(REPORT_SHOWN_ATTRIBUTE, "");
window.dispatchEvent(new Event(REPORT_SHOWN_EVENT));
track("Report Popup Shown");
track("Report Popup Shown", undefined, { interactive: false });
};
const onScroll = () => {
const docHeight = document.documentElement.scrollHeight;
Expand Down
Loading
Loading