diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..4f8d59c --- /dev/null +++ b/.env.example @@ -0,0 +1,5 @@ +# Public event submission launch control. The flag fails closed when omitted. +# +# Private beta: enabled=true, then share /events/submit/ directly. +# Safety shutdown: enabled=false. +PUBLIC_EVENT_SUBMISSIONS_ENABLED=false diff --git a/.github/workflows/deploy-cloudflare-workers.yml b/.github/workflows/deploy-cloudflare-workers.yml index 8196180..737c379 100644 --- a/.github/workflows/deploy-cloudflare-workers.yml +++ b/.github/workflows/deploy-cloudflare-workers.yml @@ -18,6 +18,9 @@ concurrency: group: cloudflare-workers-production cancel-in-progress: false +env: + PUBLIC_EVENT_SUBMISSIONS_ENABLED: ${{ vars.PUBLIC_EVENT_SUBMISSIONS_ENABLED }} + jobs: validate-and-build: name: Build static site diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1518424..a0e8e99 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,6 +18,9 @@ concurrency: group: github-pages cancel-in-progress: false +env: + PUBLIC_EVENT_SUBMISSIONS_ENABLED: ${{ vars.PUBLIC_EVENT_SUBMISSIONS_ENABLED }} + jobs: build: name: Build static site diff --git a/README.md b/README.md index 4d63c98..be3587d 100644 --- a/README.md +++ b/README.md @@ -53,8 +53,29 @@ the build uses `content/meetups/*.yaml` instead. This keeps the public site deployable during a temporary upstream incident without exposing organizer credentials or connecting the browser directly to the operational system. -Pushes to `main`, manual workflow runs, and the existing Monday/Thursday -scheduled builds refresh the static meetup snapshot. +Pushes to `main`, manual workflow runs, and the daily `06:17 UTC` scheduled +build refresh the static event snapshot. + +## Public event submission launch controls + +Event submissions use one fail-closed build-time flag. Add it as a GitHub +Actions repository variable so GitHub Pages and Cloudflare produce the same +static release: + +| Variable | Purpose | +| :-- | :-- | +| `PUBLIC_EVENT_SUBMISSIONS_ENABLED` | Hard website safety switch. When it is not `true`, `/events/submit/` redirects to `/events/`. | + +- Private beta: set the variable to `true`, then share `/events/submit/` + directly with testers. +- Safety shutdown: set enabled to `false` and rebuild both static deployments. + +The website does not render an event-submission link during beta, and the form +page remains `noindex`. Its permanent public entry point will be chosen after +beta. An unset variable is treated as `false`. Local development can copy +`.env.example` to `.env` and opt in explicitly. This website flag does not +disable direct requests to Events Management; the backend needs its own runtime +switch for a system-wide shutdown. ## Cloudflare Workers deployment diff --git a/docs/screenshots/community-event-submission/01-event-details.png b/docs/screenshots/community-event-submission/01-event-details.png new file mode 100644 index 0000000..5afef57 Binary files /dev/null and b/docs/screenshots/community-event-submission/01-event-details.png differ diff --git a/docs/screenshots/community-event-submission/02-place-and-time.png b/docs/screenshots/community-event-submission/02-place-and-time.png new file mode 100644 index 0000000..db390d0 Binary files /dev/null and b/docs/screenshots/community-event-submission/02-place-and-time.png differ diff --git a/docs/screenshots/community-event-submission/03-contact-and-human-check.png b/docs/screenshots/community-event-submission/03-contact-and-human-check.png new file mode 100644 index 0000000..3d9b240 Binary files /dev/null and b/docs/screenshots/community-event-submission/03-contact-and-human-check.png differ diff --git a/docs/screenshots/community-event-submission/04-submitted-for-review.png b/docs/screenshots/community-event-submission/04-submitted-for-review.png new file mode 100644 index 0000000..c11bf81 Binary files /dev/null and b/docs/screenshots/community-event-submission/04-submitted-for-review.png differ diff --git a/src/components/AppDateTimePicker.astro b/src/components/AppDateTimePicker.astro new file mode 100644 index 0000000..434cd40 --- /dev/null +++ b/src/components/AppDateTimePicker.astro @@ -0,0 +1,349 @@ +--- +interface Props { + id: string; + name: string; + label: string; + required?: boolean; +} + +const { id, name, label, required = false } = Astro.props; +--- + +
+ + + + + +

+
+ + + + diff --git a/src/components/AppTimezonePicker.astro b/src/components/AppTimezonePicker.astro new file mode 100644 index 0000000..24a40c0 --- /dev/null +++ b/src/components/AppTimezonePicker.astro @@ -0,0 +1,357 @@ +--- +interface Props { + id: string; + name: string; + label: string; + hint?: string; + required?: boolean; +} + +const { + id, + name, + label, + hint = 'Detected from your device. Change it if the event uses another time zone.', + required = false, +} = Astro.props; +--- + +
+ + + +
+ + + +
+ +

{hint}

+

+
+ + + + diff --git a/src/components/FooterSection.astro b/src/components/FooterSection.astro index 623f2f9..92ae5c4 100644 --- a/src/components/FooterSection.astro +++ b/src/components/FooterSection.astro @@ -21,12 +21,12 @@ const year = new Date().getFullYear(); diff --git a/src/components/MeetupsSection.astro b/src/components/MeetupsSection.astro index 3601e2e..090773f 100644 --- a/src/components/MeetupsSection.astro +++ b/src/components/MeetupsSection.astro @@ -34,15 +34,15 @@ const statusConfig = { }; --- -
+
- Meetups + Events
diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro index 68a4950..fbb22c4 100644 --- a/src/components/Navbar.astro +++ b/src/components/Navbar.astro @@ -1,5 +1,9 @@ --- -interface Props { slackUrl: string; paystackUrl: string; } +interface Props { + slackUrl: string; + paystackUrl: string; +} + const { slackUrl, paystackUrl } = Astro.props; --- @@ -10,9 +14,9 @@ const { slackUrl, paystackUrl } = Astro.props;