LordOS — a free, fast and secure GNU/Linux distribution based on Debian, with its own desktop environment: display server and Wayland compositor in C, a React UI engine on QuickJS, and private native apps.
C cdebiandesktop-environmentebpffirewalllandlocklinuxlinux-distributionopen-sourceprivacyquickjsraspberry-pi-5reactsecuritywaylandwayland-compositor
Website: feature pages, paper with PDFs, about, FAQ, legal templates, new footer, laptop hero, placeholder-safe production build
Federico Pereiracd394eb3a818
diff --git a/tools/web/deploy.sh b/tools/web/deploy.shindex 2c73269..a0fd053 100755--- a/tools/web/deploy.sh+++ b/tools/web/deploy.sh@@ -27,16 +27,17 @@ aws() { command aws --profile "$PROFILE" "$@"; }aws s3 sync "$DIST/assets" "s3://$BUCKET/assets" --cache-control "public, max-age=31536000, immutable" --only-show-errors# 2. Pages and the other root files, always revalidated.-aws s3 sync "$DIST" "s3://$BUCKET" --exclude "assets/*" --exclude "install.sh" --exclude "lordos-release.pub.pem" \+aws s3 sync "$DIST" "s3://$BUCKET" --exclude "assets/*" --exclude "install.sh" --exclude "lordos-release.pub.pem" --exclude ".well-known/*" \--cache-control "no-cache" --only-show-errors-# 3. install.sh (curl … | sh) and the release key as plain text, readable in a browser.+# 3. install.sh (curl … | sh), the release key and security.txt as plain text, readable in a browser.aws s3 cp "$DIST/install.sh" "s3://$BUCKET/install.sh" --cache-control "no-cache" --content-type "text/plain; charset=utf-8" --only-show-errors+[ -f "$DIST/.well-known/security.txt" ] && aws s3 cp "$DIST/.well-known/security.txt" "s3://$BUCKET/.well-known/security.txt" --cache-control "no-cache" --content-type "text/plain; charset=utf-8" --only-show-errorsaws s3 cp "$DIST/lordos-release.pub.pem" "s3://$BUCKET/lordos-release.pub.pem" --cache-control "no-cache" --content-type "text/plain; charset=utf-8" --only-show-errors# 4. Remove pages and root files the build no longer produces. Old hashed assets stay for pages# that are already open in a browser; they are small and never referenced again.-aws s3 sync "$DIST" "s3://$BUCKET" --delete --exclude "assets/*" --exclude "install.sh" --exclude "lordos-release.pub.pem" \+aws s3 sync "$DIST" "s3://$BUCKET" --delete --exclude "assets/*" --exclude "install.sh" --exclude "lordos-release.pub.pem" --exclude ".well-known/*" \--cache-control "no-cache" --only-show-errorsid=$(aws cloudfront create-invalidation --distribution-id "$DISTRIBUTION" --paths "/*" --query Invalidation.Id --output text)diff --git a/web/build.mjs b/web/build.mjsindex 8d34995..4199a30 100644--- a/web/build.mjs+++ b/web/build.mjs@@ -16,6 +16,10 @@ import { execFileSync } from 'node:child_process';import fs from 'node:fs';import path from 'node:path';import { fileURLToPath } from 'node:url';+import http from 'node:http';+import { createRequire } from 'node:module';+import { markdown, inline, frontMatter } from './lib/md.mjs';+import { diagram } from './lib/diagram.mjs';const WEB = path.dirname(fileURLToPath(import.meta.url));const REPO = path.resolve(WEB, '..');@@ -24,6 +28,9 @@ const CACHE = path.join(WEB, '.cache');const SITE = 'https://lordos.org';const LANGS = ['en', 'es', 'pt'];const PAGES = ['home', 'apps', 'gallery'];+const CONTENT = process.env.CONTENT_DIR ? path.resolve(process.env.CONTENT_DIR) : path.join(path.dirname(fileURLToPath(import.meta.url)), 'content');+// headless Chromium for the paper PDFs: a folder whose node_modules has playwright+const TOOLS = process.env.WEB_TOOLS || process.env.ICON_DEPS || '';const FINGERPRINT = 'c7155b8e6bbbb180f907381994d06af76d333016cd6f3facf67cadd053ea108e';const GITHUB = 'https://github.com/lordbasex/LordOS';@@ -98,8 +105,18 @@ write('licenses/PlusJakartaSans-OFL.txt', read(r('assets/fonts/PlusJakartaSans-L// ---------- css / js ----------const css = src('site.css').replace('__FONT_MEDIUM__', fontMedium).replace('__FONT_EXTRABOLD__', fontExtraBold)- .replace(/\/\*[\s\S]*?\*\//g, '').replace(/\n\s*/g, '\n').replace(/\n+/g, '\n');+ .replace(/\/\*[\s\S]*?\*\//g, '').replace(/\s*([{};,>])\s*/g, '$1').replace(/;}/g, '}').replace(/\n\s*/g, '\n').replace(/\n+/g, '\n');const cssUrl = hashed(Buffer.from(css), 'site', 'css');+const minCss = (c) => c.replace(/\/\*[\s\S]*?\*\//g, '').replace(/\s*([{};,>])\s*/g, '$1').replace(/;}/g, '}').replace(/\n\s*/g, '\n').replace(/\n+/g, '\n');+const docCss = minCss(src('doc.css'));+const docCssUrl = hashed(Buffer.from(docCss), 'doc', 'css');+// [[PLACEHOLDER]] markers left by the content agents: highlighted when --allow-placeholders, else the build fails+const ALLOW_PH = process.argv.includes('--allow-placeholders');+const placeholders = new Map();+const PH_RE = /\[\[([A-Z][A-Z0-9_]*)\]\]/g;+const notePh = (text, where) => { for (const m of String(text).matchAll(PH_RE)) placeholders.set(`${where}: [[${m[1]}]]`, true); return text; };+const phIn = (text, where) => notePh(text, where).replace(PH_RE, '\u0001$1\u0001');+const phOut = (html) => html.replace(/\u0001([A-Z0-9_]+)\u0001/g, '<mark class="ph">[[$1]]</mark>');const jsSrc = src('site.js');const jsUrl = hashed(Buffer.from(jsSrc), 'site', 'js');const themeSrc = src('theme.js');@@ -163,7 +180,47 @@ if (apps.length) log(`apps: ${apps.length} apps`);const HAS_APPS = apps.length > 0;// ---------- pages -----------const dict = Object.fromEntries(LANGS.map((l) => [l, JSON.parse(fs.readFileSync(path.join(WEB, 'i18n', l + '.json'), 'utf8'))]));+const team = JSON.parse(fs.readFileSync(path.join(WEB, 'i18n/team.json'), 'utf8'));+const today = new Date().toISOString().slice(0, 10);+const pagesStrings = JSON.parse(fs.readFileSync(path.join(WEB, 'i18n/pages.json'), 'utf8'));+const dict = Object.fromEntries(LANGS.map((l) => [l, { ...JSON.parse(fs.readFileSync(path.join(WEB, 'i18n', l + '.json'), 'utf8')), pages: pagesStrings[l] }]));+const loc = (v, l) => (v == null ? '' : typeof v === 'string' ? v : v[l] ?? v.en ?? '');++// ---------- feature pages and paper (web/content) ----------+const readJson = (f) => JSON.parse(fs.readFileSync(f, 'utf8'));+const featDir = path.join(CONTENT, 'features');+const featureList = fs.existsSync(featDir)+ ? fs.readdirSync(featDir).filter((f) => f.endsWith('.meta.json')).map((f) => readJson(path.join(featDir, f)))+ .filter((m) => m.slug && LANGS.every((l) => fs.existsSync(path.join(featDir, `${m.slug}.${l}.md`))))+ .sort((a, b) => (a.order ?? 99) - (b.order ?? 99))+ : [];+const paperDir = path.join(CONTENT, 'paper');+const HAS_PAPER = !process.argv.includes('--no-paper') && LANGS.every((l) => fs.existsSync(path.join(paperDir, `paper.${l}.md`)));+const paperMeta = HAS_PAPER && fs.existsSync(path.join(paperDir, 'meta.json')) ? readJson(path.join(paperDir, 'meta.json')) : {};+const paperDiagrams = HAS_PAPER && fs.existsSync(path.join(paperDir, 'diagrams.json')) ? readJson(path.join(paperDir, 'diagrams.json')) : {};+const legalDir = path.join(CONTENT, 'legal');+const legalIndex = fs.existsSync(path.join(legalDir, 'pages.json')) ? readJson(path.join(legalDir, 'pages.json')) : null;+const hasPh = (text) => /\[\[[A-Z][A-Z0-9_]*\]\]/.test(text);+// production: legal pages that still contain [[PLACEHOLDERS]] are left out (--allow-placeholders keeps them, highlighted)+const legalAll = legalIndex ? (legalIndex.pages || []).filter((p) => LANGS.every((l) => fs.existsSync(path.join(legalDir, `${p.slug}.${l}.md`)))) : [];+const legalPages = legalAll.filter((p) => ALLOW_PH || !LANGS.some((l) => hasPh(fs.readFileSync(path.join(legalDir, `${p.slug}.${l}.md`), 'utf8')) || hasPh(JSON.stringify(p))));+const legalHeld = legalAll.filter((p) => !legalPages.includes(p)).map((p) => p.slug);+const faqFile = path.join(CONTENT, 'faq/faq.json');+const faqJson = fs.existsSync(faqFile) ? readJson(faqFile) : null;+let faqHeld = 0;+if (faqJson && !ALLOW_PH) {+ for (const c of faqJson.categories || []) { const n = (c.items || []).length; c.items = (c.items || []).filter((it) => !hasPh(JSON.stringify(it))); faqHeld += n - c.items.length; }+ faqJson.categories = (faqJson.categories || []).filter((c) => c.items.length);+}+const HAS_FAQ = !!(faqJson && (faqJson.categories || []).length);+const footerFile = path.join(CONTENT, 'footer.json');+const footerJson = fs.existsSync(footerFile) ? readJson(footerFile) : null;+log(`content: ${legalPages.length} legal pages${legalHeld.length ? ` (held back, placeholders: ${legalHeld.join(', ')})` : ''}, FAQ ${HAS_FAQ ? 'yes' : 'no'}${faqHeld ? ` (${faqHeld} questions with placeholders hidden)` : ''}, footer.json ${footerJson ? 'yes' : 'no'}`);+log(`content: ${featureList.length} feature pages, paper ${HAS_PAPER ? 'yes' : 'no'} (from ${path.relative(REPO, CONTENT) || CONTENT})`);+const LUMO = Object.fromEntries(['wave', 'shield', 'run', 'sleep', 'celebrate', 'confused', 'front', 'three-quarter', 'back'].filter((p) => fs.existsSync(r(`assets/brand/mascot/lumo-${p}.svg`))).map((p) => [p, asset(r(`assets/brand/mascot/lumo-${p}.svg`), `lumo-${p}`)]));+let HAS_PDF = false;+if (HAS_PAPER && TOOLS) { try { createRequire(path.join(TOOLS, 'package.json')).resolve('playwright'); HAS_PDF = true; } catch { /* no playwright */ } }+if (HAS_PAPER && !HAS_PDF) console.warn('[web] paper: set WEB_TOOLS to a folder with playwright to build the PDFs; the PDF link is left out');const prefix = (l) => (l === 'en' ? '/' : `/${l}/`);const pageUrl = (l, page) => prefix(l) + (page === 'home' ? '' : page + '/');const get = (obj, key) => key.split('.').reduce((o, k) => (o == null ? o : o[k]), obj);@@ -174,13 +231,14 @@ function render(tpl, vars, t) {.replace(/\{\{t\.([\w.]+)\}\}/g, (_, k) => { const v = get(t, k); if (v == null) throw new Error(`missing ${t.lang}.${k}`); return esc(v); });}-function head(t, page) {- const meta = {+function head(t, page, over, doc) {+ const meta = over || {home: [t.meta.title, t.meta.description],gallery: [t.meta.galleryTitle, t.meta.galleryDescription],apps: [t.apps.metaTitle, t.apps.metaDescription],}[page];const [title, desc] = meta;+ const ogImage = SITE + '/social-card.png';const url = SITE + pageUrl(t.lang, page);const alts = LANGS.map((l) => `<link rel="alternate" hreflang="${l}" href="${SITE}${pageUrl(l, page)}">`).join('\n');return `<meta charset="utf-8">@@ -199,7 +257,7 @@ ${alts}<link rel="apple-touch-icon" href="/apple-touch-icon.png"><link rel="preload" href="${fontExtraBold}" as="font" type="font/woff2" crossorigin><link rel="preload" href="${fontMedium}" as="font" type="font/woff2" crossorigin>-<link rel="stylesheet" href="${cssUrl}">+<link rel="stylesheet" href="${cssUrl}">${doc ? `\n<link rel="stylesheet" href="${docCssUrl}">` : ''}<meta property="og:type" content="website"><meta property="og:site_name" content="LordOS"><meta property="og:title" content="${esc(title)}">@@ -231,9 +289,11 @@ function header(t, page) {`<a href="${h('#features')}">${esc(t.navFeatures)}</a>`,HAS_APPS ? `<a href="${pageUrl(t.lang, 'apps')}"${cur('apps')}>${esc(t.navApps)}</a>` : '',`<a href="${pageUrl(t.lang, 'gallery')}"${cur('gallery')}>${esc(t.navGallery)}</a>`,+ HAS_PAPER ? `<a href="${pageUrl(t.lang, 'paper')}"${cur('paper')}>${esc(t.pages.navPaper)}</a>` : '',+ HAS_FAQ ? `<a href="${pageUrl(t.lang, 'faq')}"${cur('faq')}>${esc(t.pages.navFaq)}</a>` : '',`<a href="${h('#download')}">${esc(t.navDownload)}</a>`,`<a href="${h('#support')}">${esc(t.navSupport)}</a>`,- `<a href="${h('#about')}">${esc(t.navAbout)}</a>`,+ `<a href="${pageUrl(t.lang, 'about')}"${cur('about')}>${esc(t.navAbout)}</a>`,`<a href="${GITHUB}">GitHub</a>`,].filter(Boolean).join('\n');const langs = LANGS.map((l) =>@@ -254,8 +314,37 @@ ${langs}</header>`;}-function footer(t) {- return `<footer class="foot">+// localized site path for footer.json links: /x/ -> /es/x/; files and absolute URLs unchanged+const sitePath = (href, l) => {+ if (!href || /^(https?:|mailto:)/.test(href)) return href;+ if (href === '/#about' || href === '#about') return pageUrl(l, 'about');+ if (href.startsWith('#')) return prefix(l) + href;+ if (/\.[a-z0-9]{2,5}$/i.test(href.split('#')[0]) || href.startsWith('/.well-known/') || href.startsWith('/licenses/')) return href;+ return prefix(l) + href.replace(/^\//, '');+};+// a footer link to a site page is kept only if that page is built+function linkBuilt(href) {+ if (!href || /^(https?:|mailto:|#)/.test(href)) return true;+ const p = href.split('#')[0].replace(/^\//, '').replace(/\/$/, '');+ if (!p) return true;+ if (/\.[a-z0-9]{2,5}$/i.test(p)) return p !== '.well-known/security.txt' || fs.existsSync(path.join(DIST, p)) || !hasPh(fs.existsSync(path.join(CONTENT, 'well-known/security.txt')) ? fs.readFileSync(path.join(CONTENT, 'well-known/security.txt'), 'utf8') : '');+ return builtPages().has(p);+}+let _built = null;+function builtPages() {+ if (!_built) _built = new Set(['', 'apps', 'gallery', 'about', ...featureList.map((m) => 'features/' + m.slug), ...(HAS_PAPER ? ['paper'] : []), ...(HAS_FAQ ? ['faq'] : []), ...legalPages.map((x) => 'legal/' + x.slug)]);+ return _built;+}+function langLinks(t, page) {+ return LANGS.map((l) => `<a class="lang" href="${pageUrl(l, page)}" hreflang="${l}" lang="${l}" title="${esc(dict[l].langName)}"${l === t.lang ? ' aria-current="page"' : ''}>${l.toUpperCase()}</a>`).join('\n');+}+function themeButton(t, withText) {+ return `<button type="button" class="theme-btn" data-label="${esc(t.themeLabel)}" data-auto="${esc(t.themeAuto)}" data-light="${esc(t.themeLight)}" data-dark="${esc(t.themeDark)}" aria-label="${esc(t.themeLabel)}">${THEME_ICONS.auto}${THEME_ICONS.light}${THEME_ICONS.dark}${withText ? `<span class="tl">${esc(t.themeAuto)}</span>` : ''}</button>`;+}+function footer(t, page = 'home') {+ const l = t.lang;+ if (!footerJson) {+ return `<footer class="foot"><div class="wrap"><img src="${img.logoDark}" alt="LordOS" width="108" height="32" loading="lazy"><div class="foot-links">@@ -266,6 +355,33 @@ function footer(t) {</div><p>${esc(t.footer)}</p></div>+</footer>`;+ }+ const cols = (footerJson.columns || []).map((c, i) => `<nav class="fcol" aria-labelledby="fcol-${i}">+<h2 id="fcol-${i}">${esc(loc(c.title, l))}</h2>+<ul>+${(c.links || []).filter((k) => linkBuilt(k.href)).map((k) => `<li><a href="${esc(sitePath(k.href, l))}"${/^https?:/.test(k.href) ? ' rel="noopener"' : ''}>${phOut(esc(phIn(loc(k.label, l), 'footer.json')))}</a></li>`).join('\n')}+</ul>+</nav>`).join('\n');+ return `<footer class="foot">+<div class="wrap fcols">+<div class="fbrand">+<img src="${img.logoDark}" alt="LordOS" width="108" height="32" loading="lazy">+<p>${esc(loc(footerJson.tagline, l) || t.meta.description)}</p>+</div>+${cols}+</div>+<div class="fbar">+<div class="wrap">+<p>${phOut(esc(phIn(loc(footerJson.copyright, l) || t.footer, 'footer.json')))}${footerJson.note ? ` ${phOut(esc(phIn(loc(footerJson.note, l), 'footer.json')))}` : ''}</p>+<div class="tools">+${themeButton(t, false)}+<div class="langs" role="group" aria-label="${esc(t.langLabel)}">+${langLinks(t, page)}+</div>+</div>+</div>+</div></footer>`;}@@ -301,17 +417,18 @@ ${icons}</section>`;}-const tpl = { home: src('home.html'), gallery: src('gallery.html'), apps: src('apps.html'), notFound: src('404.html'), lightbox: src('lightbox.html') };+const tpl = { home: src('home.html'), gallery: src('gallery.html'), apps: src('apps.html'), notFound: src('404.html'), lightbox: src('lightbox.html'), feature: src('feature.html'), paper: src('paper.html'), legal: src('legal.html'), faq: src('faq.html'), about: src('about.html') };for (const l of LANGS) {const t = dict[l];- const common = (page) => ({ img, js: jsUrl, header: header(t, page), footer: footer(t), head: head(t, page), lightbox: render(tpl.lightbox, {}, t) });+ const common = (page, over, doc) => ({ img, js: jsUrl, header: header(t, page), footer: footer(t, page), head: head(t, page, over, doc), lightbox: render(tpl.lightbox, {}, t) });// homeconst features = t.features.map(([title, text], i) => `<article class="feat"><div class="feat-ico" aria-hidden="true"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="${ICONS[i]}"/></svg></div><h3>${esc(title)}</h3><p>${esc(text)}</p>+${featureList[i] ? `<a class="more" href="${pageUrl(l, 'features/' + featureList[i].slug)}">${esc(t.pages.learnMore)}<span class="vh">: ${esc(title)}</span> <span aria-hidden="true">→</span></a>` : ''}</article>`).join('\n');const showcase = t.showcase.map(([kicker, title, text, alt], i) => `<div class="show-row${i % 2 ? ' rev' : ''}"><div class="show-txt">@@ -323,7 +440,13 @@ for (const l of LANGS) {</div>`).join('\n');write(path.join(pageUrl(l, 'home'), 'index.html'), render(tpl.home, {...common('home'), features, showcase, teaser: teaser(t),- heroImg: picture(r('docs/brand/screenshots/about-light.png'), t.altDesktop, { eager: true }),+ heroImg: (() => {+ // the desktop inside a laptop drawn in CSS; light and dark screenshots follow the theme+ const L = r('docs/screenshots/desktop-overview-light.png'), D = r('docs/screenshots/desktop-overview-dark.png');+ const im = (f, cls, eager) => { const s1 = webp(f, 720), s2 = webp(f, 1600); return `<img class="${cls}" src="${s2.url}" srcset="${s1.url} ${s1.w}w, ${s2.url} ${s2.w}w" sizes="(max-width: 1040px) 92vw, 920px" width="${s2.w}" height="${s2.h}" alt="${esc(t.pages.hero.alt)}"${eager ? ' fetchpriority="high"' : ' loading="lazy"'} decoding="async">`; };+ const pills = t.pages.hero.pills.map((p, k) => `<span class="pill p${k + 1}">${esc(p)}</span>`).join('');+ return `<div class="laptop"><div class="lp-screen"><span class="lp-cam" aria-hidden="true"></span><div class="lp-display">${im(L, 'lp-l', true)}${im(D, 'lp-d', false)}</div></div><div class="lp-base" aria-hidden="true"><span class="lp-notch"></span></div><p class="pills">${pills}</p></div>`;+ })(),fingerprint: FINGERPRINT, banner: l === 'en' ? banner() : '',}, t));@@ -368,6 +491,150 @@ ${apps.filter((a) => a.category === c).sort((x, y) => appName(x, l).localeCompar</section>`).join('\n');write(path.join(pageUrl(l, 'apps'), 'index.html'), render(tpl.apps, { ...common('apps'), catButtons, sections }, t));}++ // feature pages and paper share these helpers+ const ghLink = (u) => (/^(https?:|mailto:|#)/.test(u) ? u : u.startsWith('/') ? (linkBuilt(u) ? sitePath(u, l) : '') : `${GITHUB}/blob/main/${u.replace(/^\.?\//, '')}`);+ const shotFig = (file, cap, cls = 'shot-fig') => {+ const f = r(file);+ if (!fs.existsSync(f)) { console.warn('[web] missing screenshot', file); return ''; }+ const thumb = webp(f, 720), full = webp(f, 1600);+ return `<figure class="${cls}"><a class="g-card" href="${full.url}" data-w="${full.w}" data-h="${full.h}" data-cap="${esc(cap)}" aria-label="${esc(t.gallery.open + ': ' + cap)}"><img src="${thumb.url}" width="${thumb.w}" height="${thumb.h}" alt="${esc(cap)}" loading="lazy" decoding="async"></a>${cap ? `<figcaption>${esc(cap)}</figcaption>` : ''}</figure>`;+ };+ const diaStrings = { tones: t.pages.tones, legend: t.pages.legend, then: t.pages.then, connections: t.pages.connections };+ const renderMd = (srcText, diagrams, screenshots, usedShots, where = 'content') => { const res = markdown(phIn(srcText, where), {+ anchorLabel: t.pages.anchorLabel,+ link: ghLink,+ image: (url, alt, title) => shotFig(url, title || alt),+ block: (kind, arg) => {+ if (kind === 'diagram') {+ const d = (diagrams || []).find((x) => x.id === arg);+ if (!d) { console.warn('[web] unknown diagram', arg); return ''; }+ return diagram(d, l, diaStrings);+ }+ if (kind === 'shot') {+ if (/^\d+$/.test(arg || '')) {+ const sh = (screenshots || [])[+arg];+ if (!sh) { console.warn('[web] unknown shot', arg); return ''; }+ usedShots && usedShots.add(+arg);+ return shotFig(sh.file, loc(sh.caption, l));+ }+ return arg ? shotFig(arg, '') : '';+ }+ return '';+ },+ }); res.html = phOut(res.html); return res; };++ featureList.forEach((m, i) => {+ const page = 'features/' + m.slug;+ const { body } = frontMatter(fs.readFileSync(path.join(featDir, `${m.slug}.${l}.md`), 'utf8'));+ const used = new Set();+ // the page renders meta.sources as "Read the source"; drop a trailing markdown section that only+ // repeats those GitHub links+ const parts = body.split(/^(?=## )/m);+ const last = parts[parts.length - 1];+ const lines = last.split('\n').slice(1).map((x) => x.trim()).filter(Boolean);+ const mdBody = m.sources && m.sources.length && lines.length && lines.every((x) => /^[-*]\s+\[[^\]]+\]\(https:\/\/github\.com\//.test(x)) ? parts.slice(0, -1).join('') : body;+ const { html: bodyHtml, headings } = renderMd(mdBody, m.diagrams, m.screenshots, used, `features/${m.slug}.${l}.md`);+ const title = loc(m.title, l) || (headings[0] && headings[0].text) || m.slug;+ const rest = (m.screenshots || []).map((sh, k) => (used.has(k) ? '' : shotFig(sh.file, loc(sh.caption, l), 'shot-fig'))).filter(Boolean);+ const shots = rest.length ? `<section class="prose" aria-labelledby="shots-h"><h2 id="shots-h">${esc(t.pages.shotsTitle)}</h2><div class="shots">${rest.join('')}</div></section>` : '';+ const sources = (m.sources || []).map((s) => `<li><a href="${esc(ghLink(s.path || s.url))}" rel="noopener">${esc(s.path || s.url)}</a><span>${esc(loc(s.what, l))}</span></li>`).join('\n');+ const prev = featureList[(i - 1 + featureList.length) % featureList.length], next = featureList[(i + 1) % featureList.length];+ const pn = featureList.length > 1+ ? `<li><a href="${pageUrl(l, 'features/' + prev.slug)}" rel="prev"><small>← ${esc(t.pages.prev)}</small><strong>${esc(loc(prev.title, l))}</strong></a></li>+<li class="next"><a href="${pageUrl(l, 'features/' + next.slug)}" rel="next"><small>${esc(t.pages.next)} →</small><strong>${esc(loc(next.title, l))}</strong></a></li>`+ : '';+ const pose = (m.lumo && m.lumo.pose) || 'front';+ write(path.join(pageUrl(l, page), 'index.html'), render(tpl.feature, {+ ...common(page, [`${title} · LordOS`, loc(m.tagline, l) || t.meta.description], true),+ lumo: LUMO[pose] || LUMO.front || img.lumoWave,+ title: esc(title), tagline: esc(loc(m.tagline, l)), intro: inline(loc(m.lumo && m.lumo.intro, l)),+ body: bodyHtml, shots, sources, prevnext: pn,+ }, t));+ });++ if (HAS_PAPER) {+ const { data: fm, body } = frontMatter(fs.readFileSync(path.join(paperDir, `paper.${l}.md`), 'utf8'));+ const meta = { ...fm, ...paperMeta };+ const { html: bodyHtml, headings } = renderMd(body, paperDiagrams.diagrams || [], paperDiagrams.screenshots || meta.screenshots || []);+ const title = loc(meta.title, l) || fm.title || 'LordOS';+ const subtitle = loc(meta.subtitle, l) || fm.subtitle || '';+ // two-level table of contents from ## and ###+ let toc = '<ol>', open = false;+ for (const h of headings.filter((x) => x.level === 2 || x.level === 3)) {+ if (h.level === 2) { if (open) toc += '</ol></li>'; else if (toc !== '<ol>') toc += '</li>'; toc += `<li><a href="#${h.id}">${esc(h.text)}</a>`; open = false; }+ else { if (!open) { toc += '<ol>'; open = true; } toc += `<li><a href="#${h.id}">${esc(h.text)}</a></li>`; }+ }+ toc += (open ? '</ol></li>' : toc === '<ol>' ? '' : '</li>') + '</ol>';+ const authors = Array.isArray(meta.authors) ? meta.authors.join(', ') : meta.authors || '';+ const metaLine = [+ meta.version ? `<span>${esc(t.pages.paper.version)} <strong>${esc(meta.version)}</strong></span>` : '',+ authors ? `<span>${esc(t.pages.paper.authors)}: <strong>${esc(authors)}${meta.org ? ` · ${esc(loc(meta.org, l))}` : ''}</strong></span>` : '',+ meta.date ? `<span>${esc(t.pages.paper.date)}: <strong><time datetime="${esc(meta.date)}">${esc(new Date(meta.date + 'T12:00:00Z').toLocaleDateString(l === 'en' ? 'en-US' : l === 'es' ? 'es-AR' : 'pt-BR', { year: 'numeric', month: 'long', day: 'numeric', timeZone: 'UTC' }))}</time></strong></span>` : '',+ ].filter(Boolean).join('');+ const pdf = HAS_PDF ? `<a class="btn btn-primary" href="${pageUrl(l, 'paper')}lordos-paper-${l}.pdf" download><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 4v11M7 10l5 5 5-5M5 20h14"/></svg>${esc(t.pages.paper.pdf)}</a>` : '';+ write(path.join(pageUrl(l, 'paper'), 'index.html'), render(tpl.paper, {+ ...common('paper', [`${title} · LordOS`, t.pages.paper.metaDescription], true),+ title: esc(title), subtitle: esc(subtitle), meta: metaLine, pdf, toc, body: bodyHtml,+ }, t));+ }++ // legal pages+ const fmtDate = (iso) => new Date(iso + 'T12:00:00Z').toLocaleDateString(l === 'en' ? 'en-US' : l === 'es' ? 'es-AR' : 'pt-BR', { year: 'numeric', month: 'long', day: 'numeric', timeZone: 'UTC' });+ for (const lp of legalPages) {+ const page = 'legal/' + lp.slug;+ const { body } = frontMatter(fs.readFileSync(path.join(legalDir, `${lp.slug}.${l}.md`), 'utf8'));+ const { html: bodyHtml } = renderMd(body, [], [], null, `legal/${lp.slug}.${l}.md`);+ const title = loc(lp.title, l) || lp.slug;+ const updated = lp.updated || legalIndex.updated || today;+ const nav = legalPages.map((x) => `<li><a href="${pageUrl(l, 'legal/' + x.slug)}"${x.slug === lp.slug ? ' aria-current="page"' : ''}>${esc(loc(x.title, l) || x.slug)}</a></li>`).join('\n');+ write(path.join(pageUrl(l, page), 'index.html'), render(tpl.legal, {+ ...common(page, [`${title} · LordOS`, loc(lp.description, l) || `${title} — lordos.org`], true),+ title: phOut(esc(phIn(title, 'legal/pages.json'))), updated: esc(fmtDate(updated)), updatedIso: esc(updated), nav, body: bodyHtml,+ }, t));+ }++ // FAQ+ if (HAS_FAQ) {+ const cats = faqJson.categories;+ const chips = cats.map((c) => `<a class="g-chip" href="#${esc(c.id)}">${esc(loc(c.title, l))} <span class="n">${(c.items || []).length}</span></a>`).join('\n');+ const ld = { '@context': 'https://schema.org', '@type': 'FAQPage', inLanguage: l, mainEntity: [] };+ const sections = cats.map((c) => `<section class="faq-sec" id="${esc(c.id)}" aria-labelledby="${esc(c.id)}-h">+<h2 id="${esc(c.id)}-h">${esc(loc(c.title, l))}</h2>+${(c.items || []).map((it) => {+ const q = loc(it.q, l), a = loc(it.a, l);+ const { html } = renderMd(a, [], [], null, `faq.json ${it.id}`);+ ld.mainEntity.push({ '@type': 'Question', name: q, acceptedAnswer: { '@type': 'Answer', text: html.replace(/<[^>]+>/g, ' ').replace(/\s+/g, ' ').replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').trim() } });+ return `<details id="${esc(it.id)}"><summary>${phOut(esc(phIn(q, 'faq.json')))}</summary><div class="prose">${html}</div></details>`;+ }).join('\n')}+</section>`).join('\n');+ const jsonld = `<script type="application/ld+json">${JSON.stringify(ld).replace(/</g, '\\u003c')}</script>`;+ write(path.join(pageUrl(l, 'faq'), 'index.html'), render(tpl.faq, {+ ...common('faq', [`${t.pages.faq.title} · LordOS`, t.pages.faq.lead], true), chips, sections, jsonld,+ }, t));+ }++ // about+ {+ const A = t.pages.about;+ const fill = (s, name) => s.replace('{name}', name);+ const li = '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 01-1 1H5a1 1 0 01-1-1V7a1 1 0 011-1h5"/></svg>';+ const people = team.people.map((p) => {+ const photo = p.photo && fs.existsSync(r(p.photo))+ ? `<img class="avatar" src="${webp(r(p.photo), 336, 82).url}" alt="${esc(fill(A.photoOf, p.name))}" width="168" height="168" loading="lazy">`+ : `<div class="avatar initials" role="img" aria-label="${esc(fill(A.initialsOf, p.name))}">${esc(p.initials)}</div>`;+ const link = p.linkedin && !/^\[\[/.test(p.linkedin)+ ? `<a class="btn btn-ghost" href="${esc(p.linkedin)}" rel="noopener" aria-label="${esc(fill(A.linkedinOf, p.name))}">${li}LinkedIn</a>` : '';+ return `<article class="creator">${photo}<h3>${esc(p.name)}</h3><p>${esc(A.role)}</p>${link}</article>`;+ }).join('\n');+ const work = A.work.map(([title, text]) => `<article class="feat"><h3>${esc(title)}</h3><p>${esc(text)}</p></article>`).join('\n');+ write(path.join(pageUrl(l, 'about'), 'index.html'), render(tpl.about, {+ ...common('about', [A.metaTitle, A.metaDescription]),+ people, work, liIcon: li, lumoWave: img.lumoWave,+ siteUrl: esc(team.company.site.replace('{lang}', l)), companyLinkedin: esc(team.company.linkedin),+ contactUrl: esc(team.company.contact.replace('{lang}', l)), supportUrl: prefix(l) + '#support',+ }, t));+ }}// 404 (English, noindex)@@ -392,9 +659,15 @@ write('social-card.png', read(r('docs/brand/png/social-card-1200x630.png')));write('lordos-release.pub.pem', read(r('tools/release/lordos-release.pub.pem')));write('install.sh', read(r('tools/install/install.sh')));execFileSync('cmp', [r('tools/install/install.sh'), path.join(DIST, 'install.sh')]); // throws if they differ+const secTxt = path.join(CONTENT, 'well-known/security.txt');+if (fs.existsSync(secTxt)) {+ const txt = fs.readFileSync(secTxt, 'utf8');+ if (!hasPh(txt) || ALLOW_PH) write('.well-known/security.txt', notePh(txt, 'well-known/security.txt'));+ else log('security.txt held back: it still has placeholders');+}write('robots.txt', `User-agent: *\nAllow: /\n\nSitemap: ${SITE}/sitemap.xml\n`);-const today = new Date().toISOString().slice(0, 10);-const urls = PAGES.filter((p) => p !== 'apps' || HAS_APPS).flatMap((p) => LANGS.map((l) => ` <url>+const allPages = [...PAGES.filter((p) => p !== 'apps' || HAS_APPS), ...featureList.map((m) => 'features/' + m.slug), ...(HAS_PAPER ? ['paper'] : []), ...(HAS_FAQ ? ['faq'] : []), 'about', ...legalPages.map((p) => 'legal/' + p.slug)];+const urls = allPages.flatMap((p) => LANGS.map((l) => ` <url><loc>${SITE}${pageUrl(l, p)}</loc><lastmod>${today}</lastmod>${LANGS.map((a) => ` <xhtml:link rel="alternate" hreflang="${a}" href="${SITE}${pageUrl(a, p)}"/>`).join('\n')}@@ -407,17 +680,83 @@ ${urls.join('\n')}`);// ---------- checks ----------+if (placeholders.size) {+ const list = [...placeholders.keys()];+ if (ALLOW_PH) console.warn(`[web] PREVIEW: ${list.length} placeholders left (highlighted on the pages):\n ` + list.join('\n '));+ else throw new Error(`${list.length} content placeholders left; fill them in or build a preview with --allow-placeholders:\n ` + list.join('\n '));+}const html = [];(function walk(d) { for (const e of fs.readdirSync(d, { withFileTypes: true })) { const p = path.join(d, e.name); if (e.isDirectory()) walk(p); else if (p.endsWith('.html')) html.push(p); } })(DIST);for (const f of html) {const s = fs.readFileSync(f, 'utf8');- if (/<script(?![^>]*\ssrc=)[^>]*>/i.test(s)) throw new Error('inline <script> in ' + f);+ if (/<script(?![^>]*\ssrc=)(?![^>]*type="application\/ld\+json")[^>]*>/i.test(s)) throw new Error('inline <script> in ' + f);if (/\son[a-z]+=/i.test(s)) throw new Error('inline event handler in ' + f);if (/https?:\/\/(fonts\.|cdn)/i.test(s)) throw new Error('external font/CDN in ' + f);- if (/operating system|sistema operativo|sistema operacional|\bX11\b/i.test(s)) throw new Error('forbidden wording in ' + f);- if (/Raspberry Pi (4|400|500)\b|\bCM4\b/i.test(s)) throw new Error('only Raspberry Pi 5 is supported: ' + f);+ if (/operating system|sistema operativo|sistema operacional|\b(?:our|own|nuestro|propio|próprio|nosso)\s+X11\b|\bX11\s+(?:display\s+)?server\b|from scratch|desde cero|\bdo zero\b/i.test(s)) {+ const msg = 'forbidden wording in ' + path.relative(DIST, f) + ': ' + s.match(/.{0,60}(operating system|sistema operativo|sistema operacional|\b(?:our|own|nuestro|propio|próprio|nosso)\s+X11\b|\bX11\s+(?:display\s+)?server\b|from scratch|desde cero|\bdo zero\b).{0,40}/i)[0];+ if (process.env.WEB_SKIP_WORDING) console.warn('[web] WARNING ' + msg); else throw new Error(msg);+ }+ { const m = s.replace(/<[^>]+>/g, ' ').match(/.{0,70}(Raspberry Pi (4|400|500)\b|\bCM4\b).{0,50}/i); if (m) console.warn(`[web] other Raspberry Pi model mentioned (only Pi 5 is supported; check the wording) in ${path.relative(DIST, f)}: …${m[0].trim()}…`); }}const jsSize = Buffer.byteLength(jsSrc) + Buffer.byteLength(themeSrc), cssSize = Buffer.byteLength(css);if (jsSize > 15 * 1024) throw new Error(`JS is ${jsSize} bytes (limit 15 KB)`);if (cssSize > 30 * 1024) throw new Error(`site.css is ${cssSize} bytes (limit 30 KB)`);+if (docCss.length > 30 * 1024) throw new Error(`doc.css is ${docCss.length} bytes (limit 30 KB)`);log(`built ${html.length} pages into web/dist (js ${jsSize} B, css ${cssSize} B, ${shots.length} gallery images, ${apps.length} apps); install.sh byte-identical`);++// ---------- paper PDFs (headless Chromium prints the built page) ----------+if (HAS_PDF) {+ const { chromium } = createRequire(path.join(TOOLS, 'package.json'))('playwright');+ const types = { '.html': 'text/html', '.css': 'text/css', '.js': 'text/javascript', '.svg': 'image/svg+xml', '.webp': 'image/webp', '.png': 'image/png', '.woff2': 'font/woff2' };+ const server = http.createServer((req, res) => {+ let p = decodeURIComponent(new URL(req.url, 'http://x').pathname);+ if (p.endsWith('/')) p += 'index.html';+ const f = path.join(DIST, p);+ if (!f.startsWith(DIST) || !fs.existsSync(f)) { res.writeHead(404); res.end(); return; }+ res.writeHead(200, { 'content-type': types[path.extname(f)] || 'application/octet-stream' });+ res.end(fs.readFileSync(f));+ });+ await new Promise((ok) => server.listen(0, '127.0.0.1', ok));+ const port = server.address().port;+ const browser = await chromium.launch();+ for (const l of LANGS) {+ const page = await browser.newPage({ colorScheme: 'light' });+ await page.goto(`http://127.0.0.1:${port}${pageUrl(l, 'paper')}`, { waitUntil: 'networkidle' });+ await page.evaluate(() => document.querySelectorAll('img[loading=lazy]').forEach((i) => { i.loading = 'eager'; }));+ await page.waitForLoadState('networkidle');+ await page.emulateMedia({ media: 'print', colorScheme: 'light' });+ const title = await page.title();+ await page.pdf({+ path: path.join(DIST, pageUrl(l, 'paper'), `lordos-paper-${l}.pdf`), format: 'A4', printBackground: true,+ margin: { top: '18mm', bottom: '18mm', left: '16mm', right: '16mm' }, displayHeaderFooter: true,+ headerTemplate: '<span></span>',+ footerTemplate: `<div style="width:100%;font:9px sans-serif;color:#777;padding:0 16mm;display:flex;justify-content:space-between"><span>${esc(title)}</span><span><span class="pageNumber"></span> / <span class="totalPages"></span></span></div>`,+ });+ await page.close();+ }+ await browser.close();+ server.close();+ log(`paper: ${LANGS.length} PDFs`);+}++// ---------- third-party names outside the allowed list (warning only) ----------+{+ const BRANDS = /\b(GNOME|KDE|Apple|macOS|Mac OS|iPhone|Windows|Microsoft|Google|Android|Outlook|Little Snitch|Ubuntu|Fedora|Chrome OS|ChromeOS|Flatpak|Snap Store)\b/g;+ const found = new Map();+ for (const f of html) { const s = fs.readFileSync(f, 'utf8').replace(/<[^>]+>/g, ' '); for (const m of s.matchAll(BRANDS)) found.set(m[1], (found.get(m[1]) || new Set()).add(path.relative(DIST, f))); }+ for (const [b, fs1] of found) console.warn(`[web] third-party name "${b}" in ${[...fs1].slice(0, 4).join(', ')}${fs1.size > 4 ? ` and ${fs1.size - 4} more` : ''}`);+}++// ---------- internal link check (warns about links to pages that are not built) ----------+{+ const missing = new Map();+ for (const f of html) {+ const s = fs.readFileSync(f, 'utf8');+ for (const m of s.matchAll(/href="(\/[^"#?]*)/g)) {+ let p = m[1];+ const target = path.join(DIST, p.endsWith('/') ? p + 'index.html' : p);+ if (!fs.existsSync(target) && !fs.existsSync(path.join(DIST, p, 'index.html'))) missing.set(p, (missing.get(p) || new Set()).add(path.relative(DIST, f)));+ }+ }+ for (const [p, from] of missing) console.warn(`[web] link to a missing page ${p} from ${[...from].slice(0, 3).join(', ')}${from.size > 3 ? ` and ${from.size - 3} more` : ''}`);+}diff --git a/web/i18n/apps.json b/web/i18n/apps.jsonindex 8620003..79e8106 100644--- a/web/i18n/apps.json+++ b/web/i18n/apps.json@@ -629,9 +629,9 @@"screenshot": "docs/screenshots/terminal.png","name": {"en": "Terminal", "es": "Terminal", "pt": "Terminal"},"tagline": {- "en": "A fast native terminal, written from scratch",- "es": "Una terminal nativa y rápida, escrita desde cero",- "pt": "Um terminal nativo e rápido, escrito do zero"+ "en": "A fast native terminal with its own emulator",+ "es": "Una terminal nativa y rápida, con emulador propio",+ "pt": "Um terminal nativo e rápido, com emulador próprio"},"features": {"en": [diff --git a/web/i18n/en.json b/web/i18n/en.jsonindex 7cbc2a8..711c795 100644--- a/web/i18n/en.json+++ b/web/i18n/en.json@@ -4,9 +4,9 @@"ogLocale": "en_US","meta": {"title": "LordOS — the free, fast and secure Linux desktop",- "description": "LordOS is a free GNU/Linux distribution based on Debian with its own desktop environment, display server and Wayland compositor built from scratch. Private by design, light enough for a Raspberry Pi.",+ "description": "LordOS is a free GNU/Linux distribution based on Debian with its own desktop environment, display server and Wayland compositor, built on solid Debian and Wayland foundations. Private by design, light enough for a Raspberry Pi.","galleryTitle": "LordOS gallery — every screen",- "galleryDescription": "Real screenshots of LordOS, the free GNU/Linux distribution based on Debian with its own desktop environment built from scratch. No mockups, no retouching."+ "galleryDescription": "Real screenshots of LordOS, the free GNU/Linux distribution based on Debian with a desktop environment of its own. No mockups, no retouching."},"skip": "Skip to content","navLabel": "Main",@@ -19,7 +19,7 @@"navAbout": "About","badge": "Version 0.7.0 · Beta","heroTitle": "The free, fast and secure Linux desktop.",- "heroLead": "LordOS is a free GNU/Linux distribution based on Debian with its own desktop environment, display server and Wayland compositor built from scratch in C, its own interface engine, and native apps made to feel calm, clear and private.",+ "heroLead": "LordOS is a free GNU/Linux distribution based on Debian with its own desktop environment, display server and Wayland compositor written in C, its own interface engine, and native apps made to feel calm, clear and private.","ctaDownload": "Download LordOS","ctaTour": "Take the tour","altDesktop": "The LordOS desktop with the Dock, the menu bar and the About window",@@ -27,12 +27,12 @@"featLead": "A complete desktop with native apps, privacy built in, and the Linux apps you already use.","features": [[- "A desktop built from scratch",+ "A desktop of its own","Its own display server and Wayland compositor in C and its own interface engine, on a solid Debian base. Light enough for a Raspberry Pi, smooth on a modern PC."],["Private by design",- "Apps run isolated and ask before using your camera, microphone, files or network. You decide."+ "Installable LordOS apps run isolated and ask before using your camera, microphone, files or network. You decide."],["A firewall you can see",@@ -159,7 +159,7 @@"isolatedTitle": "Runs in its own sandboxed process","shotOpen": "Open screenshot","metaTitle": "LordOS apps — every native app",- "metaDescription": "The native apps of LordOS, the free GNU/Linux distribution based on Debian with its own desktop environment built from scratch: mail, calendar, files, passwords, media and more.",+ "metaDescription": "The native apps of LordOS, the free GNU/Linux distribution based on Debian with a desktop environment of its own: mail, calendar, files, passwords, media and more.","teaserKicker": "Native apps","teaserTitle": "Apps for everything you do","teaserText": "Mail, calendar, files, passwords, photos, music and more: native apps that look and feel the same.",diff --git a/web/i18n/es.json b/web/i18n/es.jsonindex 0d972c9..2eeb692 100644--- a/web/i18n/es.json+++ b/web/i18n/es.json@@ -4,9 +4,9 @@"ogLocale": "es_AR","meta": {"title": "LordOS — el escritorio Linux libre, rápido y seguro",- "description": "LordOS es una distribución GNU/Linux libre basada en Debian con su propio entorno de escritorio, servidor gráfico y compositor Wayland hechos desde cero. Privado por diseño y liviano para una Raspberry Pi.",+ "description": "LordOS es una distribución GNU/Linux libre basada en Debian con su propio entorno de escritorio, servidor gráfico y compositor Wayland, construido sobre bases sólidas de Debian y Wayland. Privado por diseño y liviano para una Raspberry Pi.","galleryTitle": "Galería de LordOS — cada pantalla",- "galleryDescription": "Capturas reales de LordOS, la distribución GNU/Linux libre basada en Debian con su propio entorno de escritorio hecho desde cero. Sin maquetas ni retoques."+ "galleryDescription": "Capturas reales de LordOS, la distribución GNU/Linux libre basada en Debian con su propio entorno de escritorio. Sin maquetas ni retoques."},"skip": "Ir al contenido","navLabel": "Principal",@@ -19,7 +19,7 @@"navAbout": "Nosotros","badge": "Versión 0.7.0 · Beta","heroTitle": "El escritorio Linux libre, rápido y seguro.",- "heroLead": "LordOS es una distribución GNU/Linux libre basada en Debian con su propio entorno de escritorio, servidor gráfico y compositor Wayland hechos desde cero en C, su propio motor de interfaz y apps nativas pensadas para sentirse tranquilas, claras y privadas.",+ "heroLead": "LordOS es una distribución GNU/Linux libre basada en Debian con su propio entorno de escritorio, servidor gráfico y compositor Wayland escritos en C, su propio motor de interfaz y apps nativas pensadas para sentirse tranquilas, claras y privadas.","ctaDownload": "Descargar LordOS","ctaTour": "Ver el recorrido","altDesktop": "El escritorio de LordOS con el Dock, la barra de menú y la ventana Acerca de",@@ -27,12 +27,12 @@"featLead": "Un escritorio completo con apps nativas, privacidad incluida y las apps de Linux que ya usás.","features": [[- "Un escritorio hecho desde cero",+ "Un escritorio propio","Su propio servidor gráfico y compositor Wayland en C y su propio motor de interfaz, sobre una base Debian sólida. Liviano para una Raspberry Pi, fluido en una PC moderna."],["Privado por diseño",- "Las apps corren aisladas y piden permiso antes de usar tu cámara, micrófono, archivos o red. Vos decidís."+ "Las apps instalables de LordOS corren aisladas y piden permiso antes de usar tu cámara, micrófono, archivos o red. Vos decidís."],["Un firewall que se ve",@@ -159,7 +159,7 @@"isolatedTitle": "Corre en su propio proceso aislado","shotOpen": "Abrir captura","metaTitle": "Apps de LordOS — todas las apps nativas",- "metaDescription": "Las apps nativas de LordOS, la distribución GNU/Linux libre basada en Debian con su propio entorno de escritorio hecho desde cero: correo, calendario, archivos, contraseñas, multimedia y más.",+ "metaDescription": "Las apps nativas de LordOS, la distribución GNU/Linux libre basada en Debian con su propio entorno de escritorio: correo, calendario, archivos, contraseñas, multimedia y más.","teaserKicker": "Apps nativas","teaserTitle": "Apps para todo lo que hacés","teaserText": "Correo, calendario, archivos, contraseñas, fotos, música y más: apps nativas que se ven y se sienten igual.",diff --git a/web/i18n/pages.json b/web/i18n/pages.jsonnew file mode 100644index 0000000..007f07f--- /dev/null+++ b/web/i18n/pages.json@@ -0,0 +1,296 @@+{+ "en": {+ "navPaper": "Paper",+ "learnMore": "Learn more",+ "featuresKicker": "Feature",+ "shotsTitle": "Screenshots",+ "sourcesTitle": "Read the source",+ "sourcesLead": "The code behind this feature, on GitHub.",+ "prev": "Previous",+ "next": "Next",+ "allFeatures": "All features",+ "tones": {+ "ours": "Ours",+ "reused": "Reused",+ "kernel": "Kernel",+ "user": "You",+ "allow": "Allowed",+ "deny": "Blocked"+ },+ "legend": "Legend",+ "then": "then",+ "connections": "Connections",+ "anchorLabel": "Link to this section",+ "paper": {+ "metaDescription": "How LordOS works inside: the paper behind the free GNU/Linux distribution based on Debian with its own desktop environment, display server and Wayland compositor.",+ "toc": "Contents",+ "pdf": "Download PDF",+ "version": "Version",+ "date": "Date",+ "authors": "Authors",+ "kicker": "Paper"+ },+ "lumoSays": "Lumo says",+ "legal": {+ "nav": "Legal",+ "updated": "Last updated"+ },+ "faq": {+ "title": "Frequently asked questions",+ "lead": "Short answers about LordOS, downloads, hardware, privacy and the project.",+ "search": "Search the questions",+ "categories": "Categories",+ "empty": "No question matches your search.",+ "all": "All"+ },+ "navFaq": "FAQ",+ "theme": "Theme",+ "about": {+ "metaTitle": "About · Made by IPERFEX · LordOS",+ "metaDescription": "LordOS is created and maintained by IPERFEX, a technology company from Argentina led by Pablo Miranda and Federico Pereira.",+ "kicker": "About",+ "title": "Made by IPERFEX",+ "lead": "LordOS is created and maintained by IPERFEX, a technology company from Argentina, led by Pablo Miranda and Federico Pereira.",+ "site": "Visit iperfex.com",+ "linkedin": "IPERFEX on LinkedIn",+ "creatorsTitle": "The creators",+ "role": "Co-creator · IPERFEX",+ "linkedinOf": "{name} on LinkedIn",+ "photoOf": "Photo of {name}",+ "initialsOf": "Initials of {name}",+ "workTitle": "Work with IPERFEX",+ "workLead": "The team that builds LordOS can help your organisation use it.",+ "work": [+ [+ "Sponsorship",+ "Sponsor LordOS and help fund new features, hardware for testing and the release infrastructure."+ ],+ [+ "Collaborations and partnerships",+ "Work with us on joint projects, integrations or hardware partnerships around LordOS."+ ],+ [+ "Custom apps for LordOS",+ "Native apps built on the LordOS interface engine, packaged as .lpk, and integrations with your systems."+ ],+ [+ "Support for companies",+ "Help with deployments, Raspberry Pi 5 fleets and custom LordOS images for your devices."+ ],+ [+ "Training",+ "Training for teams that deploy, manage or build apps for LordOS."+ ]+ ],+ "contact": "Contact IPERFEX",+ "supportTitle": "Support the project",+ "supportText": "LordOS is free software. You can help with a donation or by following the project.",+ "donate": "Donate",+ "github": "Follow the project on GitHub"+ },+ "hero": {+ "pills": [+ "465 MB RAM at idle",+ "Boots in 16 s",+ "Signed releases · Ed25519"+ ],+ "alt": "The LordOS desktop with Calendar, Files, Photos and Player open"+ }+ },+ "es": {+ "navPaper": "Paper",+ "learnMore": "Ver más",+ "featuresKicker": "Función",+ "shotsTitle": "Capturas",+ "sourcesTitle": "Leé el código",+ "sourcesLead": "El código detrás de esta función, en GitHub.",+ "prev": "Anterior",+ "next": "Siguiente",+ "allFeatures": "Todas las funciones",+ "tones": {+ "ours": "Propio",+ "reused": "Reutilizado",+ "kernel": "Kernel",+ "user": "Vos",+ "allow": "Permitido",+ "deny": "Bloqueado"+ },+ "legend": "Referencias",+ "then": "luego",+ "connections": "Conexiones",+ "anchorLabel": "Enlace a esta sección",+ "paper": {+ "metaDescription": "Cómo funciona LordOS por dentro: el paper de la distribución GNU/Linux libre basada en Debian con su propio entorno de escritorio, servidor gráfico y compositor Wayland.",+ "toc": "Contenido",+ "pdf": "Descargar PDF",+ "version": "Versión",+ "date": "Fecha",+ "authors": "Autores",+ "kicker": "Paper"+ },+ "lumoSays": "Lumo cuenta",+ "legal": {+ "nav": "Legal",+ "updated": "Última actualización"+ },+ "faq": {+ "title": "Preguntas frecuentes",+ "lead": "Respuestas cortas sobre LordOS, descargas, hardware, privacidad y el proyecto.",+ "search": "Buscar en las preguntas",+ "categories": "Categorías",+ "empty": "Ninguna pregunta coincide con tu búsqueda.",+ "all": "Todas"+ },+ "navFaq": "FAQ",+ "theme": "Tema",+ "about": {+ "metaTitle": "Nosotros · Hecho por IPERFEX · LordOS",+ "metaDescription": "LordOS es creado y mantenido por IPERFEX, una empresa de tecnología de Argentina liderada por Pablo Miranda y Federico Pereira.",+ "kicker": "Nosotros",+ "title": "Hecho por IPERFEX",+ "lead": "LordOS es creado y mantenido por IPERFEX, una empresa de tecnología de Argentina, liderada por Pablo Miranda y Federico Pereira.",+ "site": "Visitá iperfex.com",+ "linkedin": "IPERFEX en LinkedIn",+ "creatorsTitle": "Los creadores",+ "role": "Cocreador · IPERFEX",+ "linkedinOf": "{name} en LinkedIn",+ "photoOf": "Foto de {name}",+ "initialsOf": "Iniciales de {name}",+ "workTitle": "Trabajá con IPERFEX",+ "workLead": "El equipo que construye LordOS puede ayudar a tu organización a usarlo.",+ "work": [+ [+ "Patrocinio",+ "Patrociná LordOS y ayudá a financiar nuevas funciones, hardware para pruebas y la infraestructura de publicación."+ ],+ [+ "Colaboraciones y alianzas",+ "Trabajá con nosotros en proyectos conjuntos, integraciones o alianzas de hardware alrededor de LordOS."+ ],+ [+ "Apps a medida para LordOS",+ "Apps nativas sobre el motor de interfaz de LordOS, empaquetadas como .lpk, e integraciones con tus sistemas."+ ],+ [+ "Soporte para empresas",+ "Ayuda con despliegues, flotas de Raspberry Pi 5 e imágenes de LordOS a medida para tus equipos."+ ],+ [+ "Capacitación",+ "Capacitación para equipos que despliegan, administran o desarrollan apps para LordOS."+ ]+ ],+ "contact": "Contactar a IPERFEX",+ "supportTitle": "Apoyá el proyecto",+ "supportText": "LordOS es software libre. Podés ayudar con una donación o siguiendo el proyecto.",+ "donate": "Donar",+ "github": "Seguí el proyecto en GitHub"+ },+ "hero": {+ "pills": [+ "465 MB de RAM en reposo",+ "Arranca en 16 s",+ "Versiones firmadas · Ed25519"+ ],+ "alt": "El escritorio de LordOS con Calendario, Archivos, Fotos y Reproductor abiertos"+ }+ },+ "pt": {+ "navPaper": "Paper",+ "learnMore": "Saiba mais",+ "featuresKicker": "Recurso",+ "shotsTitle": "Capturas",+ "sourcesTitle": "Leia o código",+ "sourcesLead": "O código por trás deste recurso, no GitHub.",+ "prev": "Anterior",+ "next": "Próximo",+ "allFeatures": "Todos os recursos",+ "tones": {+ "ours": "Nosso",+ "reused": "Reutilizado",+ "kernel": "Kernel",+ "user": "Você",+ "allow": "Permitido",+ "deny": "Bloqueado"+ },+ "legend": "Legenda",+ "then": "depois",+ "connections": "Conexões",+ "anchorLabel": "Link para esta seção",+ "paper": {+ "metaDescription": "Como o LordOS funciona por dentro: o paper da distribuição GNU/Linux livre baseada no Debian com ambiente de desktop, servidor gráfico e compositor Wayland próprios.",+ "toc": "Conteúdo",+ "pdf": "Baixar PDF",+ "version": "Versão",+ "date": "Data",+ "authors": "Autores",+ "kicker": "Paper"+ },+ "lumoSays": "Lumo conta",+ "legal": {+ "nav": "Jurídico",+ "updated": "Última atualização"+ },+ "faq": {+ "title": "Perguntas frequentes",+ "lead": "Respostas curtas sobre o LordOS, downloads, hardware, privacidade e o projeto.",+ "search": "Buscar nas perguntas",+ "categories": "Categorias",+ "empty": "Nenhuma pergunta corresponde à sua busca.",+ "all": "Todas"+ },+ "navFaq": "FAQ",+ "theme": "Tema",+ "about": {+ "metaTitle": "Sobre · Feito pela IPERFEX · LordOS",+ "metaDescription": "O LordOS é criado e mantido pela IPERFEX, uma empresa de tecnologia da Argentina liderada por Pablo Miranda e Federico Pereira.",+ "kicker": "Sobre",+ "title": "Feito pela IPERFEX",+ "lead": "O LordOS é criado e mantido pela IPERFEX, uma empresa de tecnologia da Argentina, liderada por Pablo Miranda e Federico Pereira.",+ "site": "Visite iperfex.com",+ "linkedin": "IPERFEX no LinkedIn",+ "creatorsTitle": "Os criadores",+ "role": "Cocriador · IPERFEX",+ "linkedinOf": "{name} no LinkedIn",+ "photoOf": "Foto de {name}",+ "initialsOf": "Iniciais de {name}",+ "workTitle": "Trabalhe com a IPERFEX",+ "workLead": "A equipe que constrói o LordOS pode ajudar a sua organização a usá-lo.",+ "work": [+ [+ "Patrocínio",+ "Patrocine o LordOS e ajude a financiar novos recursos, hardware para testes e a infraestrutura de publicação."+ ],+ [+ "Colaborações e parcerias",+ "Trabalhe conosco em projetos conjuntos, integrações ou parcerias de hardware em torno do LordOS."+ ],+ [+ "Apps sob medida para o LordOS",+ "Apps nativos sobre o motor de interface do LordOS, empacotados como .lpk, e integrações com os seus sistemas."+ ],+ [+ "Suporte para empresas",+ "Ajuda com implantações, frotas de Raspberry Pi 5 e imagens do LordOS sob medida para os seus equipamentos."+ ],+ [+ "Treinamento",+ "Treinamento para equipes que implantam, administram ou desenvolvem apps para o LordOS."+ ]+ ],+ "contact": "Contatar a IPERFEX",+ "supportTitle": "Apoie o projeto",+ "supportText": "O LordOS é software livre. Você pode ajudar com uma doação ou acompanhando o projeto.",+ "donate": "Doar",+ "github": "Acompanhe o projeto no GitHub"+ },+ "hero": {+ "pills": [+ "465 MB de RAM em repouso",+ "Inicia em 16 s",+ "Versões assinadas · Ed25519"+ ],+ "alt": "O desktop do LordOS com Calendário, Arquivos, Fotos e Player abertos"+ }+ }+}\ No newline at end of filediff --git a/web/i18n/pt.json b/web/i18n/pt.jsonindex bd059d7..53b6398 100644--- a/web/i18n/pt.json+++ b/web/i18n/pt.json@@ -4,9 +4,9 @@"ogLocale": "pt_BR","meta": {"title": "LordOS — o desktop Linux livre, rápido e seguro",- "description": "LordOS é uma distribuição GNU/Linux livre baseada no Debian com ambiente de desktop, servidor gráfico e compositor Wayland próprios, feitos do zero. Privado por padrão e leve para um Raspberry Pi.",+ "description": "LordOS é uma distribuição GNU/Linux livre baseada no Debian com ambiente de desktop, servidor gráfico e compositor Wayland próprios, construído sobre bases sólidas de Debian e Wayland. Privado por padrão e leve para um Raspberry Pi.","galleryTitle": "Galeria do LordOS — cada tela",- "galleryDescription": "Capturas reais do LordOS, a distribuição GNU/Linux livre baseada no Debian com ambiente de desktop próprio feito do zero. Sem maquetes nem retoques."+ "galleryDescription": "Capturas reais do LordOS, a distribuição GNU/Linux livre baseada no Debian com ambiente de desktop próprio. Sem maquetes nem retoques."},"skip": "Ir para o conteúdo","navLabel": "Principal",@@ -19,7 +19,7 @@"navAbout": "Sobre","badge": "Versão 0.7.0 · Beta","heroTitle": "O desktop Linux livre, rápido e seguro.",- "heroLead": "LordOS é uma distribuição GNU/Linux livre baseada no Debian com ambiente de desktop, servidor gráfico e compositor Wayland próprios, feitos do zero em C, motor de interface próprio e apps nativos pensados para ser calmos, claros e privados.",+ "heroLead": "LordOS é uma distribuição GNU/Linux livre baseada no Debian com ambiente de desktop, servidor gráfico e compositor Wayland próprios, escritos em C, motor de interface próprio e apps nativos pensados para ser calmos, claros e privados.","ctaDownload": "Baixar LordOS","ctaTour": "Fazer o tour","altDesktop": "O desktop do LordOS com o Dock, a barra de menus e a janela Sobre",@@ -27,12 +27,12 @@"featLead": "Um desktop completo com apps nativos, privacidade de fábrica e os apps Linux que você já usa.","features": [[- "Um desktop feito do zero",+ "Um desktop próprio","Servidor gráfico e compositor Wayland próprios em C e motor de interface próprio, sobre uma base Debian sólida. Leve para um Raspberry Pi, fluido num PC moderno."],["Privado por padrão",- "Os apps rodam isolados e pedem permissão antes de usar câmera, microfone, arquivos ou rede. Você decide."+ "Os apps instaláveis do LordOS rodam isolados e pedem permissão antes de usar câmera, microfone, arquivos ou rede. Você decide."],["Um firewall que se vê",@@ -159,7 +159,7 @@"isolatedTitle": "Roda em seu próprio processo isolado","shotOpen": "Abrir captura","metaTitle": "Apps do LordOS — todos os apps nativos",- "metaDescription": "Os apps nativos do LordOS, a distribuição GNU/Linux livre baseada no Debian com ambiente de desktop próprio feito do zero: e-mail, calendário, arquivos, senhas, mídia e mais.",+ "metaDescription": "Os apps nativos do LordOS, a distribuição GNU/Linux livre baseada no Debian com ambiente de desktop próprio: e-mail, calendário, arquivos, senhas, mídia e mais.","teaserKicker": "Apps nativos","teaserTitle": "Apps para tudo o que você faz","teaserText": "E-mail, calendário, arquivos, senhas, fotos, música e mais: apps nativos com a mesma aparência e o mesmo jeito.",diff --git a/web/i18n/team.json b/web/i18n/team.jsonnew file mode 100644index 0000000..dc0d7b4--- /dev/null+++ b/web/i18n/team.json@@ -0,0 +1,8 @@+{+ "_note": "Creators shown on /about/. A linkedin value still in [[PLACEHOLDER]] form hides that button.",+ "people": [+ { "name": "Pablo Miranda", "initials": "PM", "photo": null, "linkedin": "https://www.linkedin.com/in/pablomirandasavina/" },+ { "name": "Federico Pereira", "initials": "FP", "photo": "web/src/team/federico-pereira.jpg", "linkedin": "[[LINKEDIN_FEDERICO]]" }+ ],+ "company": { "linkedin": "https://www.linkedin.com/company/iperfex", "site": "https://www.iperfex.com/?lang={lang}", "contact": "https://www.iperfex.com/contacto/?lang={lang}" }+}diff --git a/web/lib/diagram.mjs b/web/lib/diagram.mjsnew file mode 100644index 0000000..a56faf6--- /dev/null+++ b/web/lib/diagram.mjs@@ -0,0 +1,70 @@+// Diagrams from content JSON, rendered as accessible HTML boxes and arrows (never images of+// text). Two kinds:+// stack: layers drawn top to bottom;+// flow: nodes left to right (top to bottom on a phone), edges in order.+// Each node has a tone (ours, reused, kernel, user, allow, deny) shown by colour AND by a small+// icon with a text label, and the legend lists the tones used.+import { esc } from './md.mjs';++const loc = (v, l) => (v == null ? '' : typeof v === 'string' ? v : v[l] ?? v.en ?? '');++const TONE_ICON = {+ ours: '<path d="M4 17l2-9 4 4 2-6 2 6 4-4 2 9z"/>', // crown+ reused: '<path d="M4 7h16M4 12h16M4 17h16"/>', // stack of parts+ kernel: '<rect x="6" y="6" width="12" height="12" rx="2"/><path d="M9 3v3M15 3v3M9 18v3M15 18v3M3 9h3M3 15h3M18 9h3M18 15h3"/>', // chip+ user: '<circle cx="12" cy="8" r="4"/><path d="M4 21c1-4 4-6 8-6s7 2 8 6"/>', // person+ allow: '<path d="M5 12l5 5 9-10"/>', // check+ deny: '<path d="M6 6l12 12M18 6L6 18"/>', // cross+};+const toneIcon = (tone) => `<svg class="tone-ico" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${TONE_ICON[tone] || TONE_ICON.reused}</svg>`;++let seq = 0;++/**+ * @param {object} d diagram {id, kind, title, nodes[{id,label,sub,tone}], edges[{from,to,label}], caption}+ * @param {string} l language+ * @param {object} t strings: {tones:{ours,…}, legend, then, connections}+ */+export function diagram(d, l, t) {+ const id = `dia-${esc(d.id || ++seq)}`;+ const kind = d.kind === 'stack' ? 'stack' : 'flow';+ const nodes = d.nodes || [];+ const edges = d.edges || [];+ const byId = Object.fromEntries(nodes.map((n) => [n.id, n]));+ const toneName = (tone) => (t.tones && t.tones[tone]) || tone;++ // edges between neighbours are drawn as arrows; the rest are listed under the diagram+ const between = new Map();+ const extra = [];+ for (const e of edges) {+ const a = nodes.findIndex((n) => n.id === e.from), b = nodes.findIndex((n) => n.id === e.to);+ if (a >= 0 && b === a + 1 && !between.has(a)) between.set(a, e);+ else if (a >= 0 && b >= 0) extra.push(e);+ }++ const items = nodes.map((n, i) => {+ const tone = n.tone || 'reused';+ const e = between.get(i);+ const sub = loc(n.sub, l);+ const box = `<div class="dn tone-${esc(tone)}"><span class="dn-tone">${toneIcon(tone)}${esc(toneName(tone))}</span><strong class="dn-label">${esc(loc(n.label, l))}</strong>${sub ? `<span class="dn-sub">${esc(sub)}</span>` : ''}</div>`;+ const arrow = i < nodes.length - 1+ ? `<div class="de${e ? '' : ' de-plain'}"><span class="de-line" aria-hidden="true"></span>${e && loc(e.label, l) ? `<span class="de-label"><span class="vh">${esc(t.then || '→')} </span>${esc(loc(e.label, l))}</span>` : ''}</div>`+ : '';+ return `<li>${box}${arrow}</li>`;+ }).join('');++ const tones = [...new Set(nodes.map((n) => n.tone || 'reused'))];+ const legend = tones.length > 1 || tones[0] !== 'reused'+ ? `<p class="dia-legend"><span class="vh">${esc(t.legend || 'Legend')}: </span>${tones.map((tn) => `<span class="lg tone-${esc(tn)}">${toneIcon(tn)}${esc(toneName(tn))}</span>`).join('')}</p>`+ : '';+ const more = extra.length+ ? `<ul class="dia-edges" aria-label="${esc(t.connections || 'Connections')}">${extra.map((e) => `<li><strong>${esc(loc(byId[e.from].label, l))}</strong> <span aria-hidden="true">→</span><span class="vh">${esc(t.then || 'to')}</span> <strong>${esc(loc(byId[e.to].label, l))}</strong>${loc(e.label, l) ? `: ${esc(loc(e.label, l))}` : ''}</li>`).join('')}</ul>`+ : '';+ const title = loc(d.title, l);+ const caption = loc(d.caption, l);+ return `<figure class="dia dia-${kind}" id="${id}"${title ? ` aria-labelledby="${id}-t"` : ''}>+${title ? `<p class="dia-title" id="${id}-t">${esc(title)}</p>` : ''}+<ol class="dia-nodes">${items}</ol>+${more}${legend}${caption ? `<figcaption class="dia-cap">${esc(caption)}</figcaption>` : ''}+</figure>`;+}diff --git a/web/lib/md.mjs b/web/lib/md.mjsnew file mode 100644index 0000000..3cbc621--- /dev/null+++ b/web/lib/md.mjs@@ -0,0 +1,132 @@+// Small Markdown renderer for the site's content (no dependencies). Supports what the content+// uses and escapes everything else:+// front matter (--- key: value ---), # headings (with ids), paragraphs, - / 1. lists (nested by+// indentation), > blockquotes, ``` fenced code, | tables |, ---, **bold**, *italic*, `code`,+// [links](url),  and block directives on their own line:+// [[diagram:<id>]] [[shot:<n>]]+// Raw HTML is never passed through.++export const esc = (s) => String(s).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');++export function slugify(s) {+ return s.toLowerCase().normalize('NFD').replace(/[̀-ͯ]/g, '').replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '') || 'section';+}++export function frontMatter(src) {+ const m = src.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/);+ if (!m) return { data: {}, body: src };+ const data = {};+ for (const line of m[1].split(/\r?\n/)) {+ const kv = line.match(/^([\w-]+):\s*(.*)$/);+ if (kv) data[kv[1]] = kv[2].replace(/^["']|["']$/g, '');+ }+ return { data, body: src.slice(m[0].length) };+}++// inline: code spans first (verbatim), then images, links, bold, italic+export function inline(text, opts = {}) {+ const codes = [];+ let s = text.replace(/`([^`]+)`/g, (_, c) => { codes.push(`<code>${esc(c)}</code>`); return `\u0000${codes.length - 1}\u0000`; });+ s = esc(s);+ s = s.replace(/!\[([^\]]*)\]\(([^)\s]+)(?:\s+"([^&]*)")?\)/g, (_, alt, url, title) =>+ opts.image ? opts.image(url, alt, title) : `<img src="${url}" alt="${alt}">`);+ s = s.replace(/\[([^\]]+)\]\(([^)\s]+)\)/g, (_, label, url) => {+ const href = opts.link ? opts.link(url) : url;+ if (!/^(https?:|mailto:|\/|#|\.)/.test(href)) return label; // no javascript: or other schemes+ const ext = /^https?:/.test(href) ? ' rel="noopener"' : '';+ return `<a href="${href}"${ext}>${label}</a>`;+ });+ s = s.replace(/\*\*([^*]+)\*\*/g, '<strong>$1</strong>').replace(/(^|[^\w*])\*([^*\n]+)\*(?!\w)/g, '$1<em>$2</em>')+ .replace(/(^|[^\w])_([^_\n]+)_(?!\w)/g, '$1<em>$2</em>');+ return s.replace(/\u0000(\d+)\u0000/g, (_, i) => codes[+i]);+}++const isTableSep = (l) => /^\s*\|?\s*:?-{2,}:?\s*(\|\s*:?-{2,}:?\s*)*\|?\s*$/.test(l);+const cells = (l) => l.trim().replace(/^\|/, '').replace(/\|$/, '').split('|').map((c) => c.trim());++// Returns { html, headings: [{level, id, text}] }+export function markdown(src, opts = {}) {+ const lines = src.replace(/\r\n/g, '\n').split('\n');+ const out = [];+ const headings = [];+ const used = new Set();+ const block = opts.block || (() => '');+ let i = 0;+ const para = [];+ const flush = () => { if (para.length) { out.push(`<p>${inline(para.join(' '), opts)}</p>`); para.length = 0; } };++ const list = (start) => {+ // collects a (possibly nested) list starting at line `start`; returns [html, nextLine]+ const ind = (l) => l.match(/^(\s*)/)[1].length;+ const base = ind(lines[start]);+ const ordered = /^\s*\d+[.)]\s/.test(lines[start]);+ const items = [];+ let j = start;+ while (j < lines.length) {+ const l = lines[j];+ if (!l.trim()) { if (j + 1 < lines.length && /^\s*([-*+]|\d+[.)])\s/.test(lines[j + 1]) && ind(lines[j + 1]) >= base) { j++; continue; } break; }+ const m = l.match(/^(\s*)([-*+]|\d+[.)])\s+(.*)$/);+ if (m && m[1].length === base) { items.push({ text: m[3], sub: '' }); j++; continue; }+ if (m && m[1].length > base && items.length) { const [h, n] = list(j); items[items.length - 1].sub += h; j = n; continue; }+ if (!m && ind(l) > base && items.length) { items[items.length - 1].text += ' ' + l.trim(); j++; continue; }+ break;+ }+ const tag = ordered ? 'ol' : 'ul';+ return [`<${tag}>${items.map((it) => `<li>${inline(it.text, opts)}${it.sub}</li>`).join('')}</${tag}>`, j];+ };++ while (i < lines.length) {+ const line = lines[i];+ const t = line.trim();+ if (!t) { flush(); i++; continue; }+ let m;+ if ((m = t.match(/^(?:\[\[|\{\{)\s*([\w-]+)(?::([\w./-]+))?\s*(?:\]\]|\}\})$/))) { flush(); out.push(block(m[1], m[2])); i++; continue; }+ if ((m = t.match(/^```\s*([\w-]*)/))) {+ flush();+ const lang = m[1];+ const buf = [];+ i++;+ while (i < lines.length && !lines[i].trim().startsWith('```')) buf.push(lines[i++]);+ i++;+ out.push(`<pre class="code"${lang ? ` data-lang="${esc(lang)}"` : ''}><code>${esc(buf.join('\n'))}</code></pre>`);+ continue;+ }+ if ((m = t.match(/^(#{1,6})\s+(.*?)\s*#*$/))) {+ flush();+ const level = m[1].length;+ const text = m[2];+ let id = slugify(text.replace(/[`*_]/g, ''));+ while (used.has(id)) id += '-2';+ used.add(id);+ headings.push({ level, id, text: text.replace(/[`*_]/g, '') });+ const anchor = level >= 2 && level <= 3 ? `<a class="anchor" href="#${id}" aria-label="${esc(opts.anchorLabel || 'Link to this section')}">#</a>` : '';+ out.push(`<h${level} id="${id}">${inline(text, opts)}${anchor}</h${level}>`);+ i++;+ continue;+ }+ if (/^(-{3,}|\*{3,})$/.test(t)) { flush(); out.push('<hr>'); i++; continue; }+ if (t.startsWith('>')) {+ flush();+ const buf = [];+ while (i < lines.length && lines[i].trim().startsWith('>')) buf.push(lines[i++].trim().replace(/^>\s?/, ''));+ out.push(`<blockquote>${markdown(buf.join('\n'), { ...opts, block: () => '' }).html}</blockquote>`);+ continue;+ }+ if (t.includes('|') && i + 1 < lines.length && isTableSep(lines[i + 1])) {+ flush();+ const head = cells(line);+ const align = cells(lines[i + 1]).map((c) => (c.startsWith(':') && c.endsWith(':') ? 'center' : c.endsWith(':') ? 'right' : ''));+ i += 2;+ const rows = [];+ while (i < lines.length && lines[i].includes('|') && lines[i].trim()) rows.push(cells(lines[i++]));+ const td = (tag, c, k) => `<${tag}${align[k] ? ` style="text-align:${align[k]}"` : ''}>${inline(c, opts)}</${tag}>`;+ out.push(`<div class="table"><table><thead><tr>${head.map((c, k) => td('th', c, k)).join('')}</tr></thead><tbody>${rows.map((r) => `<tr>${r.map((c, k) => td('td', c, k)).join('')}</tr>`).join('')}</tbody></table></div>`);+ continue;+ }+ if (/^\s*([-*+]|\d+[.)])\s+/.test(line)) { flush(); const [h, n] = list(i); out.push(h); i = n; continue; }+ para.push(t);+ i++;+ }+ flush();+ return { html: out.join('\n'), headings };+}diff --git a/web/src/about.html b/web/src/about.htmlnew file mode 100644index 0000000..b235f5f--- /dev/null+++ b/web/src/about.html@@ -0,0 +1,57 @@+<!doctype html>+<html lang="{{t.lang}}">+<head>+{{{head}}}+</head>+<body data-page="about" data-lang="{{t.lang}}">+<a class="skip" href="#main">{{t.skip}}</a>+{{{header}}}++<main id="main">+<section class="wrap ab-hero" aria-labelledby="ab-h">+<p class="kicker">{{t.pages.about.kicker}}</p>+<h1 id="ab-h">{{t.pages.about.title}}</h1>+<p class="lead">{{t.pages.about.lead}}</p>+<div class="ctas">+<a class="btn btn-primary" href="{{{siteUrl}}}" rel="noopener">{{t.pages.about.site}}</a>+<a class="btn btn-ghost" href="{{{companyLinkedin}}}" rel="noopener">{{{liIcon}}}{{t.pages.about.linkedin}}</a>+</div>+</section>++<section class="wrap ab-sec" aria-labelledby="cr-h">+<h2 id="cr-h" class="h2s center">{{t.pages.about.creatorsTitle}}</h2>+<div class="creators">+{{{people}}}+</div>+</section>++<section class="ab-work" aria-labelledby="wk-h">+<div class="wrap">+<div class="wk-head">+<img src="{{{lumoWave}}}" alt="" width="96" height="96" loading="lazy">+<div>+<h2 id="wk-h" class="h2s">{{t.pages.about.workTitle}}</h2>+<p class="sub">{{t.pages.about.workLead}}</p>+</div>+</div>+<div class="grid-feat">+{{{work}}}+</div>+<p class="center wk-cta"><a class="btn btn-primary" href="{{{contactUrl}}}" rel="noopener">{{t.pages.about.contact}}</a></p>+</div>+</section>++<section class="wrap ab-sec ab-support" aria-labelledby="sp-h">+<h2 id="sp-h" class="h2s">{{t.pages.about.supportTitle}}</h2>+<p class="sub">{{t.pages.about.supportText}}</p>+<div class="ctas">+<a class="btn btn-primary" href="{{{supportUrl}}}">{{t.pages.about.donate}}</a>+<a class="btn btn-ghost" href="https://github.com/lordbasex/LordOS" rel="noopener">{{t.pages.about.github}}</a>+</div>+</section>+</main>++{{{footer}}}+<script src="{{{js}}}" defer></script>+</body>+</html>diff --git a/web/src/doc.css b/web/src/doc.cssnew file mode 100644index 0000000..c1f4116--- /dev/null+++ b/web/src/doc.css@@ -0,0 +1,171 @@+/* lordos.org long-form pages: prose, diagrams, feature pages, paper, legal and FAQ. Loaded in+ addition to site.css on those pages only. */+/* prose (feature pages and paper) */+.prose{font-size:17px;line-height:1.7;color:var(--ink-2);min-width:0}+.prose h2{margin:56px 0 12px;font-size:clamp(24px,3vw,32px);line-height:1.2;letter-spacing:-.02em;color:var(--ink);font-weight:800;scroll-margin-top:90px}+.prose h3{margin:32px 0 8px;font-size:20px;line-height:1.3;color:var(--ink);font-weight:700;scroll-margin-top:90px}+.prose h4{margin:24px 0 6px;font-size:17px;color:var(--ink)}+.prose p,.prose ul,.prose ol{margin:0 0 16px}+.prose ul,.prose ol{padding-left:22px}+.prose li{margin:4px 0}+.prose li::marker{color:var(--brand)}+.prose a{font-weight:600}+.prose strong{color:var(--ink)}+.prose code{font:600 .88em/1.4 var(--mono);background:var(--code-bg);color:var(--code-fg);padding:2px 6px;border-radius:6px;overflow-wrap:anywhere}+.prose blockquote{margin:24px 0;padding:14px 20px;border-left:4px solid var(--accent);background:var(--brand-soft);border-radius:0 12px 12px 0;color:var(--ink)}+.prose blockquote p:last-child{margin:0}+.prose hr{border:0;border-top:1px solid var(--line);margin:40px 0}+.prose .anchor{margin-left:8px;color:var(--subtle);text-decoration:none;font-weight:600;opacity:0;transition:opacity .15s}+.prose h2:hover .anchor,.prose h3:hover .anchor,.prose .anchor:focus{opacity:1}+.code{position:relative;margin:20px 0;padding:18px 20px;border-radius:14px;background:#0F0E22;border:1px solid #2F2C55;color:#E3E0FF;font:500 14px/1.65 var(--mono);overflow-x:auto;white-space:pre;tab-size:2}+.code code{background:none;color:inherit;padding:0;font:inherit}+.code[data-lang]::before{content:attr(data-lang);position:absolute;top:8px;right:12px;font:700 11px/1 var(--ff);letter-spacing:.06em;text-transform:uppercase;color:#A9A5CF}+.table{overflow-x:auto;margin:20px 0;border:1px solid var(--line);border-radius:12px}+.table table{border-collapse:collapse;width:100%;font-size:15px;line-height:1.5}+.table th,.table td{padding:10px 14px;text-align:left;border-bottom:1px solid var(--line);vertical-align:top}+.table th{background:var(--chip);color:var(--ink);font-weight:700}+.table tr:last-child td{border-bottom:0}+.prose .shot-fig{margin:28px 0}+.prose .shot-fig figcaption,.shots figcaption{margin-top:10px;font-size:14px;color:var(--subtle);text-align:center}++/* diagrams */+.dia{margin:32px 0;padding:22px;border:1px solid var(--line);border-radius:18px;background:var(--surface);font-size:15px;line-height:1.45}+.dia-title{margin:0 0 16px;font-weight:800;font-size:16px;color:var(--ink)}+.dia-nodes{list-style:none;margin:0;padding:0;display:flex;gap:0}+.dia-nodes>li{display:flex;align-items:stretch;min-width:0}+.dia-flow .dia-nodes{flex-direction:row;flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px}+.dia-flow .dia-nodes>li{flex:1 1 0;flex-direction:row;min-width:150px}+.dia-stack .dia-nodes{flex-direction:column}+.dia-stack .dia-nodes>li{flex-direction:column}+.dn{flex:1 1 auto;display:flex;flex-direction:column;gap:4px;padding:12px 14px;border-radius:12px;border:2px solid var(--t-reused-bd);background:var(--t-reused-bg);color:var(--t-reused-fg);min-width:0}+.dn-tone{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;opacity:.9}+.dn-label{font-size:15.5px;font-weight:700;overflow-wrap:anywhere;color:inherit!important}+.dn-sub{font-size:13.5px;opacity:.92;overflow-wrap:anywhere}+.tone-ours{--tbg:var(--t-ours-bg);--tbd:var(--t-ours-bd);--tfg:var(--t-ours-fg)}+.tone-reused{--tbg:var(--t-reused-bg);--tbd:var(--t-reused-bd);--tfg:var(--t-reused-fg)}+.tone-kernel{--tbg:var(--t-kernel-bg);--tbd:var(--t-kernel-bd);--tfg:var(--t-kernel-fg)}+.tone-user{--tbg:var(--t-user-bg);--tbd:var(--t-user-bd);--tfg:var(--t-user-fg)}+.tone-allow{--tbg:var(--t-allow-bg);--tbd:var(--t-allow-bd);--tfg:var(--t-allow-fg)}+.tone-deny{--tbg:var(--t-deny-bg);--tbd:var(--t-deny-bd);--tfg:var(--t-deny-fg)}+.dn[class*=tone-]{background:var(--tbg);border-color:var(--tbd);color:var(--tfg)}+.tone-user.dn{border-style:dashed}+.de{flex:0 0 auto;display:flex;align-items:center;justify-content:center;position:relative;color:var(--subtle);font-size:12.5px;font-weight:600;text-align:center}+.de-line{position:relative;display:block;background:currentColor}+.de-line::after{content:"";position:absolute;border:6px solid transparent}+.dia-flow .de{flex-direction:column;width:76px;padding:0 6px;gap:4px}+.dia-flow .de-line{width:100%;height:2px}+.dia-flow .de-line::after{right:-2px;top:-5px;border-left:9px solid currentColor;border-right:0}+.dia-stack .de{flex-direction:row;min-height:34px;padding:4px 0;gap:10px}+.dia-stack .de-line{width:2px;height:26px}+.dia-stack .de-line::after{bottom:-2px;left:-5px;border-top:9px solid currentColor;border-bottom:0}+.de-plain{min-height:12px}+.dia-stack .de-plain .de-line{height:12px}+.de-label{max-width:16ch}+.dia-stack .de-label{max-width:none}+.dia-edges{margin:16px 0 0;padding-left:20px;color:var(--muted);font-size:14px}+.dia-legend{margin:16px 0 0;display:flex;flex-wrap:wrap;gap:8px}+.lg{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;border:1.5px solid var(--tbd);background:var(--tbg);color:var(--tfg);font-size:12.5px;font-weight:700}+.dia-cap{margin-top:12px;font-size:14px;color:var(--subtle)}++/* feature page */+.fhero{display:flex;flex-wrap:wrap;gap:28px 48px;align-items:center;padding-top:56px;padding-bottom:24px}+.fhero-lumo{flex:0 0 auto;width:min(300px,70vw);height:auto;margin:0 auto}+.fhero-txt{flex:1 1 420px;min-width:0}+.fhero h1{margin:0;font-size:clamp(36px,5vw,60px);line-height:1.05;letter-spacing:-.03em;font-weight:800}+.ftag{margin:12px 0 0;font-size:19px;color:var(--muted);line-height:1.5}+.bubble{position:relative;margin:24px 0 0;padding:20px 24px;border-radius:22px;background:var(--bubble);border:1.5px solid var(--chip-line);box-shadow:0 14px 40px var(--shadow-2);font-size:17px;line-height:1.6;color:var(--ink-2)}+.bubble::before{content:"";position:absolute;left:-12px;top:34px;width:22px;height:22px;background:var(--bubble);border-left:1.5px solid var(--chip-line);border-bottom:1.5px solid var(--chip-line);transform:rotate(45deg)}+.bubble p{margin:0}+.fbody{display:grid;grid-template-columns:minmax(0,1fr);max-width:860px;padding-bottom:40px}+.shots{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:20px;margin:24px 0 40px}+.shots figure{margin:0}+.sources{margin:8px 0 0;padding:0;list-style:none;display:grid;gap:10px}+.sources li{display:flex;flex-wrap:wrap;gap:4px 12px;align-items:baseline;padding:12px 16px;border:1px solid var(--line-2);border-radius:12px;background:var(--surface)}+.sources a{font:600 14px/1.4 var(--mono);overflow-wrap:anywhere}+.sources span{color:var(--muted);font-size:15px}+.pn{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:48px 0 0;padding:0;list-style:none}+.pn a{display:flex;flex-direction:column;gap:4px;height:100%;padding:16px 18px;border:1px solid var(--line-2);border-radius:14px;background:var(--surface);text-decoration:none;color:var(--ink)}+.pn a:hover{border-color:var(--accent)}+.pn small{color:var(--subtle);font-weight:600;font-size:13px}+.pn strong{font-size:16px}+.pn .next{text-align:right;grid-column:2}++/* paper */+.paper-head{padding-top:56px;padding-bottom:8px;max-width:1100px}+.paper-head h1{margin:0;font-size:clamp(34px,5vw,56px);line-height:1.08;letter-spacing:-.03em;font-weight:800}+.paper-sub{margin:12px 0 0;font-size:20px;color:var(--muted);line-height:1.5;max-width:760px}+.paper-meta{margin:18px 0 0;display:flex;flex-wrap:wrap;gap:8px 20px;color:var(--subtle);font-size:15px}+.paper-meta strong{color:var(--ink-2)}+.paper-actions{margin-top:20px;display:flex;flex-wrap:wrap;gap:12px}+.paper{display:grid;grid-template-columns:260px minmax(0,760px);gap:56px;align-items:start;padding-bottom:64px;max-width:1100px}+.toc{position:sticky;top:90px;max-height:calc(100vh - 110px);overflow:auto;font-size:14px;padding:4px 4px 4px 0}+.toc-t{margin:0 0 10px;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--subtle)}+.toc ol{list-style:none;margin:0;padding:0}+.toc ol ol{padding-left:14px}+.toc a{display:block;padding:5px 10px;border-left:2px solid var(--line);color:var(--ink-2);text-decoration:none;line-height:1.35}+.toc a:hover,.toc a[aria-current]{color:var(--brand);border-left-color:var(--accent)}+.toc-m{display:none}+@media (max-width:960px){+ .paper{grid-template-columns:minmax(0,1fr);gap:0}+ .toc{display:none}+ .toc-m{display:block;margin:8px 0 24px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}+ .toc-m summary{cursor:pointer;padding:14px 16px;font-weight:700;min-height:48px;list-style-position:inside}+ .toc-m nav{padding:0 12px 12px}+ .toc-m .toc{display:block;position:static;max-height:none}+}+@media (max-width:640px){+ .dia{padding:16px}+ .dia-flow .dia-nodes{flex-direction:column;overflow:visible}+ .dia-flow .dia-nodes>li{flex-direction:column;min-width:0}+ .dia-flow .de{flex-direction:row;width:auto;min-height:34px;padding:4px 0;gap:10px}+ .dia-flow .de-line{width:2px;height:26px}+ .dia-flow .de-line::after{right:auto;top:auto;bottom:-2px;left:-5px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:9px solid currentColor;border-bottom:0}+ .dia-flow .de-label{max-width:none}+ .bubble::before{left:40px;top:-12px;border-left:1.5px solid var(--chip-line);border-bottom:0;border-top:1.5px solid var(--chip-line)}+ .pn{grid-template-columns:1fr}.pn .next{grid-column:1}+ .fhero-lumo{width:200px}+}+@media print{+ :root{color-scheme:light}+ .top,.foot,.toc,.toc-m,.paper-actions,.skip,.lbar,.lb,.anchor{display:none!important}+ body{background:#fff;color:#000;font-size:11pt}+ .paper{display:block;padding:0}+ .prose{font-size:11pt;color:#111}+ .prose h2{break-after:avoid;margin-top:28pt}+ .dia,.code,.table,figure{break-inside:avoid}+ .code{background:#f5f4fb;color:#111;border-color:#ddd}+ .code[data-lang]::before{color:#555}+ a{color:#3F2AB0}+}+++/* legal pages */+.legal{display:grid;grid-template-columns:240px minmax(0,760px);gap:56px;align-items:start;padding-top:56px;padding-bottom:72px;max-width:1100px}+.legal-nav{position:sticky;top:90px;font-size:15px}+.legal-nav ul{list-style:none;margin:0;padding:0}+.legal-nav a{display:block;padding:7px 12px;border-left:2px solid var(--line);color:var(--ink-2);text-decoration:none}+.legal-nav a:hover,.legal-nav a[aria-current]{color:var(--brand);border-left-color:var(--accent);font-weight:700}+.legal-main{min-width:0}+.legal-main h1{margin:0;font-size:clamp(32px,4.5vw,48px);line-height:1.1;letter-spacing:-.02em;font-weight:800}+.legal-upd{margin:10px 0 8px;color:var(--subtle);font-size:15px}+.legal-main .prose h2:first-child{margin-top:32px}+mark.ph{background:#FFE58A;color:#3A2A00;padding:1px 6px;border-radius:6px;font-weight:700;outline:2px dashed #C26A00}+@media (max-width:860px){.legal{grid-template-columns:minmax(0,1fr);gap:24px}.legal-nav{position:static;order:2;border-top:1px solid var(--line);padding-top:20px}}++/* FAQ */+.faq-tools{margin-top:28px;display:flex;flex-direction:column;gap:16px}+.faq-search{display:none;align-items:center;gap:10px;max-width:560px;min-height:52px;padding:0 16px;border-radius:14px;background:var(--surface);box-shadow:inset 0 0 0 1.5px var(--chip-line);color:var(--subtle)}+.jt .faq-search{display:flex}+.faq-search:focus-within{outline:3px solid var(--focus);outline-offset:2px}+.faq-search input{flex:1;min-width:0;border:0;outline:0;background:transparent;color:var(--ink);font:500 17px var(--ff)}+.g-cats a.g-chip{text-decoration:none}+.faq-sec{margin-top:40px;max-width:860px;scroll-margin-top:90px}+.faq-sec[hidden],.faq details[hidden]{display:none}+.faq-sec h2{margin:0 0 14px;font-size:clamp(22px,2.6vw,28px);font-weight:800;letter-spacing:-.01em}+.faq details{border:1px solid var(--line-2);border-radius:14px;background:var(--surface);margin:0 0 10px;scroll-margin-top:90px}+.faq summary{cursor:pointer;padding:16px 20px;font-weight:700;font-size:17px;list-style:none;display:flex;gap:12px;align-items:flex-start;min-height:48px}+.faq summary::-webkit-details-marker{display:none}+.faq summary::before{content:"+";flex:0 0 auto;width:22px;color:var(--brand);font-weight:800}+.faq details[open] summary::before{content:"−"}+.faq details .prose{padding:0 20px 8px 54px;font-size:16px}+@media (max-width:640px){.faq details .prose{padding-left:20px}}diff --git a/web/src/faq.html b/web/src/faq.htmlnew file mode 100644index 0000000..8abfdd1--- /dev/null+++ b/web/src/faq.html@@ -0,0 +1,28 @@+<!doctype html>+<html lang="{{t.lang}}">+<head>+{{{head}}}+{{{jsonld}}}+</head>+<body data-page="faq" data-lang="{{t.lang}}">+<a class="skip" href="#main">{{t.skip}}</a>+{{{header}}}++<main id="main" class="wrap g-main faq">+<p class="kicker">FAQ</p>+<h1>{{t.pages.faq.title}}</h1>+<p class="g-lead">{{t.pages.faq.lead}}</p>+<div class="faq-tools">+<label class="faq-search"><span class="vh">{{t.pages.faq.search}}</span><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="M20 20l-4-4"/></svg><input type="search" id="faq-q" placeholder="{{t.pages.faq.search}}" autocomplete="off"></label>+<nav class="g-cats" aria-label="{{t.pages.faq.categories}}">+{{{chips}}}+</nav>+</div>+<p class="g-empty" id="faq-empty" hidden>{{t.pages.faq.empty}}</p>+{{{sections}}}+</main>++{{{footer}}}+<script src="{{{js}}}" defer></script>+</body>+</html>diff --git a/web/src/feature.html b/web/src/feature.htmlnew file mode 100644index 0000000..2f141bf--- /dev/null+++ b/web/src/feature.html@@ -0,0 +1,45 @@+<!doctype html>+<html lang="{{t.lang}}">+<head>+{{{head}}}+</head>+<body data-page="feature" data-lang="{{t.lang}}">+<a class="skip" href="#main">{{t.skip}}</a>+{{{header}}}++<main id="main">+<section class="wrap fhero" aria-labelledby="f-title">+<img class="fhero-lumo" src="{{{lumo}}}" alt="" width="300" height="300">+<div class="fhero-txt">+<p class="kicker">{{t.pages.featuresKicker}}</p>+<h1 id="f-title">{{{title}}}</h1>+<p class="ftag">{{{tagline}}}</p>+<blockquote class="bubble" aria-label="{{t.pages.lumoSays}}"><p>{{{intro}}}</p></blockquote>+</div>+</section>++<div class="wrap fbody">+<article class="prose">+{{{body}}}+</article>+{{{shots}}}+<section aria-labelledby="src-h" class="prose">+<h2 id="src-h">{{t.pages.sourcesTitle}}</h2>+<p>{{t.pages.sourcesLead}}</p>+<ul class="sources">+{{{sources}}}+</ul>+</section>+<nav aria-label="{{t.pages.allFeatures}}">+<ul class="pn">+{{{prevnext}}}+</ul>+</nav>+</div>+</main>++{{{lightbox}}}+{{{footer}}}+<script src="{{{js}}}" defer></script>+</body>+</html>diff --git a/web/src/home.html b/web/src/home.htmlindex 99a1b87..ca81244 100644--- a/web/src/home.html+++ b/web/src/home.html@@ -106,27 +106,6 @@</div></section>-<section id="about" class="about" aria-labelledby="about-h">-<div class="wrap">-<div class="center">-<h2 id="about-h" class="h2s">{{t.aboutTitle}}</h2>-<p class="sub">{{t.aboutLead}}</p>-</div>-<div class="team">-<article class="person">-<div class="avatar initials" role="img" aria-label="{{t.initialsOf}} Pablo Miranda">PM</div>-<h3>Pablo Miranda</h3>-<p>{{t.role}} · IPERFEX</p>-</article>-<article class="person">-<img class="avatar" src="{{{img.federico}}}" alt="{{t.photoOf}} Federico Pereira" width="120" height="120" loading="lazy">-<h3>Federico Pereira</h3>-<p>{{t.role}} · IPERFEX</p>-</article>-</div>-<p class="gh"><a class="btn btn-ghost" href="https://github.com/lordbasex/LordOS">{{t.aboutGithub}}</a></p>-</div>-</section></main>{{{footer}}}diff --git a/web/src/legal.html b/web/src/legal.htmlnew file mode 100644index 0000000..6f20f21--- /dev/null+++ b/web/src/legal.html@@ -0,0 +1,29 @@+<!doctype html>+<html lang="{{t.lang}}">+<head>+{{{head}}}+</head>+<body data-page="legal" data-lang="{{t.lang}}">+<a class="skip" href="#main">{{t.skip}}</a>+{{{header}}}++<div class="wrap legal">+<nav class="legal-nav" aria-label="{{t.pages.legal.nav}}">+<p class="toc-t">{{t.pages.legal.nav}}</p>+<ul>+{{{nav}}}+</ul>+</nav>+<main id="main" class="legal-main">+<h1>{{{title}}}</h1>+<p class="legal-upd">{{t.pages.legal.updated}}: <time datetime="{{{updatedIso}}}">{{{updated}}}</time></p>+<article class="prose">+{{{body}}}+</article>+</main>+</div>++{{{footer}}}+<script src="{{{js}}}" defer></script>+</body>+</html>diff --git a/web/src/paper.html b/web/src/paper.htmlnew file mode 100644index 0000000..2d75263--- /dev/null+++ b/web/src/paper.html@@ -0,0 +1,39 @@+<!doctype html>+<html lang="{{t.lang}}">+<head>+{{{head}}}+</head>+<body data-page="paper" data-lang="{{t.lang}}">+<a class="skip" href="#main">{{t.skip}}</a>+{{{header}}}++<main id="main">+<header class="wrap paper-head">+<p class="kicker">{{t.pages.paper.kicker}}</p>+<h1>{{{title}}}</h1>+<p class="paper-sub">{{{subtitle}}}</p>+<p class="paper-meta">{{{meta}}}</p>+<p class="paper-actions">{{{pdf}}}</p>+</header>+<div class="wrap paper">+<nav class="toc" aria-label="{{t.pages.paper.toc}}">+<p class="toc-t">{{t.pages.paper.toc}}</p>+{{{toc}}}+</nav>+<div>+<details class="toc-m">+<summary>{{t.pages.paper.toc}}</summary>+<nav class="toc" aria-label="{{t.pages.paper.toc}}">{{{toc}}}</nav>+</details>+<article class="prose">+{{{body}}}+</article>+</div>+</div>+</main>++{{{lightbox}}}+{{{footer}}}+<script src="{{{js}}}" defer></script>+</body>+</html>diff --git a/web/src/site.css b/web/src/site.cssindex dd48917..207b0cf 100644--- a/web/src/site.css+++ b/web/src/site.css@@ -6,6 +6,8 @@@font-face{font-family:"Plus Jakarta Sans";src:url(__FONT_EXTRABOLD__) format("woff2");font-weight:700 800;font-style:normal;font-display:swap}:root{+ --mono:ui-monospace,Menlo,Consolas,monospace;+ --ff:"Plus Jakarta Sans",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;color-scheme:light;--bg:#FBFAFF;--surface:#FFFFFF;--surface-2:#FBFAFF;--chip:#F1EFF8;--header:rgba(251,250,255,.88);--ink:#12122A;--ink-2:#3B3A55;--muted:#4C4B66;--subtle:#6B6985;@@ -16,6 +18,13 @@--shot-bg:#E9E6F7;--shadow:rgba(40,20,120,.28);--shadow-2:rgba(40,20,120,.12);--sup-a:#F3EFFF;--sup-b:#FFFFFF;--ring:#B9AEF0;--focus:#C26A00;+ --t-ours-bg:#EEEAFF;--t-ours-bd:#7C5CFF;--t-ours-fg:#3A25B0;+ --t-reused-bg:#F1EFF8;--t-reused-bd:#C9C3E6;--t-reused-fg:#3B3A55;+ --t-kernel-bg:#1D1C3A;--t-kernel-bd:#1D1C3A;--t-kernel-fg:#F4F2FF;+ --t-user-bg:#FFFFFF;--t-user-bd:#9C97C4;--t-user-fg:#12122A;+ --t-allow-bg:#E7F6EC;--t-allow-bd:#1E9E55;--t-allow-fg:#11663A;+ --t-deny-bg:#FDECEC;--t-deny-bd:#D93A3A;--t-deny-fg:#A3201F;+ --code-bg:#F4F2FB;--code-fg:#2A2950;--bubble:#FFFFFF;/* always-dark bands: download section and footer */--night:#12122A;--night-card:#1D1C3A;--night-line:#2F2C55;--night-text:#C9C6E6;--night-note:#A9A5CF;--night-link:#B9A8FF;--cta-dark:#6E4BFF;}@@ -31,6 +40,13 @@--shot-bg:#1B1A36;--shadow:rgba(0,0,0,.5);--shadow-2:rgba(0,0,0,.3);--sup-a:#1E1B40;--sup-b:#151430;--ring:#4A3F99;--focus:#FFB800;+ --t-ours-bg:#2A2457;--t-ours-bd:#8F75FF;--t-ours-fg:#DCD3FF;+ --t-reused-bg:#22213F;--t-reused-bd:#3A3766;--t-reused-fg:#D6D3F0;+ --t-kernel-bg:#07070F;--t-kernel-bd:#3A3766;--t-kernel-fg:#F4F2FF;+ --t-user-bg:#2D2B52;--t-user-bd:#6D68A8;--t-user-fg:#F4F2FF;+ --t-allow-bg:#12301F;--t-allow-bd:#30D158;--t-allow-fg:#9BF0B6;+ --t-deny-bg:#3A1418;--t-deny-bd:#FF6B6B;--t-deny-fg:#FFC0C0;+ --code-bg:#151430;--code-fg:#E3E0FF;--bubble:#1B1A36;}}:root[data-theme=dark]{@@ -44,11 +60,18 @@--shot-bg:#1B1A36;--shadow:rgba(0,0,0,.5);--shadow-2:rgba(0,0,0,.3);--sup-a:#1E1B40;--sup-b:#151430;--ring:#4A3F99;--focus:#FFB800;+ --t-ours-bg:#2A2457;--t-ours-bd:#8F75FF;--t-ours-fg:#DCD3FF;+ --t-reused-bg:#22213F;--t-reused-bd:#3A3766;--t-reused-fg:#D6D3F0;+ --t-kernel-bg:#07070F;--t-kernel-bd:#3A3766;--t-kernel-fg:#F4F2FF;+ --t-user-bg:#2D2B52;--t-user-bd:#6D68A8;--t-user-fg:#F4F2FF;+ --t-allow-bg:#12301F;--t-allow-bd:#30D158;--t-allow-fg:#9BF0B6;+ --t-deny-bg:#3A1418;--t-deny-bd:#FF6B6B;--t-deny-fg:#FFC0C0;+ --code-bg:#151430;--code-fg:#E3E0FF;--bubble:#1B1A36;}*,*::before,*::after{box-sizing:border-box}html{-webkit-text-size-adjust:100%;scroll-padding-top:84px;background:var(--bg)}-body{margin:0;background:var(--bg);color:var(--ink);font-family:"Plus Jakarta Sans",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;line-height:1.5;overflow-x:hidden}+body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--ff);line-height:1.5;overflow-x:hidden}img,svg{max-width:100%}a{color:var(--brand)}a:hover{color:var(--brand-hover)}h1,h2,h3{text-wrap:balance}@@ -77,7 +100,7 @@ h1,h2,h3{text-wrap:balance}.nav-links [aria-current]{color:var(--ink);box-shadow:inset 0 -2px 0 var(--accent)}.tools{display:flex;gap:6px;align-items:center}.langs{display:flex;gap:4px}-.lang,.theme-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;min-width:44px;padding:0 10px;border-radius:10px;font:700 13px/1 "Plus Jakarta Sans",system-ui,sans-serif;text-decoration:none;border:1.5px solid var(--chip-line);color:var(--ink-2);background:transparent;cursor:pointer}+.lang,.theme-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;min-width:44px;padding:0 10px;border-radius:10px;font:700 13px/1 var(--ff);text-decoration:none;border:1.5px solid var(--chip-line);color:var(--ink-2);background:transparent;cursor:pointer}.lang:hover,.theme-btn:hover{color:var(--brand)}.lang[aria-current]{border-color:var(--inv-bg);background:var(--inv-bg);color:var(--inv-ink)}.theme-btn{display:none}@@ -85,7 +108,7 @@ h1,h2,h3{text-wrap:balance}.theme-btn svg{flex:0 0 auto}/* buttons */-.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 22px;border-radius:12px;font:700 16px/1.2 "Plus Jakarta Sans",system-ui,sans-serif;text-decoration:none;border:0;cursor:pointer;text-align:center}+.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 22px;border-radius:12px;font:700 16px/1.2 var(--ff);text-decoration:none;border:0;cursor:pointer;text-align:center}.btn-primary{background:var(--accent);color:#fff}.btn-primary:hover{background:var(--accent-hover);color:#fff}.btn-ghost{background:var(--surface);color:var(--ink);box-shadow:inset 0 0 0 1.5px var(--chip-line)}.btn-ghost:hover{color:var(--brand)}.btn-dark{background:var(--inv-bg);color:var(--inv-ink)}.btn-dark:hover{background:var(--inv-hover);color:var(--inv-ink)}@@ -119,6 +142,36 @@ h1,h2,h3{text-wrap:balance}.show-txt p.t{margin:14px 0 0;font-size:17px;line-height:1.6;color:var(--muted)}.show-img{flex:1.4 1 420px;min-width:0}+/* hero laptop (drawn in CSS) with spec pills */+.pills{margin:0}+.laptop{position:relative;margin:0 auto;max-width:1000px;padding:0 4%}+.lp-screen{position:relative;background:#0D0D16;border-radius:22px 22px 8px 8px;padding:2.6% 2.6% 3.2%;box-shadow:0 0 0 1px #2B2A40,inset 0 0 0 2px #1C1B2C,0 40px 90px var(--shadow),0 6px 18px var(--shadow-2)}+.lp-cam{position:absolute;top:1.1%;left:50%;width:7px;height:7px;margin-left:-3.5px;border-radius:50%;background:#2A2940;box-shadow:inset 0 0 0 2px #1A1A28}+.lp-display{position:relative;overflow:hidden;border-radius:6px;background:var(--shot-bg);aspect-ratio:16/10}+.lp-display img{display:block;width:100%;height:auto}+.lp-d{display:none!important}+@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .lp-l{display:none!important}:root:not([data-theme=light]) .lp-d{display:block!important}}+:root[data-theme=dark] .lp-l{display:none!important}+:root[data-theme=dark] .lp-d{display:block!important}+.lp-base{position:relative;height:16px;margin:0 -7%;border-radius:2px 2px 16px 16px;background:linear-gradient(#D9D7E6,#B7B4C9 55%,#8F8BA6);box-shadow:0 18px 30px -12px var(--shadow)}+.lp-notch{position:absolute;top:0;left:50%;width:14%;height:6px;transform:translateX(-50%);border-radius:0 0 10px 10px;background:linear-gradient(#9C98B3,#B9B6CB)}+@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .lp-base{background:linear-gradient(#4A475F,#34324A 55%,#24223A)}:root:not([data-theme=light]) .lp-notch{background:linear-gradient(#1F1D33,#2E2C45)}}+:root[data-theme=dark] .lp-base{background:linear-gradient(#4A475F,#34324A 55%,#24223A)}+:root[data-theme=dark] .lp-notch{background:linear-gradient(#1F1D33,#2E2C45)}+.pill{position:absolute;z-index:2;display:inline-flex;align-items:center;gap:8px;padding:9px 14px;border-radius:999px;background:var(--surface);color:var(--ink);border:1px solid var(--chip-line);box-shadow:0 12px 30px var(--shadow-2);font:600 13.5px/1.2 var(--mono);white-space:nowrap}+.pill::before{content:"";width:8px;height:8px;border-radius:50%;background:#30D158;box-shadow:0 0 0 3px rgba(48,209,88,.2)}+.pill.p1{top:14%;left:0}+.pill.p2{top:46%;right:0}+.pill.p3{bottom:12%;left:6%}+@media (max-width:640px){+ .laptop{padding:0}+ .lp-screen{border-radius:12px 12px 5px 5px}+ .lp-base{height:9px;margin:0 -3%}+ .lp-cam{width:4px;height:4px;margin-left:-2px}+ .pill{position:static;margin:10px 6px 0 0;font-size:12px;padding:7px 11px}+ .pills{display:flex;flex-wrap:wrap;justify-content:center;margin-top:14px}+}+/* home: apps teaser */.teaser{padding-top:8px;padding-bottom:72px}.teaser-box{background:var(--surface);border:1px solid var(--line-2);border-radius:24px;padding:32px;display:flex;flex-wrap:wrap;gap:24px 40px;align-items:center;justify-content:space-between}@@ -139,14 +192,14 @@ h1,h2,h3{text-wrap:balance}.dl-card p{margin:0;color:var(--night-text);font-size:15px;line-height:1.55}.dl-card .btn{margin-top:auto}.cmd{position:relative;margin-top:auto}-.cmd pre{margin:0;padding:14px 16px;padding-right:88px;border-radius:12px;background:#0B0B1C;border:1px solid var(--night-line);color:#FFD60A;font:600 14px/1.5 ui-monospace,Menlo,Consolas,monospace;overflow-x:auto;white-space:pre}-.copy{position:absolute;top:6px;right:6px;min-height:36px;min-width:64px;padding:0 12px;border-radius:9px;border:1px solid var(--night-line);background:var(--night-card);color:#fff;font:700 13px/1 "Plus Jakarta Sans",system-ui,sans-serif;cursor:pointer}+.cmd pre{margin:0;padding:14px 16px;padding-right:88px;border-radius:12px;background:#0B0B1C;border:1px solid var(--night-line);color:#FFD60A;font:600 14px/1.5 var(--mono);overflow-x:auto;white-space:pre}+.copy{position:absolute;top:6px;right:6px;min-height:36px;min-width:64px;padding:0 12px;border-radius:9px;border:1px solid var(--night-line);background:var(--night-card);color:#fff;font:700 13px/1 var(--ff);cursor:pointer}.copy:hover{background:#2a2850}.dl-note{margin:0;text-align:center;color:var(--night-note);font-size:14px}.verify{border:1px dashed var(--night-line);border-radius:18px;padding:22px 26px;display:flex;flex-direction:column;gap:10px}.verify h3{margin:0;font-size:18px}.verify p{margin:0;color:var(--night-text);font-size:15px;line-height:1.55}-.fpr{font:600 13px/1.6 ui-monospace,Menlo,Consolas,monospace;color:#FFD60A!important;word-break:break-all;background:#0B0B1C;border:1px solid var(--night-line);border-radius:10px;padding:10px 12px}+.fpr{font:600 13px/1.6 var(--mono);color:#FFD60A!important;word-break:break-all;background:#0B0B1C;border:1px solid var(--night-line);border-radius:10px;padding:10px 12px}.verify a{color:var(--night-link);font-weight:700}.verify a:hover{color:#fff}/* support */@@ -165,7 +218,7 @@ h1,h2,h3{text-wrap:balance}.custom{display:flex;align-items:center;gap:8px;min-height:48px;padding:0 14px;border-radius:12px;background:var(--surface);box-shadow:inset 0 0 0 1.5px var(--chip-line);font-weight:600}.custom:focus-within{outline:3px solid var(--focus);outline-offset:2px}.custom.on{box-shadow:inset 0 0 0 2px var(--accent)}-.custom input{width:84px;border:0;outline:0;font:700 17px "Plus Jakarta Sans",system-ui,sans-serif;background:transparent;color:var(--ink)}+.custom input{width:84px;border:0;outline:0;font:700 17px var(--ff);background:transparent;color:var(--ink)}.custom input::placeholder{color:var(--subtle)}.pay{display:flex;flex-wrap:wrap;gap:12px}.pay-note{font-size:13px;color:var(--subtle)}@@ -195,12 +248,27 @@ h1,h2,h3{text-wrap:balance}.foot a{color:#E3E0FF}.foot a:hover{color:#fff}.foot p{margin:0;font-size:14px;flex-basis:100%}+/* multi-column footer (web/content/footer.json) */+.foot .fcols{display:grid;align-items:start;justify-content:stretch;grid-template-columns:minmax(200px,1.3fr) repeat(auto-fit,minmax(150px,1fr));gap:32px;padding-top:56px;padding-bottom:40px}+.fbrand p{margin:14px 0 0;font-size:14px;line-height:1.6;max-width:300px}+.fcol h2{margin:0 0 12px;font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#fff}+.fcol ul{list-style:none;margin:0;padding:0;display:grid;gap:8px;font-size:15px}+.foot .fcol a{text-decoration:none}.foot .fcol a:hover{text-decoration:underline}+.fbar{border-top:1px solid var(--night-line)}+.fbar .wrap{padding-top:18px;padding-bottom:18px;display:flex;flex-wrap:wrap;gap:12px 24px;align-items:center;justify-content:space-between}+.fbar p{margin:0;font-size:13.5px;flex-basis:auto}+.fbar .tools{gap:6px}+.foot .lang,.foot .theme-btn{border-color:var(--night-line);color:var(--night-text)}+.foot .lang:hover,.foot .theme-btn:hover{color:#fff}+.foot .lang[aria-current]{background:#F4F2FF;border-color:#F4F2FF;color:#12122A}+@media (max-width:640px){.foot .fcols{grid-template-columns:1fr 1fr}.fbrand{grid-column:1/-1}}+/* language banner (shown by site.js only) */.lbar{position:fixed;left:16px;right:16px;bottom:16px;z-index:30;margin:0 auto;max-width:560px;display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;padding:12px 12px 12px 18px;border-radius:16px;background:#12122A;color:#fff;box-shadow:0 20px 50px rgba(0,0,0,.35);font-weight:600;border:1px solid #2F2C55}.lbar[hidden]{display:none}.lbar p{margin:0;flex:1 1 200px}.lbar a{color:#fff;background:var(--cta-dark);padding:10px 14px;border-radius:10px;text-decoration:none;font-weight:700;min-height:44px;display:inline-flex;align-items:center}-.lbar button{min-height:44px;min-width:44px;border-radius:10px;border:1px solid #3a3960;background:transparent;color:#fff;font:700 14px "Plus Jakarta Sans",system-ui,sans-serif;cursor:pointer;padding:0 12px}+.lbar button{min-height:44px;min-width:44px;border-radius:10px;border:1px solid #3a3960;background:transparent;color:#fff;font:700 14px var(--ff);cursor:pointer;padding:0 12px}/* page heads and filter chips (gallery and apps) */.g-main{padding-top:56px;padding-bottom:80px}@@ -209,7 +277,7 @@ h1,h2,h3{text-wrap:balance}.g-bar{margin-top:32px;display:flex;flex-wrap:wrap;gap:12px 24px;align-items:center;justify-content:space-between}.g-cats{display:flex;flex-wrap:wrap;gap:8px}.g-themes{display:flex;gap:6px;padding:4px;border-radius:999px;background:var(--chip)}-.g-chip{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 16px;border-radius:999px;font:600 14px "Plus Jakarta Sans",system-ui,sans-serif;cursor:pointer;border:0;background:var(--chip);color:var(--ink-2)}+.g-chip{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 16px;border-radius:999px;font:600 14px var(--ff);cursor:pointer;border:0;background:var(--chip);color:var(--ink-2)}.g-themes .g-chip{background:transparent}.g-chip:hover{color:var(--brand)}.g-chip[aria-pressed=true]{background:var(--accent);color:#fff}@@ -259,6 +327,29 @@ h1,h2,h3{text-wrap:balance}.app .g-card{margin-top:auto}.app .g-card img{box-shadow:0 8px 22px var(--shadow-2)}+/* feature cards link */+.feat .more{margin-top:auto;padding-top:6px;font-weight:700;font-size:15px;text-decoration:none}+.feat .more:hover{text-decoration:underline}++/* about page */+.ab-hero{padding-top:72px;padding-bottom:24px;text-align:center}+.ab-hero h1{margin:0 auto;font-size:clamp(40px,6vw,72px);line-height:1.04;letter-spacing:-.03em;font-weight:800}+.ab-sec{padding-top:56px;padding-bottom:56px}+.creators{margin-top:32px;display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,380px));gap:24px;justify-content:center}+.creator{background:var(--surface);border:1px solid var(--line-2);border-radius:24px;padding:36px 28px;display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center}+.creator .avatar{width:168px;height:168px;font-size:52px}+.creator h3{margin:8px 0 0;font-size:24px}+.creator p{margin:0;color:var(--subtle);font-size:16px}+.creator .btn{margin-top:8px}+.ab-work{background:var(--surface-2);border-top:1px solid var(--line-2);border-bottom:1px solid var(--line-2)}+.ab-work .wrap{padding-top:64px;padding-bottom:64px}+.wk-head{display:flex;gap:20px;align-items:center;flex-wrap:wrap}+.wk-head .sub{margin:8px 0 0}+.wk-head img{flex:0 0 auto}+.ab-work .grid-feat{margin-top:32px}+.wk-cta{margin:36px 0 0}+.ab-support{text-align:center}+/* 404 */.nf{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;text-align:center;padding:40px 16px}.nf img.lumo404{width:220px;height:220px}diff --git a/web/src/site.js b/web/src/site.jsindex c707217..0944bdb 100644--- a/web/src/site.js+++ b/web/src/site.js@@ -73,25 +73,67 @@}// Theme toggle: Auto -> Light -> Dark. theme.js already applied the saved choice before paint.- var tb = $('.theme-btn');- if (tb) {+ var tbs = $$('.theme-btn');+ if (tbs.length) {var root = d.documentElement;var modes = ['auto', 'light', 'dark'];var label = function () {var m = root.getAttribute('data-theme') || 'auto';- $('.tl', tb).textContent = tb.getAttribute('data-' + m);- tb.setAttribute('aria-label', tb.getAttribute('data-label') + ': ' + tb.getAttribute('data-' + m));- $$('svg', tb).forEach(function (s) { s.style.display = s.getAttribute('data-m') === m ? '' : 'none'; });+ tbs.forEach(function (tb) {+ var tl = $('.tl', tb);+ if (tl) tl.textContent = tb.getAttribute('data-' + m);+ tb.setAttribute('aria-label', tb.getAttribute('data-label') + ': ' + tb.getAttribute('data-' + m));+ $$('svg', tb).forEach(function (s) { s.style.display = s.getAttribute('data-m') === m ? '' : 'none'; });+ });};- tb.addEventListener('click', function () {- var m = modes[(modes.indexOf(root.getAttribute('data-theme') || 'auto') + 1) % 3];- if (m === 'auto') root.removeAttribute('data-theme'); else root.setAttribute('data-theme', m);- store.set('lordos-theme', m);- label();+ tbs.forEach(function (tb) {+ tb.addEventListener('click', function () {+ var m = modes[(modes.indexOf(root.getAttribute('data-theme') || 'auto') + 1) % 3];+ if (m === 'auto') root.removeAttribute('data-theme'); else root.setAttribute('data-theme', m);+ store.set('lordos-theme', m);+ label();+ });});label();}+ // Paper: highlight the section being read in the table of contents+ var tocLinks = $$('.toc a');+ if (tocLinks.length && 'IntersectionObserver' in window) {+ var io = new IntersectionObserver(function (es) {+ es.forEach(function (en) {+ if (!en.isIntersecting) return;+ tocLinks.forEach(function (a) {+ if (a.getAttribute('href') === '#' + en.target.id) a.setAttribute('aria-current', 'true'); else a.removeAttribute('aria-current');+ });+ });+ }, { rootMargin: '0px 0px -70% 0px' });+ $$('.prose h2[id], .prose h3[id]').forEach(function (h) { io.observe(h); });+ }++ // FAQ search (the category chips are plain anchors)+ var fq = $('#faq-q');+ if (fq) {+ var secs = $$('.faq-sec');+ var norm = function (s) { return s.toLowerCase().normalize('NFD').replace(/[\u0300-\u036f]/g, ''); };+ fq.addEventListener('input', function () {+ var q = norm(fq.value.trim()), any = false;+ secs.forEach(function (sec) {+ var n = 0;+ $$('details', sec).forEach(function (dt) {+ var hit = !q || norm(dt.textContent).indexOf(q) >= 0;+ dt.hidden = !hit;+ if (hit) n++;+ if (q) dt.open = hit;+ });+ sec.hidden = n === 0;+ if (n) any = true;+ });+ $('#faq-empty').hidden = any;+ });+ if (location.hash) { var t0 = d.getElementById(location.hash.slice(1)); if (t0 && t0.tagName === 'DETAILS') t0.open = true; }+ }+// Filters (gallery: category + appearance; apps: category). Items carry data-item.var items = $$('[data-item]');var more = $('#g-more');