refactor: keep every text in one JSON file per language

- move the texts of each language into lang/<lang>.json and the shared data into site.json
- replace the per-language HTML fragments with one template per page type in templates/pages
- add templates/parts for the repeated service and person blocks
- move the news posts to news/
- a language lists only the pages it has, so adding one is a single file
- the generated pages are unchanged
- update the README
This commit is contained in:
squid 2026-11-12 19:59:56 +01:00
commit 21103486f8
7 changed files with 683 additions and 712 deletions

44
templates/pages/home.html Normal file
View file

@ -0,0 +1,44 @@
<p>
<img class="logo" src="/logo-auto.svg" alt="kmalloc" width="112">
</p>
<h1 class="hero">Technology.<br>Freedom.<br>Dissent.</h1>
<p>
<strong>{{identity}}</strong>
</p>
<p>
{{intro}}
</p>
<p>
<strong>Allocate freedom.</strong>
</p>
<h2 id="manifesto">{{nav_manifesto}}</h2>
<p>
{{manifesto_p}}
<a href="{{url_manifesto}}">{{manifesto_a}}</a> ({{version_lc}} {{manifesto_version}}).
</p>
<h2 id="people">{{nav_people}}</h2>
<p>
{{people_p}}
<a href="{{url_people}}">{{people_a}}</a>.
</p>
<h2 id="services">{{nav_services}}</h2>
<p>
{{services_p}}
<a href="{{url_services}}">{{services_a}}</a>.
</p>
<ul>
{{services_list}}
</ul>
{{latest_news}}

View file

@ -0,0 +1,13 @@
<h1>{{manifesto_title}}</h1>
<p>
<strong>{{version}} {{manifesto_version}}</strong>
</p>
{{note_block}}<h2>{{toc}}</h2>
<ul>
{{manifesto_toc}}
</ul>
{{manifesto_body}}

11
templates/pages/news.html Normal file
View file

@ -0,0 +1,11 @@
<h1>{{nav_news}}</h1>
<p>
{{intro}}
</p>
{{news_list}}
<p>
<a href="{{url_news}}feed.xml">{{rss}}</a>
</p>

View file

@ -0,0 +1,7 @@
<h1>{{nav_people}}</h1>
<p>
{{intro}}
</p>
{{people_cards}}

View file

@ -0,0 +1,27 @@
<h1>{{nav_services}}</h1>
<p>
{{intro}}
</p>
<h2 id="account">{{account_h}}</h2>
<p>
{{account_p1}}
<strong>{{contact_shown}}</strong>
({{at_hint}}),
{{account_p2}}
</p>
{{service_sections}}<h2 id="donate">{{donate_h}}</h2>
<p>
{{donate_p}}
<a href="bitcoin:{{btc}}"><code>{{btc}}</code></a>
</p>
<h2 id="terms">{{terms_h}}</h2>
<p>
{{terms_p}}
</p>

View file

@ -0,0 +1,9 @@
<h2 id="{{handle}}">{{title}}</h2>
<p>
{{bio}}
</p>
<ul>
{{links}}
</ul>

View file

@ -0,0 +1,7 @@
<h2 id="{{id}}">{{name}}</h2>
<p>
{{text}}
<a href="{{url}}">{{open_a}}</a>.
</p>