Commit graph

190 commits

Author SHA1 Message Date
King Omar
a851ef28df Add "We Build What We Believe" evidence grid to homepage
Movement-hub framing: mission-aligned projects (Ghost, Watermelon,
Search, Browser, Cipher, I Am the Law) shown as proof the ideology
ships as software, between the One-Law manifesto and the join form.
Theme-aware, links out to the full labs hub.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-23 22:29:04 +10:00
King Omar
9c957b414e Fix light mode: about-title, policy-box text, profile label colors 2026-07-12 22:27:17 +10:00
King Omar
e9ddf8bb34 Add user profile settings with photo upload
- Profile avatar button fixed top-left on all pages (initials fallback with
  hashed color when no photo set)
- Profile modal: change display name, upload photo, switch theme
- PATCH /api/users/:id updates name in D1; syncs back to currentUser
- POST /api/users/:id/avatar uploads image to R2 as avatars/{userId}.ext,
  stores URL in D1 users.avatar_url (new column via ALTER TABLE)
- Author avatars shown on proposal cards, modal view, and comments
- serveMedia fixed to use R2 httpMetadata contentType and full key path

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-12 21:14:07 +10:00
King Omar
942da4b6a5 Add light/dark theme toggle to all pages
- Flash-prevention script in <head> reads radical_theme from localStorage and
  sets data-theme on <html> before first paint — no FOUC
- Fixed ☀️/🌙 button (top-right, z-index 9999) on index, admin, and login using
  CSS ::before so the icon is driven by data-theme with no JS initialization
