diff --git a/docker/README.md b/docker/README.md index 2548265..c367f3f 100644 --- a/docker/README.md +++ b/docker/README.md @@ -48,11 +48,15 @@ project (`@shopify/react-native-skia` is aliased to `src/engine/skiaShim.ts` in `cinemaShader` `colorUtils` `defaultRecipes` `exifWrite` `frameUtils` `jpegDpi` `paramDefs` `recipeShare` `skiaImage` `toneShader`. -The landing page needs no CDN: `frontend/public/assets/Syne.woff2` is the -bundled display face and `frontend/public/assets/samples/s*.jpg` are the six -placeholder negatives the film strip, preset tester and QR card show (swap them -for real graded stills whenever we have them). Its one foreign request is the -QR image from `api.qrserver.com`, which degrades to an empty slot offline. +The landing page needs no CDN: `frontend/public/assets/fonts/*.woff2` are the +seven self-hosted faces behind the three font groups the Themes menu offers +(Plus Jakarta Sans / Inter / JetBrains Mono, Fraunces / Be Vietnam Pro / +Courier Prime, Be Vietnam Pro / Space Mono — all SIL OFL, pulled from Google +Fonts, vietnamese + latin + latin-ext subsets), and +`frontend/public/assets/samples/s*.jpg` are the six placeholder negatives the +film strip, preset tester and QR card show (swap them for real graded stills +whenever we have them). Its one foreign request is the QR image from +`api.qrserver.com`, which degrades to an empty slot offline. When the app changes one of them, copy it back in — the renderer is only "parity" for as long as these stay in sync: diff --git a/docker/frontend/index.html b/docker/frontend/index.html index 48aee40..dda9df8 100644 --- a/docker/frontend/index.html +++ b/docker/frontend/index.html @@ -1,5 +1,5 @@ - + diff --git a/docker/frontend/public/assets/Syne.woff2 b/docker/frontend/public/assets/Syne.woff2 deleted file mode 100644 index e311600..0000000 Binary files a/docker/frontend/public/assets/Syne.woff2 and /dev/null differ diff --git a/docker/frontend/public/assets/fonts/CourierPrime-400-latin-ext.woff2 b/docker/frontend/public/assets/fonts/CourierPrime-400-latin-ext.woff2 new file mode 100644 index 0000000..c68fde7 Binary files /dev/null and b/docker/frontend/public/assets/fonts/CourierPrime-400-latin-ext.woff2 differ diff --git a/docker/frontend/public/assets/fonts/CourierPrime-400-latin.woff2 b/docker/frontend/public/assets/fonts/CourierPrime-400-latin.woff2 new file mode 100644 index 0000000..42dadfe Binary files /dev/null and b/docker/frontend/public/assets/fonts/CourierPrime-400-latin.woff2 differ diff --git a/docker/frontend/public/assets/fonts/CourierPrime-700-latin-ext.woff2 b/docker/frontend/public/assets/fonts/CourierPrime-700-latin-ext.woff2 new file mode 100644 index 0000000..1d48ed2 Binary files /dev/null and b/docker/frontend/public/assets/fonts/CourierPrime-700-latin-ext.woff2 differ diff --git a/docker/frontend/public/assets/fonts/CourierPrime-700-latin.woff2 b/docker/frontend/public/assets/fonts/CourierPrime-700-latin.woff2 new file mode 100644 index 0000000..2d36acc Binary files /dev/null and b/docker/frontend/public/assets/fonts/CourierPrime-700-latin.woff2 differ diff --git a/docker/frontend/public/assets/fonts/Fraunces-latin-ext.woff2 b/docker/frontend/public/assets/fonts/Fraunces-latin-ext.woff2 new file mode 100644 index 0000000..b6e3e3a Binary files /dev/null and b/docker/frontend/public/assets/fonts/Fraunces-latin-ext.woff2 differ diff --git a/docker/frontend/public/assets/fonts/Fraunces-latin.woff2 b/docker/frontend/public/assets/fonts/Fraunces-latin.woff2 new file mode 100644 index 0000000..cb295bf Binary files /dev/null and b/docker/frontend/public/assets/fonts/Fraunces-latin.woff2 differ diff --git a/docker/frontend/public/assets/fonts/Fraunces-vietnamese.woff2 b/docker/frontend/public/assets/fonts/Fraunces-vietnamese.woff2 new file mode 100644 index 0000000..43126c2 Binary files /dev/null and b/docker/frontend/public/assets/fonts/Fraunces-vietnamese.woff2 differ diff --git a/docker/frontend/public/assets/fonts/Inter-latin-ext.woff2 b/docker/frontend/public/assets/fonts/Inter-latin-ext.woff2 new file mode 100644 index 0000000..479d010 Binary files /dev/null and b/docker/frontend/public/assets/fonts/Inter-latin-ext.woff2 differ diff --git a/docker/frontend/public/assets/fonts/Inter-latin.woff2 b/docker/frontend/public/assets/fonts/Inter-latin.woff2 new file mode 100644 index 0000000..d15208d Binary files /dev/null and b/docker/frontend/public/assets/fonts/Inter-latin.woff2 differ diff --git a/docker/frontend/public/assets/fonts/Inter-vietnamese.woff2 b/docker/frontend/public/assets/fonts/Inter-vietnamese.woff2 new file mode 100644 index 0000000..a40c469 Binary files /dev/null and b/docker/frontend/public/assets/fonts/Inter-vietnamese.woff2 differ diff --git a/docker/frontend/public/assets/fonts/JetBrainsMono-latin-ext.woff2 b/docker/frontend/public/assets/fonts/JetBrainsMono-latin-ext.woff2 new file mode 100644 index 0000000..01769d9 Binary files /dev/null and b/docker/frontend/public/assets/fonts/JetBrainsMono-latin-ext.woff2 differ diff --git a/docker/frontend/public/assets/fonts/JetBrainsMono-latin.woff2 b/docker/frontend/public/assets/fonts/JetBrainsMono-latin.woff2 new file mode 100644 index 0000000..cd5102a Binary files /dev/null and b/docker/frontend/public/assets/fonts/JetBrainsMono-latin.woff2 differ diff --git a/docker/frontend/public/assets/fonts/JetBrainsMono-vietnamese.woff2 b/docker/frontend/public/assets/fonts/JetBrainsMono-vietnamese.woff2 new file mode 100644 index 0000000..b6a3fa1 Binary files /dev/null and b/docker/frontend/public/assets/fonts/JetBrainsMono-vietnamese.woff2 differ diff --git a/docker/frontend/public/assets/fonts/PlusJakartaSans-latin-ext.woff2 b/docker/frontend/public/assets/fonts/PlusJakartaSans-latin-ext.woff2 new file mode 100644 index 0000000..f82597c Binary files /dev/null and b/docker/frontend/public/assets/fonts/PlusJakartaSans-latin-ext.woff2 differ diff --git a/docker/frontend/public/assets/fonts/PlusJakartaSans-latin.woff2 b/docker/frontend/public/assets/fonts/PlusJakartaSans-latin.woff2 new file mode 100644 index 0000000..a180dc4 Binary files /dev/null and b/docker/frontend/public/assets/fonts/PlusJakartaSans-latin.woff2 differ diff --git a/docker/frontend/public/assets/fonts/PlusJakartaSans-vietnamese.woff2 b/docker/frontend/public/assets/fonts/PlusJakartaSans-vietnamese.woff2 new file mode 100644 index 0000000..8c846a0 Binary files /dev/null and b/docker/frontend/public/assets/fonts/PlusJakartaSans-vietnamese.woff2 differ diff --git a/docker/frontend/public/assets/fonts/SpaceMono-400-latin-ext.woff2 b/docker/frontend/public/assets/fonts/SpaceMono-400-latin-ext.woff2 new file mode 100644 index 0000000..171ca1a Binary files /dev/null and b/docker/frontend/public/assets/fonts/SpaceMono-400-latin-ext.woff2 differ diff --git a/docker/frontend/public/assets/fonts/SpaceMono-400-latin.woff2 b/docker/frontend/public/assets/fonts/SpaceMono-400-latin.woff2 new file mode 100644 index 0000000..2752f60 Binary files /dev/null and b/docker/frontend/public/assets/fonts/SpaceMono-400-latin.woff2 differ diff --git a/docker/frontend/public/assets/fonts/SpaceMono-400-vietnamese.woff2 b/docker/frontend/public/assets/fonts/SpaceMono-400-vietnamese.woff2 new file mode 100644 index 0000000..f4c014c Binary files /dev/null and b/docker/frontend/public/assets/fonts/SpaceMono-400-vietnamese.woff2 differ diff --git a/docker/frontend/public/assets/fonts/SpaceMono-700-latin-ext.woff2 b/docker/frontend/public/assets/fonts/SpaceMono-700-latin-ext.woff2 new file mode 100644 index 0000000..d7a1592 Binary files /dev/null and b/docker/frontend/public/assets/fonts/SpaceMono-700-latin-ext.woff2 differ diff --git a/docker/frontend/public/assets/fonts/SpaceMono-700-latin.woff2 b/docker/frontend/public/assets/fonts/SpaceMono-700-latin.woff2 new file mode 100644 index 0000000..6563bad Binary files /dev/null and b/docker/frontend/public/assets/fonts/SpaceMono-700-latin.woff2 differ diff --git a/docker/frontend/public/assets/fonts/SpaceMono-700-vietnamese.woff2 b/docker/frontend/public/assets/fonts/SpaceMono-700-vietnamese.woff2 new file mode 100644 index 0000000..7ddc67d Binary files /dev/null and b/docker/frontend/public/assets/fonts/SpaceMono-700-vietnamese.woff2 differ diff --git a/docker/frontend/src/Landing.tsx b/docker/frontend/src/Landing.tsx index 4fe0bbb..de8ab40 100644 --- a/docker/frontend/src/Landing.tsx +++ b/docker/frontend/src/Landing.tsx @@ -1,6 +1,6 @@ import { useCallback, useEffect, useRef, useState } from 'react'; import { useI18n } from './i18n/I18nProvider'; -import { useTheme } from './theme/ThemeProvider'; +import { FONT_SETS, useTheme } from './theme/ThemeProvider'; // Landing page, built to the landing blueprint: the 10-section funnel. The // marketing prose is bilingual and lives here next to the markup as `Txt` @@ -99,8 +99,10 @@ function Icon({ name }: { name: Feature['icon'] }) { export function Landing() { const { t, lang, setLang } = useI18n(); - const { mode, setMode } = useTheme(); + const { mode, fonts, setMode, setFonts } = useTheme(); const [menu, setMenu] = useState(false); + const [themeMenu, setThemeMenu] = useState(false); + const tools = useRef(null); const [presetId, setPresetId] = useState(PRESETS[0].id); const [temp, setTemp] = useState(0); const [sat, setSat] = useState(100); @@ -121,6 +123,16 @@ export function Landing() { }, [c]); useEffect(() => () => clearTimeout(toastTimer.current), []); + // The theme popover closes on a click anywhere else, like the workspace's. + useEffect(() => { + if (!themeMenu) return; + const away = (e: MouseEvent) => { + if (!tools.current?.contains(e.target as Node)) setThemeMenu(false); + }; + document.addEventListener('mousedown', away); + return () => document.removeEventListener('mousedown', away); + }, [themeMenu]); + // The simulator's output: three knobs, one CSS filter string, applied live. const labFilter = `sepia(${(Math.abs(temp) / 260).toFixed(3)}) hue-rotate(${(-temp * 0.45).toFixed(1)}deg) saturate(${sat}%) contrast(${con}%)`; @@ -149,18 +161,56 @@ export function Landing() { {nav.map((entry) => {c(entry.label)})} - {/* Theme + language, the same two switches the workspace TopBar has. */} - - + {/* Theme + language, the same two switches the workspace TopBar has. + Theme opens a popover: light/dark plus the font group, which + retypes the whole page. */} + +
+ + {themeMenu ? ( +
+
+ + +
+
+ {FONT_SETS.map((entry) => ( + + ))} +
+
+ ) : null} +
))} +
+ {FONT_SETS.map((entry) => ( + + ))} +
) : null}