Add the Privacy and Terms pages, data requests and click-to-load embeds

- Privacy Policy (with cookies and storage) and Terms of Service, from
  what the code actually stores and loads; shared LegalText layout
- Data requests: a 'privacy' feedback type sent from the Privacy page's
  form, email required, triaged in Admin -> Feedback
- Migration 039: Panel -> Site settings -> Privacy contact email (over
  site.json's privacyEmail), shown on the Privacy page
- The hero livestream, the hero featured video and schedule maps load
  only when pressed, so no third party sets anything before a click
- A small dismissible privacy notice instead of a consent banner

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-28 22:34:46 -05:00
parent bff082652a
commit ee61568911
17 changed files with 507 additions and 81 deletions

View file

@ -0,0 +1,63 @@
/* ═══════════════════════════════════════════════════════════════
PRIVACY NOTICE
A small note on a first visit, until closed: the site sets no
tracking cookies, and videos and maps from other companies wait
for a click (VideoPlayer, HeroStage, ScheduleBlock). Because
nothing loads before that, a notice is enough, rather than a
consent banner that blocks the page. If an embed ever loads on
its own, or analytics are added, this has to become a real
consent choice.
Closed is remembered in this browser; blocked storage just
means it shows again next time.
═══════════════════════════════════════════════════════════════ */
import { useEffect, useState } from 'react'
import { Link } from 'react-router-dom'
const STORAGE_KEY = 'ngu-privacy-notice-closed'
export default function PrivacyNotice() {
const [visible, setVisible] = useState(false)
useEffect(() => {
try {
if (!localStorage.getItem(STORAGE_KEY)) setVisible(true)
} catch {
setVisible(true)
}
}, [])
const close = () => {
setVisible(false)
try {
localStorage.setItem(STORAGE_KEY, '1')
} catch {}
}
if (!visible) return null
return (
<div
role="region"
aria-label="Privacy notice"
className="fixed bottom-4 left-4 right-4 z-40 mx-auto max-w-md rounded-2xl border border-[#138ba0]/20 bg-white p-4 text-sm text-[#26454c] shadow-xl sm:right-auto"
>
<p>
No tracking cookies here. Videos and maps come from YouTube, Facebook or Google only when you press
play or show them, and those services may set their own cookies then.{' '}
<Link to="/privacy#cookies" className="font-semibold text-[#0f7183] underline underline-offset-2">
Privacy Policy
</Link>
</p>
<button
type="button"
onClick={close}
className="mt-3 rounded-full bg-[#0f7183] px-4 py-1.5 font-semibold text-white hover:bg-[#0b5c6a]"
>
Got it
</button>
</div>
)
}