- Light mode: #F5F3EF warm off-white body, #E8E6E2 cards, #CCC borders, #111 text
- Pink accent (#ff0099) unchanged in both modes
- Signed-in users: theme saved to radical_user localStorage object and applied
  on load so preference follows their session

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-12 16:50:24 +10:00
King Omar
ad058c1978 Fix #join scroll on mobile — await dynamic content before scrolling to hash 2026-07-12 16:14:50 +10:00
King Omar
046937dc37 Add Worker routes for sitemap.xml and robots.txt
Pages was serving index.html (SPA fallback) for these paths because no Worker
route existed to intercept them. Worker already has serveSitemap() and the
robots.txt inline response — they just weren't being reached.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-12 13:55:42 +10:00
King Omar
808de57b04 Add static sitemap.xml and robots.txt for Cloudflare Pages
Worker routes only cover api/*, memes/*, audio/*, styles.css — sitemap.xml
and robots.txt were falling through to Pages with no file to serve (404).
Google Search Console couldn't fetch the sitemap for this reason.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-12 13:50:27 +10:00
King Omar
786a23667d SEO: fix head placement, add sitemap/robots, update title to The Radical Party
- Move canonical, robots, JSON-LD, sitemap link inside <head> (were incorrectly
  placed after </head>, causing Google to ignore them)
- Title changed to "The Radical Party | Direct Democracy for Australia" so the
  party name shows up in search results
- Description now leads with "The Radical Party" for brand recognition
- Keywords updated to include "The Radical Party", "radical party australia", CIR
- JSON-LD updated to dual WebSite + Organization schema with richer data
- Added /robots.txt endpoint (was 404) pointing crawlers to sitemap
- Added /sitemap.xml endpoint (was 404) with homepage + top 50 proposals

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-12 13:44:44 +10:00
King Omar
966bfa9a9e Add The Milk Man (s.6) and DASSOM Ambassador (5A.2A)
Section 6 — The Milk Man:
- Appointed by Founding Fathers/Mummies
- Sole role: relay comms between DASSOM Ambassador and public council
- May only ever contact exactly 1 DASSOM agent (the Ambassador)
- Must relay all messages accurately without alteration
- If found dishonest by DASSOM: 72 lashes administered by Members
- Removable at any time by unanimous public council resolution

Clause 5A.2A — DASSOM Ambassador:
- DASSOM designates one agent as external contact point
- Identity confidential except to the Milk Man
- Rotatable by internal DASSOM resolution

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 05:41:46 +10:00
King Omar
9d135207b9 DASSOM 5A.1: agents not members; 5A.2: 3/4 vote instead of unanimous 2026-07-01 05:32:41 +10:00
King Omar
e4572da148 Remove Convenor — DASSOM makes it redundant
Section 6 (Convenor and Reserved Powers) deleted entirely. DASSOM's
veto over all public council changes and unanimous-vote requirement on
all decisions replaces the Convenor's protective functions.

Clause 9.1 updated: amendments now require unanimous Founding
Fathers/Mummies + unanimous DASSOM (if doxxed).
Clause 5.5 updated: hardcode 5 public / 4 DASSOM agent counts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 05:24:07 +10:00
King Omar
cf6da0a59c DASSOM: rename member → agent throughout 2026-07-01 05:20:51 +10:00
King Omar
2612c49c47 DASSOM 5A.6: max 2 members may meet at any one time 2026-07-01 05:18:26 +10:00
King Omar
128b2f4d3b Remove DASSOM explanation from drafting notes 2026-07-01 05:14:03 +10:00
King Omar
00699db4f8 Constitution v3.0: add DASSOM hidden council (Mossad backwards)
- 5 public Founding Fathers/Mummies, 4 covert DASSOM members
- DASSOM composition changes: unanimous DASSOM vote required
- Public council changes: 51% public + 51% DASSOM both required
- All other public council decisions: unanimous (+ unanimous DASSOM if doxxed)
- Doxx trigger: 51% of DASSOM OR 100% of public council
- Effect of doxx: DASSOM gains unanimous veto on all decisions
- Clause 5A.6: confidentiality duty, breach = grounds for removal
- Drafting note acknowledges DASSOM is legally operative and named after
  Mossad backwards

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 05:10:15 +10:00
King Omar
0a10876348 Constitution v3.0: Founding Fathers/Mummies, bold fix, trim blackmail clause
- Version 2.0 → 3.0
- National Council → Founding Fathers/Mummies (Acting Dictators & Supreme Leaders)
- Section 5 heading updated
- Fix bold text rendering: .const-clause uses absolute-positioned .const-num
  instead of flex layout (which fragmented inline <strong> tags)
- Clause 14: strip to disclosure-only (14.1), remove 14.2-14.6
- Rename section to "Blackmail and Dark Forces"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 04:38:05 +10:00
King Omar
69f77b1e46 Add admin dashboard + member DB storage
worker.js:
- Store join submissions in new 'members' D1 table (in addition to email)
- Add GET /api/admin/members — full member list, password gated
- Add GET /api/admin/stats — member counts, by-state breakdown, recent
  signups, top petitions, site stats; all password gated ('dictator')

admin.html:
- Password gate → full dashboard
- AEC progress bar (X/2000 with % and members-to-go)
- Stat cards: total members, this week, site users, proposals, votes
- State breakdown with mini bars
- Recent signups (last 10, NEW badge for this week)
- Top 10 petitions by signature count
- Full searchable/filterable/sortable member table with NEW badges
- CSV export (respects active search + state filter)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 04:32:53 +10:00
King Omar
c16b159e04 Constitution 9.2: members encouraged to propose amendments, still can't vote 2026-07-01 04:24:56 +10:00
King Omar
6e3b71578e Constitution v2.0 updates: RAD abbreviation, Mickey logo, blackmail clause
- Change abbreviation from [TRP] to RAD
- Clause 1.2: add Mickey Mouse obscene gesture logo reference
- Add clause 14: Coercion, Blackmail and Compromised Members (6 sub-clauses
  covering duty to disclose, void acts, suspension, removal, protection from
  liability, and definition of dark forces)
- Update adopted date to 1 July 2026

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 04:23:15 +10:00
King Omar
71ce5e8226 Add contact email potato@theradicalparty.com 2026-07-01 04:20:25 +10:00
King Omar
1b4414c575 Add Constitution v2.0 section for AEC federal registration
Collapsible section with full draft constitution: 13 clauses covering
name, objects (direct democracy/CIR), open membership, National Council
governance, Convenor reserved powers, officers, candidate endorsement,
amendment, finances, transition/devolution, winding up, disputes.

Includes drafting notes box (styled separately, marked for deletion
before lodgement). Footer link added.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 04:11:51 +10:00
King Omar
78454eee26 Switch background audio to Not Like Us (trimmed from 36s)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 23:53:36 +10:00
King Omar
bf18f882da Remove 'ban face coverings' from Switzerland examples 2026-06-27 03:41:40 +10:00
King Omar
e1b3c7600e Fix comments not loading: disable 24hr Cloudflare cache on comments endpoint
getComments was using createResponse default cacheDuration=86400 (24 hours).
Cloudflare was serving a stale cached response, so comments appeared empty
or outdated on every load. Set cacheDuration=0 (no-store) so each request
hits the DB fresh.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 03:38:12 +10:00
King Omar
fe1245faf9 67 policies (very specific) 2026-06-27 03:27:54 +10:00
King Omar
7f004104e2 Fix comments: remove 1s queue, direct fetch, optimistic rendering
The queue (COMMENT_REQUEST_DELAY=1000ms) was causing all comment loads to
wait 1 second regardless of context. Comments are always user-triggered
(toggle click, modal open, post submit) so batching was pointless overhead.

- loadComments() now does a direct async fetch — no queue, no delay
- submitComment() optimistically renders the new comment instantly (faded)
  then replaces with real server data once the POST confirms
- Remove batchLoadComments, queueCommentLoad, updateCommentCount, and all
  queue machinery (commentRequestQueue, commentRequestTimeout, etc.)
- Toggle arrow direction preserved during count updates
- All containers updated via querySelectorAll (feed card + modal)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 03:26:17 +10:00
King Omar
89c548bb86 Replace broken share/image buttons with clean text actions
Remove custom-copy-button (relied on missing image file) and share-img-btn
(emoji clashed with monospace aesthetic). Replace both with .card-action-btn
text buttons: 'share ↗' and 'card ↗' — monospace, grey, pink on hover,
consistent with the rest of the card UI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 03:19:56 +10:00
King Omar
45f8c80ceb Restore original login step labels
Step 2: Choose Your Dictator (not 'Choose Your Enemy')
Step 3: Who Would You Kill? (not 'One Bullet in History')

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 03:16:23 +10:00
King Omar
b726dc1e24 Redesign petition SVG share image; remove flag/report button
SVG: clean two-zone layout — dark header with RADICAL wordmark + PETITION
badge, full-width text area with left accent bar and large quote mark,
footer band with signature count, author, date and CTA. Proper word-wrap
centred in the card. Looks like a real share card now.

Remove flag button and handleFlag from proposal cards entirely.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 03:13:53 +10:00
King Omar
a07d3f6887 Fix comments loading: reset timeout, querySelectorAll for modals, remove dupes
- commentRequestTimeout never reset to null — comments only loaded once ever
- querySelector missed modal containers when same proposal was in feed + modal
- Switch to querySelectorAll so feed card and modal both update simultaneously
- Toggle count now updates on load (not just after posting)
- Remove two duplicate loadComments and submitComment definitions
- Simplify loadModalComments to delegate to loadComments

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 03:12:33 +10:00
King Omar
3b715e34bd Fix login link size in footer — remove emoji, drop login-link class
The 🔐 emoji was rendering taller than surrounding text causing the
link to appear oversized. Removed emoji and login-link class entirely;
.footer-links a already handles all the needed styling.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 03:10:18 +10:00
King Omar
5e55dbe900 Force AEC membership modal on 3rd vote or first petition; shrink login button
- Replace email-only capture with full AEC membership modal (name, DOB,
  address, suburb, state, postcode, email, phone, electoral roll consent)
- Trigger modal on first upvote (petition signature) OR after 3rd vote
- Modal posts to /api/join and emails details to party contact
- localStorage 'radical_member_joined' tracks completion/dismiss per device
- Shrink .login-link to match other footer links (was pink button, now text)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 03:00:40 +10:00
King Omar
8acf1aca19 Fix login images (remote R2 upload) and clarify signup UX
- Upload all 23 images to remote Cloudflare R2 (previous upload was local-only)
- Add 'How it works' panel at top of login page explaining 3-step flow
- Rename button to 'Login / Sign Up →' to make dual purpose obvious
- Label emoji/dictator/target sections as Step 1/2/3 of the key
- New users automatically get an account on first use of any unique combination

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 02:49:33 +10:00
King Omar
2769a29f11 Fix login page: real images from R2, working login flow, anonymous option
- Upload 23 person images to R2 memes bucket (all from Wikimedia Commons)
- Replace all imgur/old-worker URLs with theradicalparty.com/memes/*.jpg
- Fix login redirect: stores session in localStorage, redirects to / after 2.5s
- Add 'Continue anonymously' option explaining anon vs AEC-linked login
- Tighten success screen: shows emoji key, enemy, target then redirects

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 02:39:59 +10:00
King Omar
05e5604b09 Add 'The Only Policy' about section with Switzerland direct democracy content
Replaces dead 'About Us' footer link with a real section explaining RADICAL's
single goal: pass one law so 100k signatures forces a binding referendum.
Includes Switzerland comparison (working since 1891), four-step plan, and
styled to match the rest of the site.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 01:56:26 +10:00
King Omar
a6e7989a10 Add Join The Movement form, fix login route, fix images, update copyright to 2026
- Add /api/join worker endpoint that emails membership details to party contact
- Register /api/login route (was missing — emoji login was broken)
- Add full AEC-compliant member registration form in index.html (#join section)
- Update copyright year to 2026 in index.html and login.html
- Fix dictator/target image URLs: radical.omar-c29.workers.dev → theradicalparty.com
- Add onerror handlers to all login page images for graceful degradation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 01:31:30 +10:00
King Omar
b789b35f78 test: verify forgejo → cloudflare direct deploy pipeline 2026-06-05 01:27:09 +10:00
King Omar
39e36dfe76 fix: use SUN in cron expression for Cloudflare compatibility
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 01:17:33 +10:00
King Omar
5c291d29ea feat: leaderboard, milestones, email capture, postcode, flag, stats bar
- Vote state now persists on page load (user_vote in proposals query)
- Stats bar: live votes-today / citizens / proposals counts
- Leaderboard section: top 10 proposals with milestone progress bars
- Milestone system: 100→viral, 500→community, 1k→publish, 5k→minister, 10k→media
- Email capture modal after 3rd vote (postcode optional)
- Milestone email notifications via Resend (requires RESEND_API_KEY secret)
- Weekly digest cron (Monday 9am AEST) to all subscribers
- Share-as-image button opens dynamic SVG in new tab
- Flag/report button hides proposals after 5 flags
- Proposals with hidden=1 excluded from all feeds
- DB: users.email, users.postcode, proposals.flag_count, proposals.hidden,
       proposal_flags, milestone_notifications tables

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 01:07:30 +10:00
King Omar
876d0c438c fix: votes, comments and feed refresh all broken due to safeFetch misuse
safeFetch already returns parsed JSON and throws on non-2xx — callers were
treating the result as a Response object and checking .ok / .json(), which
made votes, comment votes, and comment posts silently fail every time.

Also: fetchProposals was missing cache:'no-store' so newly posted proposals
were invisible until the 24hr browser cache expired; getProposals was sending
24hr Cache-Control so Cloudflare CDN served stale data; getShareableImageUrl
had a double slash (/api//petition-svg); wrangler.toml had an invalid [pages]
stanza that caused a warning on every deploy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 00:35:31 +10:00
King Omar
4db2a9a6cf test: HOME fix for wrangler auth 2026-06-05 00:23:37 +10:00
King Omar
2cdfdd9d06 test: verify wrangler path fix 2026-06-05 00:23:21 +10:00
King Omar
baca30e94e test: verify deploy hook 2026-06-05 00:23:07 +10:00
Omar Najjar
92a4d3fb06 x 2025-04-30 20:02:30 +10:00
Omar Najjar
73645b029c x 2025-04-30 19:57:56 +10:00
Omar Najjar
73e02e500e x 2025-04-30 19:49:58 +10:00
Omar Najjar
927313e8da Revert "x"
This reverts commit 330bd1ff61.
2025-04-30 19:46:18 +10:00
Omar Najjar
3c675a7a0a Revert "x"
This reverts commit d105a753b4.
2025-04-30 19:45:58 +10:00
Omar Najjar
c00120a85c Revert "x"
This reverts commit 58f39fb352.
2025-04-30 19:45:50 +10:00
Omar Najjar
29936e8365 Revert "x"
This reverts commit 9e6a2ba4fc.
2025-04-30 19:45:42 +10:00