aboutsummaryrefslogtreecommitdiff
path: root/source/02_meta
diff options
context:
space:
mode:
authorAdrian Kummerlaender2016-08-31 19:56:13 +0200
committerAdrian Kummerlaender2016-08-31 19:56:13 +0200
commitd34129d7cceee420d9d523666180d24a83f8e3ab (patch)
tree9d45965ce5a9de4f004a373869e9047b0d27a18c /source/02_meta
parentd7479d51880b5813ffe7ef4b84b1a93411aa77fe (diff)
downloadblog.kummerlaender.eu-d34129d7cceee420d9d523666180d24a83f8e3ab.tar
blog.kummerlaender.eu-d34129d7cceee420d9d523666180d24a83f8e3ab.tar.gz
blog.kummerlaender.eu-d34129d7cceee420d9d523666180d24a83f8e3ab.tar.bz2
blog.kummerlaender.eu-d34129d7cceee420d9d523666180d24a83f8e3ab.tar.lz
blog.kummerlaender.eu-d34129d7cceee420d9d523666180d24a83f8e3ab.tar.xz
blog.kummerlaender.eu-d34129d7cceee420d9d523666180d24a83f8e3ab.tar.zst
blog.kummerlaender.eu-d34129d7cceee420d9d523666180d24a83f8e3ab.zip
Add _Overview_ like digest start page, remove stream from center stage
* stream view is still available from the archive to preserve backwards compatability * reduce layout / styling differences between kummerlaender.eu and this blog
Diffstat (limited to 'source/02_meta')
-rw-r--r--source/02_meta/paginated_articles.xsl11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/02_meta/paginated_articles.xsl b/source/02_meta/paginated_articles.xsl
index 4ce71a2..fab37a9 100644
--- a/source/02_meta/paginated_articles.xsl
+++ b/source/02_meta/paginated_articles.xsl
@@ -8,14 +8,15 @@
<xsl:variable name="meta">
<datasource type="main" mode="full" source="01_data/articles.xml" target="articles"/>
- <target mode="plain" value="paginated_articles.xml"/>
+ <target mode="plain" value="paginated_articles.xml"/>
</xsl:variable>
-<xsl:variable name="total" select="ceiling(count(datasource/articles/entry) div 2)"/>
+<xsl:variable name="page_size">3</xsl:variable>
+<xsl:variable name="total" select="ceiling(count(datasource/articles/entry) div $page_size)"/>
-<xsl:template match="articles/entry[position() mod 2 = 1]">
- <entry index="{floor(position() div 2)}" total="{$total}">
- <xsl:apply-templates mode="group" select=". | following-sibling::entry[not(position() > 1)]"/>
+<xsl:template match="articles/entry[position() mod $page_size = 1]">
+ <entry index="{floor(position() div $page_size)}" total="{$total}">
+ <xsl:apply-templates mode="group" select=". | following-sibling::entry[not(position() > ($page_size - 1))]"/>
</entry>
</xsl:template>