diff options
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/99_result')
-rw-r--r-- | source/99_result/archive.xsl | 16 | ||||
-rw-r--r-- | source/99_result/main.css | 14 | ||||
-rw-r--r-- | source/99_result/start.xsl | 78 | ||||
-rw-r--r-- | source/99_result/stream.xsl | 11 |
4 files changed, 103 insertions, 16 deletions
diff --git a/source/99_result/archive.xsl b/source/99_result/archive.xsl index 2df82ab..d5cc611 100644 --- a/source/99_result/archive.xsl +++ b/source/99_result/archive.xsl @@ -16,9 +16,18 @@ <xsl:template name="title-text">Archive</xsl:template> <xsl:template match="articles"> - <h3> - <xsl:text>Past articles</xsl:text> - </h3> + <div class="menuhead"> + <h3>Past articles</h3> + + <ul class="buttonlist"> + <li> + <a href="/0">Stream</a> + </li> + <li> + <a href="https://code.kummerlaender.eu/blog_content/">Source</a> + </li> + </ul> + </div> <ol class="articlelist archivlist"> <xsl:apply-templates select="entry"/> @@ -29,6 +38,7 @@ <li class="dateitem"> <xsl:value-of select="@handle"/> </li> + <xsl:apply-templates /> </xsl:template> diff --git a/source/99_result/main.css b/source/99_result/main.css index e04e6e6..dc3a05c 100644 --- a/source/99_result/main.css +++ b/source/99_result/main.css @@ -1,6 +1,9 @@ body{margin:0;padding:0;font:1em sans-serif;color:#272828;word-wrap:break-word} -a, a:visited{color:#272822} -p{margin:0;line-height:1.75em} +a, a:visited{text-decoration:underline;color:#272828} +a:hover{color:black} +h1, h2{margin:0;color:#272828;font-weight:bold} +h1 a, h2 a{text-decoration:none} +p{margin:0 0 .5em 0;text-align:justify;line-height:1.75em} ul{margin:0;padding:0;list-style:none} blockquote{border-left:.4em solid #e3e8e8;margin-left:0;padding-left:1em} pre{font-family:monospace;padding:1em;border-radius:.75em;color:#f8f8f2;background:#272822;white-space:pre-wrap} @@ -10,13 +13,13 @@ code{font-family:monospace;margin:0 .1em;padding:0 .5em;border:.1em solid #e3e8e .border_bottom{border-bottom:.3em solid #e3e8e8} .border_top{border-top:.3em solid #e3e8e8} #navigation{padding:2em 0 0 0} -#navigation h1{color:#F80;font-size:1.4em;font-weight:normal;float:left;padding:0 .2em 0 0;margin:0} +#navigation h1{color:#F80;font-size:1.4em;font-weight:bold;float:left;padding:0 .2em 0 0;margin:0} #navigation ul{float:right;font-size:1.1em} #content p{margin-bottom:.7em;text-align:justify} #content h2{font-size:1.4em;margin:0;color:#F80} #content h2 a, h2 span{font-size:.8em;text-decoration:none !important;color:#272828;font-weight:normal;display:inline-block;vertical-align:middle;max-width:95%} #content h2 a:hover{text-decoration:underline !important} -#content h3, #content h4{font-size:1.05em;font-weight:normal;padding-bottom:.2em;margin-bottom:.5em;border-bottom:.1em solid #e3e8e8} +#content h3, #content h4{font-size:1.05em;font-weight:normal;padding-bottom:.2em;margin:.8em 0 .5em 0;border-bottom:.1em solid #e3e8e8} #content .article{border-bottom:.3em dotted #e3e8e8;padding-bottom:.5em;margin-top:1em;text-align:justify} #content .article:last-child{border:none} #content .article a{text-decoration:underline;color:#272828} @@ -91,6 +94,9 @@ code{font-family:monospace;margin:0 .1em;padding:0 .5em;border:.1em solid #e3e8e .commentlist ol{margin-top:.2em;border-top:.1em solid #e3e8e8} .commentlist ol li{background:0;font-size:.8em} .commentlist ol li.dateitem{padding:0;font-weight:bold} +.menuhead{border-bottom:0.1em solid #e3e8e8;overflow:hidden;padding:0;margin-top:0.8em} +.menuhead h3{float:left;padding:0.4em 0 0 0;margin:0 !important;border:none !important} +.menuhead ul{float:right;padding:0;font-size:1.1em} @media screen and (max-width:46em){ #content .article h2 a{max-width:90%} #navigation{padding:.3em 0 0 0} diff --git a/source/99_result/start.xsl b/source/99_result/start.xsl new file mode 100644 index 0000000..2cb5d9d --- /dev/null +++ b/source/99_result/start.xsl @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet + version="1.0" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" +> + +<xsl:include href="[utility/master.xsl]"/> +<xsl:include href="[utility/xhtml.xsl]"/> +<xsl:include href="[utility/date-time.xsl]"/> + +<xsl:variable name="meta"> + <datasource type="main" mode="full" source="02_meta/paginated_articles.xml" target="paginated"/> + <datasource type="support" mode="full" source="01_data/articles.xml" target="articles"/> + <datasource type="support" mode="full" source="02_meta/meta.xml" target="meta"/> + <target mode="plain" value="index.html"/> +</xsl:variable> + +<xsl:template name="title-text">Start</xsl:template> + +<xsl:template match="paginated"> + <div> + <xsl:apply-templates select="entry[1]/article"/> + <xsl:apply-templates select="entry[2]/article"/> + </div> + + <div id="pagination"> + <span> + <a class="pagination-next" href="/archive"> + <xsl:text>more »</xsl:text> + </a> + </span> + </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> + <a href="/article/{@handle}"> + <xsl:value-of select="title"/> + </a> + </h2> + + <p class="info"> + <xsl:call-template name="format-date"> + <xsl:with-param name="date" select="date/full"/> + <xsl:with-param name="format" select="'M x, Y'"/> + </xsl:call-template> + <xsl:text> | </xsl:text> + <xsl:for-each select="tags/tag"> + <a href="/tag/{.}"> + <xsl:value-of select="."/> + </a> + <xsl:text> </xsl:text> + </xsl:for-each> + <xsl:text> | </xsl:text> + <xsl:value-of select="$root/meta/author"/> + </p> + + <p> + <xsl:apply-templates select="content/p[1]/node()" mode="xhtml"/> + <xsl:text> </xsl:text> + + <a href="/article/{@handle}"> + <xsl:text>↪</xsl:text> + </a> + </p> +</xsl:template> + +</xsl:stylesheet> diff --git a/source/99_result/stream.xsl b/source/99_result/stream.xsl index 19fc539..284a4d0 100644 --- a/source/99_result/stream.xsl +++ b/source/99_result/stream.xsl @@ -17,15 +17,8 @@ </xsl:variable> <xsl:template name="title-text"> - <xsl:choose> - <xsl:when test="/datasource/page/entry/@index = 0"> - <xsl:text>Start</xsl:text> - </xsl:when> - <xsl:otherwise> - <xsl:text>Page </xsl:text> - <xsl:value-of select="/datasource/page/entry/@index"/> - </xsl:otherwise> - </xsl:choose> + <xsl:text>Page </xsl:text> + <xsl:value-of select="/datasource/page/entry/@index"/> </xsl:template> <xsl:template match="page/entry"> |