aboutsummaryrefslogtreecommitdiff
path: root/static/templates.xsl
diff options
context:
space:
mode:
authorAlexander Kavon <me+git@alexkavon.com>2025-07-03 04:35:21 -0400
committerAlexander Kavon <me+git@alexkavon.com>2025-07-03 04:35:21 -0400
commita9608134cf2402fb0e6d9405e96db9dc92ed4849 (patch)
tree796745ad0113d92a0c8675623d25a4a21738614b /static/templates.xsl
parent6dc6550c8828724712f58a7ec5874827ffbc9f56 (diff)
page template
Diffstat (limited to 'static/templates.xsl')
-rw-r--r--static/templates.xsl34
1 files changed, 34 insertions, 0 deletions
diff --git a/static/templates.xsl b/static/templates.xsl
new file mode 100644
index 0000000..204485a
--- /dev/null
+++ b/static/templates.xsl
@@ -0,0 +1,34 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:param name="title" />
+ <xsl:param name="icon" />
+
+ <xsl:template name="head">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
+ <title>
+ <xsl:value-of select="$title" />
+ </title>
+ <link
+ rel="stylesheet"
+ href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css"
+ />
+ </head>
+ </xsl:template>
+
+ <xsl:template name="page">
+ <xsl:param name="content" />
+
+ <html>
+ <xsl:call-template name="head">
+ <xsl:with-param name="title" select="$title"/>
+ </xsl:call-template>
+
+ <body>
+ <h1><img class="icon" src="/icons/{$icon}.svg#${icon}" /><xsl:text> </xsl:text><xsl:value-of select="$title" /></h1>
+ <hr />
+ <xsl:copy-of select="$content" />
+ </body>
+ </html>
+ </xsl:template>
+</xsl:stylesheet>