summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2019-02-19 02:45:03 +0300
committerdefanor <defanor@uberspace.net>2019-02-19 02:45:03 +0300
commit5190c3e546ab0b7758cd1c6778544310618c3fc3 (patch)
tree1d0589550cb73f31a7bb0c694aa2cff37160cfd1
parenta6554b9e855f518a5f8e5d0177eb4a57a52f814b (diff)
downloadhomepage-5190c3e546ab0b7758cd1c6778544310618c3fc3.zip
homepage-5190c3e546ab0b7758cd1c6778544310618c3fc3.tar.gz
homepage-5190c3e546ab0b7758cd1c6778544310618c3fc3.tar.bz2
Add dates
-rw-r--r--tools/skeleton.xml2
-rw-r--r--tools/xml-to-html.xsl13
2 files changed, 13 insertions, 2 deletions
diff --git a/tools/skeleton.xml b/tools/skeleton.xml
index 6cd8db6..bfff053 100644
--- a/tools/skeleton.xml
+++ b/tools/skeleton.xml
@@ -8,6 +8,6 @@
primaryTopic="">
<topic iri="" />
<body xmlns="http://www.w3.org/1999/xhtml">
-
+
</body>
</document>
diff --git a/tools/xml-to-html.xsl b/tools/xml-to-html.xsl
index 64efa12..ab5daf9 100644
--- a/tools/xml-to-html.xsl
+++ b/tools/xml-to-html.xsl
@@ -76,7 +76,16 @@
href="/xhtml-rdfa-light.css" />
<meta name="robots" content="noarchive" />
</head>
- <xsl:apply-templates mode="body" select="xhtml:body" />
+ <body>
+ <xsl:apply-templates mode="body" select="xhtml:body/*" />
+ <footer>
+ <xsl:if test="not(//notes)">
+ <a href="https://defanor.uberspace.net/">defanor</a>,
+ <time><xsl:copy-of select="substring(@created,0,8)" /></time>
+ <xsl:if test="substring(@created,0,8) != substring(@modified,0,8)">–<time><xsl:copy-of select="substring(@modified,0,8)" /></time></xsl:if>
+ </xsl:if>
+ </footer>
+ </body>
</html>
</xsl:template>
@@ -112,6 +121,8 @@
</dt>
<dd>
<xsl:value-of select="document/@description" />
+ (<time><xsl:copy-of select="substring(document/@created,0,8)" /></time>
+ <xsl:if test="substring(document/@created,0,8) != substring(document/@modified,0,8)">–<time><xsl:copy-of select="substring(document/@modified,0,8)" /></time></xsl:if>)
</dd>
</xsl:template>