0f3b4dbcff
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 11s
CI / integration (pull_request) Successful in 22s
CI / ui (pull_request) Successful in 1m14s
CI / conformance (pull_request) Successful in 10s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Failing after 40s
Author ui/legal/{privacy,eula}_ru.md, reworked from the source documents: the seller INN is unified (290210610742), contacts unified to the Telegram bot + email + postal address, the EULA governing-law clause leads with Russian law + jurisdiction as residence tiers, the single-binding-language clause is dropped, data collection is scoped to voluntary/support provision, and "Компания" is no longer shout-cased.
Serve both as static pages through the render sidecar, reusing a shared renderLegalHtml generalised from renderOfferHtml: new GET /privacy/ and GET /eula/ (301 from the slashless form), the markdown baked into the image, no backend fetch. Route them at the edge via the @legal caddy matcher with a CI probe asserting each page's canonical URL + the seller INN, so a missing route cannot silently fall through to the landing. Add the two links to the landing footer.
Docs baked in: ARCHITECTURE (renderer legal pages + edge routing), FUNCTIONAL (+_ru) footer, renderer/README routes. Tests: renderer legal.test.mjs, ui renderLegalHtml unit, landing footer e2e.
22 lines
1.1 KiB
JavaScript
22 lines
1.1 KiB
JavaScript
// The public legal pages (GET /privacy/, GET /eula/): the owner-edited markdown under ui/legal/,
|
|
// rendered by the SAME shared renderLegalHtml the offer uses (bundled from ui/src/lib/offer). Unlike
|
|
// the offer, these carry no dynamic data — no backend fetch, no marker splice. Kept out of server.mjs
|
|
// so the per-page title/canonical presets are unit-testable without HTTP (test/legal.test.mjs).
|
|
import { renderLegalHtml } from '../dist/gameimage.mjs';
|
|
|
|
// renderPrivacy renders the privacy-policy markdown as the standalone /privacy/ page.
|
|
export function renderPrivacy(markdown) {
|
|
return renderLegalHtml(markdown, {
|
|
title: 'Политика конфиденциальности — Эрудит',
|
|
canonical: 'https://erudit-game.ru/privacy/',
|
|
});
|
|
}
|
|
|
|
// renderEula renders the end-user licence agreement markdown as the standalone /eula/ page.
|
|
export function renderEula(markdown) {
|
|
return renderLegalHtml(markdown, {
|
|
title: 'Пользовательское соглашение — Эрудит',
|
|
canonical: 'https://erudit-game.ru/eula/',
|
|
});
|
|
}
|