aboutsummaryrefslogtreecommitdiff
path: root/source/99_result
diff options
context:
space:
mode:
Diffstat (limited to 'source/99_result')
-rw-r--r--source/99_result/main.css20
-rw-r--r--source/99_result/repository/atom.xsl (renamed from source/99_result/feed/atom.xsl)8
-rw-r--r--source/99_result/stream.xsl110
-rw-r--r--source/99_result/timeline.xsl101
4 files changed, 105 insertions, 134 deletions
diff --git a/source/99_result/main.css b/source/99_result/main.css
deleted file mode 100644
index 0452889..0000000
--- a/source/99_result/main.css
+++ /dev/null
@@ -1,20 +0,0 @@
-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/feed/atom.xsl b/source/99_result/repository/atom.xsl
index e59a3a6..f858dea 100644
--- a/source/99_result/feed/atom.xsl
+++ b/source/99_result/repository/atom.xsl
@@ -15,14 +15,14 @@
<xsl:include href="[utility/xhtml.xsl]"/>
<xsl:variable name="meta">
- <datasource type="main" mode="iterate" source="02_augment/formatted_commits.xml" target="repository"/>
- <datasource type="support" mode="full" source="00_content/meta.xml" target="meta"/>
+ <datasource type="main" mode="iterate" source="02_augment/commits.xml" target="repository"/>
+ <datasource type="support" mode="full" source="00_content/meta.xml" target="meta"/>
<target mode="xpath" value="concat($datasource/repository/entry/@handle, '.xml')"/>
</xsl:variable>
<xsl:variable name="root" select="/datasource"/>
<xsl:variable name="title" select="datasource/repository/entry/@handle"/>
-<xsl:variable name="url" select="concat('/feed/', $title, '.xml')"/>
+<xsl:variable name="url" select="concat($root/meta/url, '/feed/', $title, '.xml')"/>
<xsl:variable name="latest" select="repository/entry/commit[1]"/>
<xsl:template match="datasource">
@@ -58,7 +58,7 @@
<xsl:attribute name="href">
<xsl:value-of select="concat(
$root/meta/mirror/repository, '/',
- ../@handle, '/',
+ ../@handle, '/',
$root/meta/mirror/commit,
@hash
)"/>
diff --git a/source/99_result/stream.xsl b/source/99_result/stream.xsl
deleted file mode 100644
index 5c037d6..0000000
--- a/source/99_result/stream.xsl
+++ /dev/null
@@ -1,110 +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/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"/>
- <datasource type="support" mode="full" source="02_augment/formatted_commits.xml" target="commits"/>
- <datasource type="support" mode="full" source="00_content/meta.xml" target="meta"/>
- <target mode="xpath" value="concat($datasource/page/entry/@index, '/index.html')"/>
-</xsl:variable>
-
-<xsl:template name="get_commit">
- <xsl:param name="repository"/>
- <xsl:param name="hash"/>
-
- <xsl:variable name="commit" select="$root/commits/entry[@handle = $repository]/commit[@hash = $hash]"/>
-
- <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>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="concat(
- $root/meta/mirror/repository, '/',
- $repository
- )"/>
- </xsl:attribute>
-
- <xsl:value-of select="$repository"/>
- </a>
- <xsl:text> | </xsl:text>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="concat(
- $root/meta/mirror/repository, '/',
- $repository, '/',
- $root/meta/mirror/commit,
- $commit/@hash
- )"/>
- </xsl:attribute>
-
- <xsl:value-of select="$commit/@hash"/>
- </a>
- </p>
-
- <xsl:apply-templates select="$commit/message/*[name() != 'h1']" mode="xhtml"/>
- </div>
-</xsl:template>
-
-<xsl:template match="page/entry">
- <xsl:apply-templates />
-
- <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>
- </span>
- </xsl:if>
- </div>
-</xsl:template>
-
-<xsl:template match="page/entry/commit">
- <xsl:call-template name="get_commit">
- <xsl:with-param name="repository" select="@repository"/>
- <xsl:with-param name="hash" select="@hash"/>
- </xsl:call-template>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/source/99_result/timeline.xsl b/source/99_result/timeline.xsl
new file mode 100644
index 0000000..4793e8c
--- /dev/null
+++ b/source/99_result/timeline.xsl
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet
+ version="1.0"
+ xmlns="http://www.w3.org/2005/Atom"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+>
+
+<xsl:output
+ method="xml"
+ omit-xml-declaration="no"
+ encoding="UTF-8"
+ indent="no"
+/>
+
+<xsl:include href="[utility/xhtml.xsl]"/>
+
+<xsl:variable name="meta">
+ <datasource type="main" mode="full" source="03_merge/timeline.xml" target="timeline"/>
+ <datasource type="support" mode="full" source="02_augment/commits.xml" target="repositories"/>
+ <datasource type="support" mode="full" source="00_content/meta.xml" target="meta"/>
+ <target mode="plain" value="timeline.xml"/>
+</xsl:variable>
+
+<xsl:variable name="root" select="/datasource"/>
+<xsl:variable name="url" select="concat($root/meta/url, '/timeline.xml')"/>
+<xsl:variable name="latest" select="$root/repositories/entry[
+ @handle = $root/timeline/commit[1]/@repository
+]/commit[
+ @hash = $root/timeline/commit[1]/@hash
+]"/>
+
+<xsl:template name="get_commit">
+ <xsl:param name="repository"/>
+ <xsl:param name="hash"/>
+
+ <xsl:variable name="commit" select="$root/repositories/entry[
+ @handle = $repository
+ ]/commit[
+ @hash = $hash
+ ]"/>
+
+ <entry xmlns="http://www.w3.org/2005/Atom">
+ <id>
+ <xsl:value-of select="$hash"/>
+ </id>
+ <title>
+ <xsl:value-of select="$commit/message/h1"/>
+ </title>
+ <link rel="alternate" title="{@hash}">
+ <xsl:attribute name="href">
+ <xsl:value-of select="concat(
+ $root/meta/mirror/repository, '/',
+ $repository, '/',
+ $root/meta/mirror/commit,
+ $hash
+ )"/>
+ </xsl:attribute>
+ </link>
+ <content type="xhtml">
+ <div xmlns="http://www.w3.org/1999/xhtml">
+ <xsl:apply-templates select="$commit/message/*[name() != 'h1']" mode="xhtml"/>
+ </div>
+ </content>
+ <updated>
+ <xsl:value-of select="$commit/date"/>
+ <xsl:text>T</xsl:text>
+ <xsl:value-of select="$commit/date/@time"/>
+ <xsl:text>:00+02:00</xsl:text>
+ </updated>
+ </entry>
+</xsl:template>
+
+<xsl:template match="datasource">
+ <feed>
+ <link href="{$url}" rel="self" title="{$root/meta/title}" type="application/atom+xml"/>
+
+ <id>
+ <xsl:value-of select="$url"/>
+ </id>
+ <title>
+ <xsl:value-of select="$root/meta/title"/>
+ </title>
+ <updated>
+ <xsl:value-of select="$latest/date"/>
+ <xsl:text>T</xsl:text>
+ <xsl:value-of select="$latest/date/@time"/>
+ <xsl:text>:00+02:00</xsl:text>
+ </updated>
+
+ <xsl:apply-templates select="timeline/commit[position() &lt;= $root/meta/commit_count]"/>
+ </feed>
+</xsl:template>
+
+<xsl:template match="timeline/commit">
+ <xsl:call-template name="get_commit">
+ <xsl:with-param name="repository" select="@repository"/>
+ <xsl:with-param name="hash" select="@hash"/>
+ </xsl:call-template>
+</xsl:template>
+
+</xsl:stylesheet>