diff options
| -rw-r--r-- | static/contact.xsl | 12 | ||||
| -rw-r--r-- | static/head.xsl | 11 |
2 files changed, 16 insertions, 7 deletions
diff --git a/static/contact.xsl b/static/contact.xsl index 56624f1..ab9eeea 100644 --- a/static/contact.xsl +++ b/static/contact.xsl @@ -1,15 +1,17 @@ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" indent="yes" /> <xsl:include href="head.xsl" /> + <xsl:param name="title"> + <xsl:text>Contact</xsl:text> + </xsl:param> <xsl:template match="/"> <html> - <head> - <xsl:call-template name="head" /> - <title>Contact</title> - </head> + <xsl:call-template name="head"> + <xsl:with-param name="title" select="$title" /> + </xsl:call-template> <body> - <h1>Contact</h1> + <h1><xsl:value-of select="$title" /></h1> <form id="contact-form" class="pure-form pure-form-stacked"> <label for="name_in"> Name diff --git a/static/head.xsl b/static/head.xsl index 189497e..ef90ace 100644 --- a/static/head.xsl +++ b/static/head.xsl @@ -1,6 +1,13 @@ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template name="head"> - <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/purecss@3.0.0/build/pure-min.css" integrity="sha384-X38yfunGUhNzHpBaEBsWLO+A0HDYOQi8ufWDkZ0k9e0eXz/tH3II7uKZ9msv++Ls" crossorigin="anonymous" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> + <xsl:param name="title" /> + <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/purecss@3.0.0/build/pure-min.css" integrity="sha384-X38yfunGUhNzHpBaEBsWLO+A0HDYOQi8ufWDkZ0k9e0eXz/tH3II7uKZ9msv++Ls" crossorigin="anonymous" /> + </head> </xsl:template> </xsl:stylesheet> |
