logo

blog

My website can't be that messy, right? git clone https://hacktivis.me/git/blog.git
commit: 0af1d961bd189f1d43152691b15a53df2b251a0b
parent 323f02aca2e1e91641eed45df7705119cc9ccc78
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri,  3 Feb 2023 17:31:10 +0100

templates/en/nav.xml: Transform into XSL

Diffstat:

MMakefile4++--
Marticles/2022 Summary.html11+++++++----
Marticles/2022 Summary.xml4++--
Mbookmarks.html4++--
Mbookmarks.xsl3++-
Mentry.xsl5++++-
Dtemplates/en/nav.xml27---------------------------
Atemplates/en/nav.xsl31+++++++++++++++++++++++++++++++
8 files changed, 50 insertions(+), 39 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,4 +1,4 @@ -TEMPLATES_EN = templates/head.xml templates/en/nav.xml templates/en/footer.shtml +TEMPLATES_EN = templates/head.xml templates/en/nav.xsl templates/en/footer.shtml .PHONY: all all: bookmarks.html linux-audio-output images/avatar.png images/avatar_HD.png articles/2022\ Summary.html @@ -7,7 +7,7 @@ bookmarks.html: bookmarks.xbel bookmarks.xsl $(TEMPLATES_EN) xsltproc --nonet bookmarks.xsl bookmarks.xbel | xmllint --xinclude --encode utf-8 --nofixup-base-uris --nsclean - | sed '1d' > $@ articles/2022\ Summary.html: articles/2022\ Summary.xml entry.xsl $(TEMPLATES_EN) - xsltproc --nonet entry.xsl articles/2022\ Summary.xml | xmllint --xinclude --encode utf-8 --nofixup-base-uris --nsclean - | sed '1d' > "$@" + xsltproc --nonet --param feedURL "'https://hacktivis.me/feed.atom'" entry.xsl articles/2022\ Summary.xml | xmllint --xinclude --encode utf-8 --nofixup-base-uris --nsclean - | sed '1d' > "$@" .PHONY: linux-audio-output linux-audio-output: images/linux-audio-output.png images/linux-audio-output.svg images/linux-audio-output-current.png images/linux-audio-output-current.svg diff --git a/articles/2022 Summary.html b/articles/2022 Summary.html @@ -5,7 +5,7 @@ <title>2022 Summary - lanodan's cyber-home</title> </head> <body> - <xml> + <header>Sorry, I do not value($$$) your privacy. :^) — <a href="/privacy%20policy">Privacy Policy</a></header> <nav><details open=""> <summary>Links</summary> @@ -27,12 +27,14 @@ <li><a href="/standards">standards</a>: opinions on them</li> </ul> <ul> + <li><a rel="alternate" type="application/atom+xml" href="https://hacktivis.me/feed.atom">Atom feed</a></li> <li><a href="gemini://hacktivis.me/">gemini-space</a></li> <li><a href="https://lanodan.eu/home">Resume</a></li> </ul> </details></nav> -</xml> - <article xml:lang="en" lang="en" class="h-entry"> + + <article> + <div xml:lang="en" lang="en" class="h-entry"> <a href="/articles/2022%20Summary"><h1>2022 Summary</h1></a> <p> Here's an incomplete summary of what I did in 2022 that I want to highlight. Notably absent are the various one-off contributions that are typically bugfixes and package maintenance in Alpine and Gentoo. @@ -79,10 +81,11 @@ <li><a href="/projects/">/projects/</a>: Lists some important projects in one place</li> <li><a href="/notes/bootstrapping">/notes/bootstrapping</a>: Similarly to <a href="/notes/pure-wayland">/notes/pure-wayland</a>. Here, I note the problems encountered and the current status of trying to have as much software build entirely from source.</li> </ul> -</article> +</div> <p> <a href="https://queer.hacktivis.me/objects/50be9d37-dee6-4c69-818e-013fa3b010d0" rel="replies external">Fediverse post for comments</a>, published on 2022-12-30T13:00:00Z, last updated on 2022-12-30T13:00:00Z </p> + </article> <footer> <a href="http://endsoftpatents.org/innovating-without-patents"><img loading="lazy" src="/images/patent_free.png?serial=2020111201" alt="Patent Free"/></a> <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img loading="lazy" alt="CC-BY-SA" src="/images/cc-by-sa.png?serial=2020111201"/></a> diff --git a/articles/2022 Summary.xml b/articles/2022 Summary.xml @@ -7,7 +7,7 @@ <link rel="external replies" type="application/activity+json" href="https://queer.hacktivis.me/objects/50be9d37-dee6-4c69-818e-013fa3b010d0" /> <link rel="external replies" type="text/html" href="https://queer.hacktivis.me/objects/50be9d37-dee6-4c69-818e-013fa3b010d0" /> <content type="xhtml"> -<article xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" class="h-entry"> +<div xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" class="h-entry"> <a href="/articles/2022%20Summary"><h1>2022 Summary</h1></a> <p> Here's an incomplete summary of what I did in 2022 that I want to highlight. Notably absent are the various one-off contributions that are typically bugfixes and package maintenance in Alpine and Gentoo. @@ -54,6 +54,6 @@ <li><a href="/projects/">/projects/</a>: Lists some important projects in one place</li> <li><a href="/notes/bootstrapping">/notes/bootstrapping</a>: Similarly to <a href="/notes/pure-wayland">/notes/pure-wayland</a>. Here, I note the problems encountered and the current status of trying to have as much software build entirely from source.</li> </ul> -</article> +</div> </content> </entry> diff --git a/bookmarks.html b/bookmarks.html @@ -5,7 +5,7 @@ <title>Bookmarks - lanodan's cyber-home</title> </head> <body> - <xml> + <header>Sorry, I do not value($$$) your privacy. :^) — <a href="/privacy%20policy">Privacy Policy</a></header> <nav><details open=""> <summary>Links</summary> @@ -31,7 +31,7 @@ <li><a href="https://lanodan.eu/home">Resume</a></li> </ul> </details></nav> -</xml> + <main> <h1>Bookmarks</h1> <p> diff --git a/bookmarks.xsl b/bookmarks.xsl @@ -1,5 +1,6 @@ <?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/en/nav.xsl" /> <xsl:output method="xml" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/xbel"><xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html&gt;</xsl:text> <html xml:lang="en" lang="en"> @@ -8,7 +9,7 @@ <title>Bookmarks - lanodan's cyber-home</title> </head> <body> - <xi:include href="templates/en/nav.xml" parse="xml"/> + <xsl:call-template name="nav"/> <main> <h1>Bookmarks</h1> <p> diff --git a/entry.xsl b/entry.xsl @@ -1,5 +1,6 @@ <?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/en/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="en" lang="en"> @@ -8,11 +9,13 @@ <xsl:if test="title"><title><xsl:value-of select="title"/> - lanodan's cyber-home</title></xsl:if> </head> <body> - <xi:include href="templates/en/nav.xml" parse="xml"/> + <xsl:call-template name="nav"/> + <article> <xsl:copy-of select="content/*"/> <p> <xsl:if test="link[@type='application/activity+json']"><a href="{link[@type='application/activity+json']/@href}" rel="replies external">Fediverse post for comments</a>, </xsl:if><xsl:apply-templates select="published"/><xsl:apply-templates select="updated"/> </p> + </article> <xi:include href="templates/en/footer.shtml" parse="xml"/> </body> </html></xsl:template> diff --git a/templates/en/nav.xml b/templates/en/nav.xml @@ -1,27 +0,0 @@ -<xml> - <header>Sorry, I do not value($$$) your privacy. :^) — <a href="/privacy%20policy">Privacy Policy</a></header> - <nav><details open=""> - <summary>Links</summary> - <ul> - <li><a href="/home">Home</a></li> - <li><a href="/about">About</a></li> - <li><a href="/projects/">Software Projects</a></li> - <li><a href="/animelist">Anime List</a></li> - <li><a href="/mangalist">Manga List</a></li> - <li><a href="/bookmarks">Bookmarks</a></li> - <li><a href="/coding%20style">coding style</a></li> - <li><a href="/decreases%20of%20usability">Decreases of usability</a></li> - <li><a href="/software%20basic%20needs">Software basic requirements</a></li> - <li><a href="/recaptcha">Google ReCaptcha</a></li> - <li><a href="/git/">/git/</a></li> - <li><a href="/kopimi/">/kopimi/</a>: libre data</li> - <li><a href="/librism">Désintox’ / FOSS activism</a></li> - <li><a href="/notes/">/notes/</a></li> - <li><a href="/standards">standards</a>: opinions on them</li> - </ul> - <ul> - <li><a href="gemini://hacktivis.me/">gemini-space</a></li> - <li><a href="https://lanodan.eu/home">Resume</a></li> - </ul> - </details></nav> -</xml> diff --git a/templates/en/nav.xsl b/templates/en/nav.xsl @@ -0,0 +1,31 @@ +<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:param name="feedURL"/> + <xsl:template name="nav"> + <header>Sorry, I do not value($$$) your privacy. :^) — <a href="/privacy%20policy">Privacy Policy</a></header> + <nav><details open=""> + <summary>Links</summary> + <ul> + <li><a href="/home">Home</a></li> + <li><a href="/about">About</a></li> + <li><a href="/projects/">Software Projects</a></li> + <li><a href="/animelist">Anime List</a></li> + <li><a href="/mangalist">Manga List</a></li> + <li><a href="/bookmarks">Bookmarks</a></li> + <li><a href="/coding%20style">coding style</a></li> + <li><a href="/decreases%20of%20usability">Decreases of usability</a></li> + <li><a href="/software%20basic%20needs">Software basic requirements</a></li> + <li><a href="/recaptcha">Google ReCaptcha</a></li> + <li><a href="/git/">/git/</a></li> + <li><a href="/kopimi/">/kopimi/</a>: libre data</li> + <li><a href="/librism">Désintox’ / FOSS activism</a></li> + <li><a href="/notes/">/notes/</a></li> + <li><a href="/standards">standards</a>: opinions on them</li> + </ul> + <ul><xsl:if test="$feedURL"> + <li><a rel="alternate" type="application/atom+xml" href="{$feedURL}">Atom feed</a></li></xsl:if> + <li><a href="gemini://hacktivis.me/">gemini-space</a></li> + <li><a href="https://lanodan.eu/home">Resume</a></li> + </ul> + </details></nav> + </xsl:template> +</xsl:stylesheet>