Use organization-neutral names in code and browser keys
- The timeline's ngu-tl classes and keyframes are site-tl; nguLogo is siteLogo; the event card's ngu grid area is org; window.__NGU_SITE__ is window.__SITE__; QR downloads are qr-<page>.png - Browser keys (theme, closed banner and privacy notice, chunk reload) start site-; the page's first script moves any old ngu- values over once, so nobody loses their theme or sees a closed notice again - Session and Google sign-in cookies are site_session and site_oauth (__Host- over https); everyone signs in again once Record ids, server paths, the service and the database file keep their names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
92e7938b64
commit
2b009beac1
23 changed files with 191 additions and 181 deletions
|
|
@ -4,7 +4,7 @@
|
|||
What the site says about itself, for the browser: /site.json, with
|
||||
the admin's Site settings (Panel) laid over it. The server merges
|
||||
the two and writes the result into each page's HTML as
|
||||
window.__NGU_SITE__ (server/src/pageMeta.js), which is read here
|
||||
window.__SITE__ (server/src/pageMeta.js), which is read here
|
||||
before the app renders, so there's no request and no flash of the
|
||||
old wording. In development, or if the API is down and nginx
|
||||
serves the plain index.html, it isn't there and site.json alone
|
||||
|
|
@ -28,7 +28,7 @@ type SiteText = { title?: string; pages?: Record<string, PageText>; privacyEmail
|
|||
|
||||
/* What the server wrote into the page, if it did. */
|
||||
const fromServer: SiteText =
|
||||
(typeof window !== 'undefined' && (window as unknown as { __NGU_SITE__?: SiteText }).__NGU_SITE__) || {}
|
||||
(typeof window !== 'undefined' && (window as unknown as { __SITE__?: SiteText }).__SITE__) || {}
|
||||
|
||||
export const SITE_NAME: string = fromServer.title || siteConfiguration.title
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue