feat(news): news in blog style

Templates and strings for the blog features of the next motorino: a post page with
the long date, author, categories, summary, reading time and links to the older
and newer posts, the blog list with pages and the archive on the news index, Open
Graph article meta, month names and the interface strings in the five languages,
the author and the language of the news in site.json, and the styles.

Needs the motorino release that adds these features (.motorino-version is not
changed here).
This commit is contained in:
squid 2026-11-16 12:12:27 +01:00
commit 85b01cf588
11 changed files with 188 additions and 10 deletions

View file

@ -7,10 +7,14 @@ Layout: bare
Updates from kmalloc.org.
{{news_list}}
{{news_blog}}
## Categories {#categories}
{{categories_list}}
## Archive {#archive}
{{news_archive}}
[RSS feed](/news/feed.xml)

View file

@ -18,5 +18,31 @@
"news": "News"
},
"powered_by": "Powered by",
"category_h": "Category"
"category_h": "Category",
"date_long": "{d}. {month} {y}",
"date_month_year": "{month} {y}",
"reading_time": "{n} Min. Lesezeit",
"post_older": "Älter",
"post_newer": "Neuer",
"post_nav": "Weitere News",
"reply_mastodon": "Auf Mastodon antworten",
"read_more": "Weiterlesen",
"pager_label": "News-Seiten",
"pager_newer": "Neuere News",
"pager_older": "Ältere News",
"pager_page": "Seite {n} von {total}",
"archive_h": "Archiv",
"archive_up": "Archiv des Jahres",
"month_01": "Januar",
"month_02": "Februar",
"month_03": "März",
"month_04": "April",
"month_05": "Mai",
"month_06": "Juni",
"month_07": "Juli",
"month_08": "August",
"month_09": "September",
"month_10": "Oktober",
"month_11": "November",
"month_12": "Dezember"
}

View file

@ -22,5 +22,31 @@
"news": "News"
},
"powered_by": "Powered by",
"category_h": "Category"
"category_h": "Category",
"date_long": "{d} {month} {y}",
"date_month_year": "{month} {y}",
"reading_time": "{n} min read",
"post_older": "Older",
"post_newer": "Newer",
"post_nav": "More news",
"reply_mastodon": "Reply on Mastodon",
"read_more": "Read more",
"pager_label": "News pages",
"pager_newer": "Newer news",
"pager_older": "Older news",
"pager_page": "Page {n} of {total}",
"archive_h": "Archive",
"archive_up": "Archive of the year",
"month_01": "January",
"month_02": "February",
"month_03": "March",
"month_04": "April",
"month_05": "May",
"month_06": "June",
"month_07": "July",
"month_08": "August",
"month_09": "September",
"month_10": "October",
"month_11": "November",
"month_12": "December"
}

View file

@ -18,5 +18,31 @@
"news": "News"
},
"powered_by": "Powered by",
"category_h": "Category"
"category_h": "Category",
"date_long": "{d} de {month} de {y}",
"date_month_year": "{month} de {y}",
"reading_time": "{n} min de lectura",
"post_older": "Más antigua",
"post_newer": "Más reciente",
"post_nav": "Más noticias",
"reply_mastodon": "Responder en Mastodon",
"read_more": "Leer más",
"pager_label": "Páginas de noticias",
"pager_newer": "Noticias más recientes",
"pager_older": "Noticias más antiguas",
"pager_page": "Página {n} de {total}",
"archive_h": "Archivo",
"archive_up": "Archivo del año",
"month_01": "enero",
"month_02": "febrero",
"month_03": "marzo",
"month_04": "abril",
"month_05": "mayo",
"month_06": "junio",
"month_07": "julio",
"month_08": "agosto",
"month_09": "septiembre",
"month_10": "octubre",
"month_11": "noviembre",
"month_12": "diciembre"
}

View file

