diff options
Diffstat (limited to 'static/templates.xsl')
| -rw-r--r-- | static/templates.xsl | 34 |
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> |
