|
| 1 | +# Legal Foundation Implementation Instructions |
| 2 | + |
| 3 | +## PR |
| 4 | + |
| 5 | +Use: |
| 6 | + |
| 7 | +`PR_26175_OWNER_050-legal-foundation` |
| 8 | + |
| 9 | +## Goal |
| 10 | + |
| 11 | +Publish the initial Game Foundry Studio legal foundation. |
| 12 | + |
| 13 | +## Required Pages |
| 14 | + |
| 15 | +Create or update: |
| 16 | + |
| 17 | +```text |
| 18 | +/legal/index.html |
| 19 | +/legal/terms-of-service.html |
| 20 | +/legal/privacy-policy.html |
| 21 | +/legal/cookie-policy.html |
| 22 | +/legal/community-guidelines.html |
| 23 | +/legal/copyright-policy.html |
| 24 | +/legal/dmca-policy.html |
| 25 | +/legal/legal-nav.js |
| 26 | +``` |
| 27 | + |
| 28 | +## Source Drafts |
| 29 | + |
| 30 | +Use the markdown files in `/legal/` from this package as the source content for the HTML pages. |
| 31 | + |
| 32 | +## Single Source of Truth Legal Menu |
| 33 | + |
| 34 | +The left-side legal menu on all legal pages must be rendered from one shared source of truth. |
| 35 | + |
| 36 | +Do not duplicate legal side-menu links in each HTML file. |
| 37 | + |
| 38 | +Suggested file: |
| 39 | + |
| 40 | +```text |
| 41 | +/legal/legal-nav.js |
| 42 | +``` |
| 43 | + |
| 44 | +Suggested SSoT: |
| 45 | + |
| 46 | +```js |
| 47 | +const LEGAL_NAV_ITEMS = [ |
| 48 | + { href: "/legal/index.html", label: "Legal Overview" }, |
| 49 | + { href: "/legal/terms-of-service.html", label: "Terms of Service" }, |
| 50 | + { href: "/legal/privacy-policy.html", label: "Privacy Policy" }, |
| 51 | + { href: "/legal/cookie-policy.html", label: "Cookie Policy" }, |
| 52 | + { href: "/legal/community-guidelines.html", label: "Community Guidelines" }, |
| 53 | + { href: "/legal/copyright-policy.html", label: "Copyright Policy" }, |
| 54 | + { href: "/legal/dmca-policy.html", label: "DMCA Policy" } |
| 55 | +]; |
| 56 | +``` |
| 57 | + |
| 58 | +Each legal page should include only a mount point: |
| 59 | + |
| 60 | +```html |
| 61 | +<nav class="legal-side-nav" aria-label="Legal documents" data-legal-nav></nav> |
| 62 | +``` |
| 63 | + |
| 64 | +Required JavaScript behavior: |
| 65 | + |
| 66 | +- Render the legal navigation links from `LEGAL_NAV_ITEMS`. |
| 67 | +- Detect the current page from `window.location.pathname`. |
| 68 | +- Normalize `/legal/` to `/legal/index.html`. |
| 69 | +- Apply an active/current class to the matching legal page. |
| 70 | +- Set `aria-current="page"` on the active link. |
| 71 | +- Preserve keyboard and tab accessibility. |
| 72 | +- Do not require inline event handlers. |
| 73 | + |
| 74 | +Suggested current-page logic: |
| 75 | + |
| 76 | +```js |
| 77 | +function normalizeLegalPath(pathname) { |
| 78 | + if (pathname.endsWith("/legal/")) return "/legal/index.html"; |
| 79 | + if (pathname === "/legal") return "/legal/index.html"; |
| 80 | + return pathname; |
| 81 | +} |
| 82 | +``` |
| 83 | + |
| 84 | +## Layout Requirements |
| 85 | + |
| 86 | +- Use the existing Game Foundry Studio site shell/template where appropriate. |
| 87 | +- Legal pages should use a two-column layout on desktop: |
| 88 | + - Left: shared legal side navigation |
| 89 | + - Right: legal document content |
| 90 | +- On small screens, the legal navigation may stack above the content. |
| 91 | +- Keep the legal pages readable and accessible. |
| 92 | +- Do not introduce unrelated UI changes. |
| 93 | + |
| 94 | +## Footer Links |
| 95 | + |
| 96 | +Add footer links to: |
| 97 | + |
| 98 | +- Terms |
| 99 | +- Privacy |
| 100 | +- Cookies |
| 101 | +- Community Guidelines |
| 102 | +- Copyright |
| 103 | +- DMCA |
| 104 | + |
| 105 | +Footer links may point to the corresponding `/legal/*.html` pages. |
| 106 | + |
| 107 | +## Validation Requirements |
| 108 | + |
| 109 | +Run the repository's relevant validation before opening the PR. |
| 110 | + |
| 111 | +At minimum: |
| 112 | + |
| 113 | +- HTML validation or existing static-page checks, if present |
| 114 | +- JS syntax check for `/legal/legal-nav.js` |
| 115 | +- Existing legal/nav/footer tests, if present |
| 116 | +- Any repository-required governance validation |
| 117 | + |
| 118 | +## Acceptance Criteria |
| 119 | + |
| 120 | +- All six legal documents are published as HTML pages. |
| 121 | +- `/legal/index.html` links to all legal documents. |
| 122 | +- Footer includes legal links. |
| 123 | +- Legal side navigation is generated from one SSoT. |
| 124 | +- Current page is visually selected. |
| 125 | +- Current page has `aria-current="page"`. |
| 126 | +- No page has a hand-maintained duplicate left legal menu. |
| 127 | +- No unrelated code, route, database, API, or storage changes. |
0 commit comments