aboutsummaryrefslogtreecommitdiff
path: root/source/99_result/stream.xsl
diff options
context:
space:
mode:
authorAdrian Kummerlaender2015-03-22 17:13:48 +0100
committerAdrian Kummerlaender2015-03-22 17:13:48 +0100
commitc0f62e958c5be315faf3c62c8bb1a2480025f52b (patch)
tree884843ab37a9c111af5c1c8f11148591324f65d6 /source/99_result/stream.xsl
parentf9bfffbedc109c2936d1c08512733ca0194f5598 (diff)
downloadblog.kummerlaender.eu-c0f62e958c5be315faf3c62c8bb1a2480025f52b.tar
blog.kummerlaender.eu-c0f62e958c5be315faf3c62c8bb1a2480025f52b.tar.gz
blog.kummerlaender.eu-c0f62e958c5be315faf3c62c8bb1a2480025f52b.tar.bz2
blog.kummerlaender.eu-c0f62e958c5be315faf3c62c8bb1a2480025f52b.tar.lz
blog.kummerlaender.eu-c0f62e958c5be315faf3c62c8bb1a2480025f52b.tar.xz
blog.kummerlaender.eu-c0f62e958c5be315faf3c62c8bb1a2480025f52b.tar.zst
blog.kummerlaender.eu-c0f62e958c5be315faf3c62c8bb1a2480025f52b.zip
Revamped layout to be more minimalistic and readable
* removed background image and as such it's fixed pixel width ** i.e. the layout is now completely dependent on the basic font size and scales accordingly * revamped master template and CSS to allow for nodes with varying lengths instead of truncating everything depending on the background width * increased font size of tag and archive pages * increased overall line height to improve readability * improved CSS to e.g. make use of `last-child` instead of adding `last` classes during static site generation * removed _microblog_ entries from archive as I have more or less stopped using _Twitter_
Diffstat (limited to 'source/99_result/stream.xsl')
-rw-r--r--source/99_result/stream.xsl68
1 files changed, 31 insertions, 37 deletions
diff --git a/source/99_result/stream.xsl b/source/99_result/stream.xsl
index d71b094..5469ff4 100644
--- a/source/99_result/stream.xsl
+++ b/source/99_result/stream.xsl
@@ -28,6 +28,37 @@
</xsl:choose>
</xsl:template>
+<xsl:template match="page/entry">
+ <div>
+ <xsl:apply-templates select="article"/>
+ </div>
+
+ <div id="pagination">
+ <xsl:if test="@index > 0">
+ <span>
+ <a class="pagination-previous" href="/{@index - 1}">
+ <xsl:text>« newer</xsl:text>
+ </a>
+ </span>
+ </xsl:if>
+ <xsl:if test="@index &lt; @total - 1">
+ <span>
+ <a class="pagination-next" href="/{@index + 1}">
+ <xsl:text>older »</xsl:text>
+ </a>
+ </span>
+ </xsl:if>
+ </div>
+</xsl:template>
+
+<xsl:template match="entry/article">
+ <xsl:variable name="handle" select="@handle"/>
+
+ <div class="article">
+ <xsl:apply-templates select="$root/articles/entry[@handle = $handle]" mode="resolve"/>
+ </div>
+</xsl:template>
+
<xsl:template match="articles/entry" mode="resolve">
<h2>
<xsl:text>» </xsl:text>
@@ -54,42 +85,5 @@
<xsl:apply-templates select="content/node()" mode="xhtml"/>
</xsl:template>
-<xsl:template match="page/entry">
- <xsl:apply-templates />
-
- <div id="pagination">
- <xsl:if test="@index > 0">
- <span>
- <a class="pagination-previous" href="/{@index - 1}">
- <xsl:text>« newer</xsl:text>
- </a>
- </span>
- </xsl:if>
- <xsl:if test="@index &lt; @total - 1">
- <span>
- <a class="pagination-next" href="/{@index + 1}">
- <xsl:text>older »</xsl:text>
- </a>
- </span>
- </xsl:if>
- </div>
-</xsl:template>
-
-<xsl:template match="page/entry/article">
- <xsl:variable name="handle" select="@handle"/>
-
- <xsl:choose>
- <xsl:when test="position() = last()">
- <div class="last article">
- <xsl:apply-templates select="$root/articles/entry[@handle = $handle]" mode="resolve"/>
- </div>
- </xsl:when>
- <xsl:otherwise>
- <div class="article">
- <xsl:apply-templates select="$root/articles/entry[@handle = $handle]" mode="resolve"/>
- </div>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
</xsl:stylesheet>