# project-bifrost — merge notes Site 2 (the 6-scene editorial scroll) has been merged into the Timeline's Overview page. Timeline and Archive pages are **untouched**. Auth, CSP, and all of `src/`, `server.js`, `deploy/` are untouched. ## Deploy — what to rsync where From the project root on your laptop, copy the contents of this `protected/` folder into `project-bifrost/protected/` on the VPS, preserving structure: ``` protected/ ├── index.html ← REPLACED (timeline + 6 Bifrost scenes) ├── timeline.js ← REPLACED (adds `.js` class + bifrost lazy-boot) ├── bifrost.js ← NEW ├── vendor/ │ ├── lenis.min.js ← NEW │ ├── gsap.min.js ← NEW │ └── scrolltrigger.min.js ← NEW │ (d3-array, d3-geo, topojson-client, countries-110m are UNCHANGED; do not overwrite) └── fenja/ └── illustrations/ ← NEW FOLDER ├── community.svg ├── council.svg └── pilot.svg ``` After `rsync`, run the usual: ``` sudo chown -R fenja:fenja /opt/fenja sudo systemctl restart fenja sudo journalctl -u fenja -n 20 ``` ## What changed, concretely 1. **`protected/index.html`** — rewrote `#page-overview` only. - Europe map (`.overview-globe`) stays as absolute-positioned background. - Added `
` — the new internal scroller. All six Bifrost scenes live inside it. Lenis + ScrollTrigger are wired to this element, never `window`. - Removed the four editorial paragraphs + meta-strip ("Notes on a quiet inheritance" / entries / period / editor) — replaced by the Bifrost scenes in scroll order. - Site-1 palette applied via `#page-overview { --ink: #383831; --paper: #faf6ee; ...; --aurora-*: site-1 Archival Pigments; }`. Tokens are scoped to `#page-overview` only — they do **not** leak to the timeline or archive pages. - All `Fraunces` references replaced with `Newsreader`. - Site-2's top-left brand mark, top-right meta chip, and right-edge progress rail removed (would clash with site 1's site-mark + dot-nav). - Footer centre logo: swapped inlined Fenja SVG for ``. - Innovationsfonden remains the redrawn placeholder — swap when the real asset arrives. - Illustration references: the big PNG data URIs in site 2's CSS were replaced with three `url("/fenja/illustrations/*.svg")` references pointing to the new illustration files. - Timeline section (`#page-timeline`) and Archive section (`#page-archive`) are byte-identical to the previous version. 2. **`protected/timeline.js`** — two changes only. - Added `document.documentElement.classList.add('js')` at the top so site-2's `.js .some-element { opacity: 0 }` hide-before-reveal rules work. Harmless to timeline (nothing there uses `.js`). - Dot-nav click handler wrapped into `activatePage(targetId)`. When `targetId === 'page-overview'`, it calls `window.__bifrost.init()` after a 60ms delay (lets the page-activation transition start). `init()` is idempotent — subsequent activations just trigger a `ScrollTrigger.refresh()`. - The "Read the editor's note" button's existing behaviour (`document.querySelector('.dot-btn[data-target="page-overview"]').click()`) routes through `activatePage` now, so clicking the button both activates the overview **and** boots the bifrost scenes. 3. **`protected/bifrost.js`** (NEW) — single-file CSP-compliant module. - Exposes `window.__bifrost.init()`. No auto-exec. - Creates a `new Lenis({ wrapper: scroller, content: scroller.firstElementChild, ... })` scoped to `#overview-scroll`. - Registers a `ScrollTrigger.scrollerProxy(scroller, ...)` and sets `ScrollTrigger.defaults({ scroller })` so every ScrollTrigger the site-2 code registers targets the overview's internal scroll. - Europe-map opacity is driven from Lenis's scroll event: - `scrollTop = 0` → 0.42 opacity (site-1's original "active" value) - between `0.2 × vh` and `0.8 × vh` → ramps to 0 - scrolling back up → fades back in - The map does **not** rotate with scroll — it's static. - Reduced-motion: short-circuits to "content visible, map at 0.42, no animations" and bails before registering any ScrollTriggers. - All site-2 scene logic (HERO reveal, pinned 4-card stack, word fly-ins, aurora arc draw-in, treasure-map path draw-in + per-stop reveals, Join CTA + confirmation crossfade) transplanted verbatim. 4. **`protected/vendor/{lenis,gsap,scrolltrigger}.min.js`** (NEW) — the three libraries extracted verbatim from site 2's inlined vendor blobs. Served with `defer` so they load and execute before `bifrost.js` and `timeline.js`. (Script order at the bottom of `index.html`: lenis → gsap → scrolltrigger → bifrost → timeline.) 5. **`protected/fenja/illustrations/{community,council,pilot}.svg`** (NEW) — the three illustrations you uploaded, renamed for site-2's slot names. ~1.7 MB each (SVG wrappers around embedded PNGs). ## What I did NOT touch - `src/` (auth, db, mail, middleware, sessions) — byte-identical. - `server.js` — byte-identical. The request-routing order, CSP headers, and `requireAuth` gate are preserved exactly. - `deploy/` — byte-identical. - `public/entrance.html`, `public/entrance.js` — byte-identical. - `protected/fenja/colors_and_type.css` — byte-identical. (The Bifrost scenes' tokens live in `index.html`'s own `