logo

blog

My website can't be that messy, right? git clone https://hacktivis.me/git/blog.git
commit: 9fa2b5768212fc6c71e307a7b9a7ccfe406fe937
parent 9d3ffc89eb95e5d29058235e901ca4b0289e9253
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Tue, 19 Nov 2024 09:40:50 +0100

entrée.xsl.in: new, based on entry.xsl.in

Diffstat:

Mconfig.ninja1+
Aentrée.xsl.in32++++++++++++++++++++++++++++++++
2 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/config.ninja b/config.ninja @@ -6,6 +6,7 @@ rule gen_config build config.ninja: gen_config configure | ./articles build entry.xsl: xinclude entry.xsl.in | ./templates/head.xml ./templates/en/nav.xsl ./templates/en/footer.shtml +build entrée.xsl: xinclude entrée.xsl.in | ./templates/head.xml ./templates/fr/nav.xsl ./templates/fr/footer.shtml build bookmarks.xsl: xinclude bookmarks.xsl.in | ./templates/head.xml ./templates/en/nav.xsl ./templates/en/footer.shtml build nginx_autoindex.xsl: xinclude nginx_autoindex.xsl.in | ./templates/head.xml ./templates/en/nav.xsl ./templates/en/footer.shtml build articles/2022$ Summary.html: article entry.xsl articles/2022$ Summary.xml diff --git a/entrée.xsl.in b/entrée.xsl.in @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude" xml:space="preserve"> + <xsl:import href="templates/fr/nav.xsl" /> + <xsl:output method="xml" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/> + <xsl:template match="/entry"><xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html&gt;</xsl:text> +<html xml:lang="fr" lang="fr"> + <head> + <xi:include href="templates/head.xml" parse="xml" xpointer="xpointer(/xml/*)"/> + <meta property="og:type" content="article"/> + <xsl:if test="title"><meta property="og:title" content="{title}"/> + <title><xsl:value-of select="title"/> - lanodan</title></xsl:if> + </head> + <body> + <xsl:call-template name="nav"/> + <article> + <a href="{id}"><h1><xsl:value-of select="title"/></h1></a> + <p class="timestamps"><xsl:apply-templates select="published"/><xsl:apply-templates select="updated"/></p> + + <xsl:copy-of select="content/*"/> + + <xsl:if test="link[@type='application/activity+json']"><p> + <a href="{link[@type='application/activity+json']/@href}" rel="replies external">Message sur le fédiverse pour les commentaires</a> + </p></xsl:if> + </article> + <xi:include href="templates/fr/footer.shtml" parse="xml"/> + </body> +</html></xsl:template> + +<xsl:template match="published">publié le <xsl:value-of select="."/></xsl:template> +<xsl:template match="updated">, dernière mise-à-jour le <xsl:value-of select="."/></xsl:template> + +</xsl:stylesheet>