Something went wrong. Try again.
Central platform for European atproto.<cc> country community websites
Something went wrong. Try again.
1.2 kB · 34 lines
Astro
at main
1234567891011121314151617181920212223242526272829303132333435---import { localeHref } from '../../i18n/paths';import Base from '../../layouts/Base.astro';import type { Lang } from '../../i18n/ui';import { getScope, socialUrl } from '../../config/scopes';import { PRIVACY } from '../../i18n/legal-content';
const { lang } = Astro.props as { lang: Lang };const c = PRIVACY[lang] ?? PRIVACY.en;const home = localeHref(lang, '/');// "Reach us" points at this build's own community account, not .nl's on every domain. The content// carries a __REACH__ token so the per-locale strings stay scope-agnostic; swap it in at render.const reachUrl = socialUrl(getScope(import.meta.env.PUBLIC_SITE_SCOPE));---
<Base lang={lang} title={c.title}> <section class="hero"> <p class="guide-back"><a href={home}>{c.back}</a></p> <h1 class="display page-title">{c.title}</h1> <p>{c.updated}</p> </section>
<section class="section prose"> {c.sections.map((s) => { const html = s.html.replaceAll('__REACH__', reachUrl); return ( <> <h2>{s.h}</h2> {html.trimStart().startsWith('<ul') ? <div set:html={html} /> : <p set:html={html} />} </> ); })} </section></Base>