commit: b132f346b21465030023cbf8caa91b56c50f5562
parent 6712e3e14c44c8c920de5bb018c8a441cc1120b8
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Mon, 25 Nov 2024 11:58:55 +0100
projects/index: Switch from Server-Side-Include to XInclude
Diffstat:
5 files changed, 37 insertions(+), 22 deletions(-)
diff --git a/build.ninja b/build.ninja
@@ -37,7 +37,10 @@ build atom.xsl: xinclude atom.xsl.in
build flux.atom: xinclude flux.atom.in
build atom.fr.xsl: xinclude atom.fr.xsl.in
+build templates/en/nav.xml: xslt templates/en/nav.xml.in | templates/en/nav.xsl
+
build animelist.xhtml: xinclude animelist.xhtml.in
+build projects/index.xhtml: xinclude projects/index.in.xhtml | templates/en/nav.xml
build images/linux-audio-output.png: dot images/linux-audio-output.dot
format = png
diff --git a/projects/home.shtml b/projects/home.shtml
@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
- <head>
-<!--#include file="/templates/head.shtml" -->
- <link rel="me" href="mailto:contact+blog@hacktivis.me"/>
- <title>Projects — lanodan’s cyber-home</title>
- </head>
- <body>
-<!--#include file="/templates/en/nav.shtml" -->
- <main>
- <h1>Projects</h1>
- <dl>
- <dt><a href="/projects/badwolf">BadWolf</a></dt><dd>Minimalist and privacy-oriented web browser based on WebKitGTK</dd>
- <dt><a href="https://pleroma.social/">Pleroma</a></dt><dd>Free and open communication for everyone, social networking software compatible with other Fediverse software such as Misskey, Pixelfed, Mastodon and many others.</dd>
- <dt><a href="/projects/deblob">deblob</a></dt><dd>Remove binary executables from a directory</dd>
- <dt><a href="/git/">Miscellaneous</a></dt><dd>Projects that don't yet warrant their dedicated project page or mention</dd>
- </dl>
- </main>
-<!--#include file="/templates/en/footer.shtml" -->
- </body>
-</html>
diff --git a/projects/index.in.xhtml b/projects/index.in.xhtml
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ lang="en"
+>
+ <head>
+ <xi:include href="../templates/head.xml" parse="xml" xpointer="xpointer(/xml/*)"/>
+ <link rel="me" href="mailto:contact+blog@hacktivis.me"/>
+ <title>Projects — lanodan’s cyber-home</title>
+ </head>
+ <body>
+ <xi:include href="../templates/en/nav.xml" parse="xml"/>
+ <main>
+ <h1>Projects</h1>
+ <dl>
+ <dt><a href="/projects/badwolf">BadWolf</a></dt><dd>Minimalist and privacy-oriented web browser based on WebKitGTK</dd>
+ <dt><a href="https://pleroma.social/">Pleroma</a></dt><dd>Free and open communication for everyone, social networking software compatible with other Fediverse software such as Misskey, Pixelfed, Mastodon and many others.</dd>
+ <dt><a href="/projects/deblob">deblob</a></dt><dd>Remove binary executables from a directory</dd>
+ <dt><a href="/git/utils-std">utils-std</a></dt><dd>Collection of commonly available Unix tools</dd>
+ <dt><a href="/git/">Miscellaneous</a></dt><dd>Projects that don't yet warrant their dedicated project page or mention</dd>
+ </dl>
+ </main>
+ <xi:include href="../templates/en/footer.shtml" parse="xml"/>
+ </body>
+</html>
diff --git a/templates/en/nav.xml.in b/templates/en/nav.xml.in
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<?xml-stylesheet type="text/xsl" href="nav.xsl"?>
+<navbar xmlns="http://www.w3.org/1999/xhtml"/>
diff --git a/templates/en/nav.xsl b/templates/en/nav.xsl
@@ -1,4 +1,8 @@
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xml:space="preserve">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:xhtml="http://www.w3.org/1999/xhtml" xml:space="preserve">
+ <xsl:template match="xhtml:navbar">
+ <div><xsl:call-template name="nav"/></div>
+ </xsl:template>
+
<xsl:param name="feedURL"/>
<xsl:template name="nav">
<header>I, too, "value your privacy" but unlike most I think it is priceless and fundamental. <a href="/privacy%20policy">Privacy Policy</a></header>