diff options
Implemented basic archive page template
* displays articles in descending order grouped by year
** based on the article metadata source implemented in adbe381
Diffstat (limited to 'source')
-rw-r--r-- | source/99_result/archive.xsl | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/source/99_result/archive.xsl b/source/99_result/archive.xsl new file mode 100644 index 0000000..4a5c671 --- /dev/null +++ b/source/99_result/archive.xsl @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet + version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" +> + +<xsl:output + method="xml" + omit-xml-declaration="no" + encoding="UTF-8" + indent="yes" +/> + +<xsl:include href="[utility/master.xsl]"/> + +<xsl:variable name="meta"> + <datasource type="main" mode="full" source="target/03_meta/articles.xml" target="articles"/> + <datasource type="support" mode="full" source="target/03_meta/meta.xml" target="meta"/> + <target mode="plain" value="archive"/> +</xsl:variable> + +<xsl:template name="title-text">Archive</xsl:template> + +<xsl:template match="articles"> + <div class="left articlelist archivlist"> + Past articles: + <ol> + <xsl:apply-templates /> + </ol> + </div> +</xsl:template> + +<xsl:template match="articles/year"> + <li class="dateitem"> + <xsl:value-of select="@handle"/> + </li> + <xsl:apply-templates /> +</xsl:template> + +<xsl:template match="year/article"> + <li> + <a href="{$url}/article/{@handle}"> + <xsl:value-of select="title"/> + </a> + </li> +</xsl:template> + +</xsl:stylesheet> |