aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorAdrian Kummerlaender2014-10-18 22:36:35 +0200
committerAdrian Kummerlaender2014-10-18 22:36:35 +0200
commit14ee0d2e8bba56e24a28e9a824731fddc9b2b7a5 (patch)
tree15a2a8d436d2ff1a48ac06fe718f54fd4c919e02 /source
parentacacfda54016cbd4437d1ccaa609a52e9c1739d0 (diff)
downloadOverview-14ee0d2e8bba56e24a28e9a824731fddc9b2b7a5.tar
Overview-14ee0d2e8bba56e24a28e9a824731fddc9b2b7a5.tar.gz
Overview-14ee0d2e8bba56e24a28e9a824731fddc9b2b7a5.tar.bz2
Overview-14ee0d2e8bba56e24a28e9a824731fddc9b2b7a5.tar.lz
Overview-14ee0d2e8bba56e24a28e9a824731fddc9b2b7a5.tar.xz
Overview-14ee0d2e8bba56e24a28e9a824731fddc9b2b7a5.tar.zst
Overview-14ee0d2e8bba56e24a28e9a824731fddc9b2b7a5.zip
Added basic styling and expanded commit output
* added CSS style based on my personal blog ** modified master and stream templates accordingly * added date-time, repository name and commit hash output * removed single-repository log export as it is not the purpose of this application
Diffstat (limited to 'source')
-rw-r--r--source/02_augment/formatted_commits.xsl14
-rw-r--r--source/99_result/main.css20
-rw-r--r--source/99_result/repositories/repository_log.xsl20
-rw-r--r--source/99_result/stream.xsl37
4 files changed, 70 insertions, 21 deletions
diff --git a/source/02_augment/formatted_commits.xsl b/source/02_augment/formatted_commits.xsl
index 555e0d8..fed8c94 100644
--- a/source/02_augment/formatted_commits.xsl
+++ b/source/02_augment/formatted_commits.xsl
@@ -23,6 +23,20 @@
)/self::command/node()"/>
</xsl:template>
+<xsl:template match="date" mode="commit">
+ <xsl:copy>
+ <xsl:attribute name="time">
+ <xsl:value-of select="substring(text(), 12, 5)"/>
+ </xsl:attribute>
+
+ <xsl:apply-templates select="@*|node()" mode="commit"/>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="date/text()" mode="commit">
+ <xsl:value-of select="substring(., 0, 11)"/>
+</xsl:template>
+
<xsl:template match="message/text()" mode="commit">
<xsl:call-template name="formatter">
<xsl:with-param name="format">markdown</xsl:with-param>
diff --git a/source/99_result/main.css b/source/99_result/main.css
new file mode 100644
index 0000000..0452889
--- /dev/null
+++ b/source/99_result/main.css
@@ -0,0 +1,20 @@
+body{margin:1em;padding:0;font:1em Droid Sans,sans-serif,Verdana,Arial,FreeSans;color:#272828;word-wrap:break-word}
+a{text-decoration:underline;color:#272828}
+a:hover{color:black}
+p{padding:0;margin:0}
+h2{font-size:1.4em;margin:0;color:#F80}
+h2 a{font-size:.8em;text-decoration:none;color:#272828;font-weight:normal;display:inline-block;vertical-align:middle;max-width:95%}
+h2 a:hover{text-decoration:underline}
+ul{padding:0;margin:0 0 0 2.5em}
+ul li{list-style-type:circle;margin:.2em 0 .2em 0}
+ul li a{background:0}
+p.info{font-size:.8em;margin-bottom:.5em;margin-left:1.5em}
+p.info a{text-decoration:none;color:#272828;margin:0 .1em 0 .1em}
+p.info a:hover{text-decoration:underline}
+.commit{border-bottom:.3em dotted #e3e8e8;padding-bottom:.5em;overflow:hidden}
+#pagination{height:1.5em;margin-top:.5em}
+#pagination span.disabled{display:none}
+#pagination span a{text-decoration:none;color:#272828}
+#pagination span a:hover{text-decoration:underline}
+#pagination span a.pagination-previous{float:left}
+#pagination span a.pagination-next{float:right}
diff --git a/source/99_result/repositories/repository_log.xsl b/source/99_result/repositories/repository_log.xsl
deleted file mode 100644
index 9ffd173..0000000
--- a/source/99_result/repositories/repository_log.xsl
+++ /dev/null
@@ -1,20 +0,0 @@
-<?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/xhtml.xsl]"/>
-<xsl:include href="[utility/master.xsl]"/>
-
-<xsl:variable name="meta">
- <datasource type="main" mode="iterate" source="02_augment/formatted_commits.xml" target="repositories"/>
- <target mode="xpath" value="concat($datasource/repositories/entry/@handle, '/index.html')"/>
-</xsl:variable>
-
-<xsl:template match="repositories/entry/commit/message">
- <xsl:copy-of select="node()"/>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/source/99_result/stream.xsl b/source/99_result/stream.xsl
index 4f1bfde..7cb695d 100644
--- a/source/99_result/stream.xsl
+++ b/source/99_result/stream.xsl
@@ -7,6 +7,7 @@
<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="iterate" source="04_meta/paginated_timeline.xml" target="page"/>
@@ -20,7 +21,28 @@
<xsl:variable name="commit" select="$root/commits/entry[@handle = $repository]/commit[@hash = $hash]"/>
- <xsl:apply-templates select="$commit/message/node()" mode="xhtml"/>
+ <div class="commit">
+ <h2>
+ <xsl:text>» </xsl:text>
+ <a href="">
+ <xsl:value-of select="$commit/message/h1"/>
+ </a>
+ </h2>
+ <p class="info">
+ <xsl:call-template name="format-date">
+ <xsl:with-param name="date" select="$commit/date"/>
+ <xsl:with-param name="format" select="'M x, Y'"/>
+ </xsl:call-template>
+ <xsl:text> at </xsl:text>
+ <xsl:value-of select="$commit/date/@time"/>
+ <xsl:text> | </xsl:text>
+ <xsl:value-of select="$repository"/>
+ <xsl:text> | </xsl:text>
+ <xsl:value-of select="$commit/@hash"/>
+ </p>
+
+ <xsl:apply-templates select="$commit/message/*[name() != 'h1']" mode="xhtml"/>
+ </div>
</xsl:template>
<xsl:template match="page/entry">
@@ -29,13 +51,26 @@
<div id="pagination">
<xsl:if test="@index > 0">
<span>
+ <a class="pagination-previous" href="/0">
+ <xsl:text>« first</xsl:text>
+ </a>
+ </span>
+
+ <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="/{@total - 1}">
+ <xsl:text>last »</xsl:text>
+ </a>
+ </span>
+
+ <span>
<a class="pagination-next" href="/{@index + 1}">
<xsl:text>older »</xsl:text>
</a>