@ -18,5 +18,31 @@
"news": "News"
},
"powered_by": "Powered by",
"category_h": "Category"
"category_h": "Category",
"date_long": "{d} {month} {y}",
"date_month_year": "{month} {y}",
"reading_time": "{n} min de lecture",
"post_older": "Plus ancien",
"post_newer": "Plus récent",
"post_nav": "Autres actualités",
"reply_mastodon": "Répondre sur Mastodon",
"read_more": "Lire la suite",
"pager_label": "Pages des actualités",
"pager_newer": "Actualités plus récentes",
"pager_older": "Actualités plus anciennes",
"pager_page": "Page {n} sur {total}",
"archive_h": "Archives",
"archive_up": "Archives de l'année",
"month_01": "janvier",
"month_02": "février",
"month_03": "mars",
"month_04": "avril",
"month_05": "mai",
"month_06": "juin",
"month_07": "juillet",
"month_08": "août",
"month_09": "septembre",
"month_10": "octobre",
"month_11": "novembre",
"month_12": "décembre"
}

View file

@ -22,5 +22,31 @@
"news": "News"
},
"powered_by": "Powered by",
"category_h": "Categoria"
"category_h": "Categoria",
"date_long": "{d} {month} {y}",
"date_month_year": "{month} {y}",
"reading_time": "{n} min di lettura",
"post_older": "Più vecchia",
"post_newer": "Più recente",
"post_nav": "Altre news",
"reply_mastodon": "Rispondi su Mastodon",
"read_more": "Leggi tutto",
"pager_label": "Pagine delle news",
"pager_newer": "News più recenti",
"pager_older": "News meno recenti",
"pager_page": "Pagina {n} di {total}",
"archive_h": "Archivio",
"archive_up": "Archivio dell'anno",
"month_01": "gennaio",
"month_02": "febbraio",
"month_03": "marzo",
"month_04": "aprile",
"month_05": "maggio",
"month_06": "giugno",
"month_07": "luglio",
"month_08": "agosto",
"month_09": "settembre",
"month_10": "ottobre",
"month_11": "novembre",
"month_12": "dicembre"
}

View file

@ -1,5 +1,7 @@
{
"base_url": "https://kmalloc.org",
"news_language": "en",
"author": "squid",
"languages": [
"en",
"it",

View file

@ -131,6 +131,39 @@ code {
gap: .5em;
}
.lede {
margin: -.25em 0 1em;
color: var(--muted);
font-size: 1.125em;
}
.meta {
margin-top: -.25em;
color: var(--muted);
font-size: .9375em;
}
article {
margin: 1.5em 0;
padding-bottom: .5em;
border-bottom: 1px solid var(--border);
}
article h2 {
margin: 0 0 .25em;
font-size: 1.25em;
}
article p {
margin: .5em 0;
}
nav ul {
margin: 1em 0;
padding: 0;
list-style: none;
}
@media print {
:root {
--bg: #FFF;

5
templates/archive.html Normal file
View file

@ -0,0 +1,5 @@
<h1>{{archive_h}}: {{archive_name}}</h1>
{{archive_nav}}
{{archive_posts}}

View file

@ -7,9 +7,10 @@
<meta name="generator" content="motorino {{motorino_version}}">
<meta name="description" content="{{description_attr}}">
<meta property="og:site_name" content="kmalloc.org">
<meta property="og:type" content="website">
<meta property="og:type" content="{{og_type}}">
<meta property="og:title" content="{{title_html}}">
<meta property="og:description" content="{{description_attr}}">
{{article_meta}}
<meta property="og:url" content="{{doc_url}}">
<meta property="og:image" content="{{base_url}}/og.png">
<meta property="og:image:width" content="1200">

View file

@ -1,7 +1,10 @@
<h1>{{post_title}}</h1>
<p>
<time datetime="{{date}}">{{date}}</time>{{post_byline}}
</p>
{{post_summary}}
{{post_meta}}
{{post_body}}
{{post_mastodon}}
{{post_nav}}