summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneysx <neysx>2009-01-06 21:25:07 +0000
committerneysx <neysx>2009-01-06 21:25:07 +0000
commite5dd43352db4ae536762e6f946809304f80bfd9c (patch)
treea2331ba70e618130768ec2979018fd7c03ea76d8
parent#251476 Add link to devmanual to menu & index it in metadoc (diff)
downloadwww-redesign-e5dd43352db4ae536762e6f946809304f80bfd9c.tar.gz
www-redesign-e5dd43352db4ae536762e6f946809304f80bfd9c.tar.bz2
www-redesign-e5dd43352db4ae536762e6f946809304f80bfd9c.zip
Reorg menu and group blog entries per author as suggested by Donnie
-rwxr-xr-xxml/htdocs/xsl/guide2.xsl61
-rw-r--r--xml/htdocs/xsl/menu.xml32
2 files changed, 61 insertions, 32 deletions
diff --git a/xml/htdocs/xsl/guide2.xsl b/xml/htdocs/xsl/guide2.xsl
index 4acc909f..1e72e648 100755
--- a/xml/htdocs/xsl/guide2.xsl
+++ b/xml/htdocs/xsl/guide2.xsl
@@ -548,22 +548,57 @@
</xsl:if>
<poster>planet.gentoo.org</poster>
<body><table>
- <xsl:for-each select="./newsitem">
- <xsl:variable name="pubDate" select="@planet"/>
- <xsl:for-each select="$planet//item[substring(pubDate,1,16)=$pubDate and not(contains(link, 'http://www.gentoo.org/news'))]">
+ <xsl:variable name="blogentries" xmlns="">
+ <xsl:for-each select="./newsitem">
+ <xsl:variable name="pubDate" select="@planet"/>
+ <xsl:for-each select="$planet//item[substring(pubDate,1,16)=$pubDate and not(contains(link, 'http://www.gentoo.org/news'))]">
+ <tr>
+ <xsl:choose>
+ <xsl:when test="contains(title,': ')">
+ <ti><xsl:value-of select="substring-before(title,': ')"/></ti>
+ <ti><uri link="{link}"><xsl:value-of select="substring-after(title,': ')"/></uri></ti>
+ </xsl:when>
+ <xsl:otherwise>
+ <ti><xsl:value-of select="title"/></ti>
+ <ti><uri link="{link}">. . .</uri></ti>
+ </xsl:otherwise>
+ </xsl:choose>
+ </tr>
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:variable name="sortedblogentries" xmlns="">
+ <xsl:for-each select="exslt:node-set($blogentries)/tr">
+ <xsl:sort select="ti[1]"/>
+ <tr>
+ <xsl:copy-of select="ti"/>
+ </tr>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:message><xsl:value-of select="concat('&#10;', 'New group&#10;')"/></xsl:message>
+ <xsl:for-each select="exslt:node-set($sortedblogentries)/tr">
+ <xsl:variable name="blogposter" select="ti[1]"/>
<tr>
+ <xsl:message><xsl:value-of select="concat('&#10;', preceding-sibling::tr[1]/ti[1],':-1:',preceding-sibling::tr[1]/ti[2],'&#10;')"/></xsl:message>
+ <xsl:message><xsl:value-of select="concat(ti[1],'::',ti[2],'&#10;')"/></xsl:message>
+ <xsl:message><xsl:value-of select="concat(following-sibling::tr[1]/ti[1],':+1:',following-sibling::tr[1]/ti[2],'&#10;')"/></xsl:message>
<xsl:choose>
- <xsl:when test="contains(title,': ')">
- <ti><xsl:value-of select="substring-before(title,': ')"/></ti>
- <ti><uri link="{link}"><xsl:value-of select="substring-after(title,': ')"/></uri></ti>
- </xsl:when>
- <xsl:otherwise>
- <ti><xsl:value-of select="title"/></ti>
- <ti><uri link="{link}">. . .</uri></ti>
- </xsl:otherwise>
+ <xsl:when test="preceding-sibling::tr[1]/ti[1]/text()=$blogposter">
+ <xsl:message><xsl:value-of select="concat('&#9;Inside block','&#10;')"/></xsl:message>
+ </xsl:when>
+ <xsl:when test="following-sibling::tr[1]/ti[1]/text()=$blogposter">
+ <ti rowspan="{1+count(following-sibling::tr[ti[1]/text()=$blogposter])}"><xsl:value-of select="ti[1]"/></ti>
+ <xsl:message><xsl:value-of select="concat('&#9;New block, count=', 1+count(following-sibling::tr[ti[1]/text()=$blogposter]), '&#10;')"/></xsl:message>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="ti[1]"/>
+ <xsl:message><xsl:value-of select="concat('&#9;cp ti','&#10;')"/></xsl:message>
+ </xsl:otherwise>
</xsl:choose>
+ <xsl:copy-of select="ti[2]"/>
</tr>
- </xsl:for-each>
</xsl:for-each>
</table></body>
</xsl:when>
@@ -1942,7 +1977,7 @@ Copyright 2001-<xsl:value-of select="substring(func:today(),1,4)"/> Gentoo Found
<img class="newsicon" src="/images/icon-clock.png" alt="Clock"/>
</xsl:when>
<xsl:when test="$thenews/@category='planet'">
- <img class="newsicon" src="/images/G-Earth.jpg" alt="Planet Earth"/>
+ <img class="newsicon" src="/images/G-Earth.png" alt="Planet Earth"/>
</xsl:when>
<!-- old ones, kept to display very very old news items -->
<xsl:when test="$thenews/@category='alpha'">
diff --git a/xml/htdocs/xsl/menu.xml b/xml/htdocs/xsl/menu.xml
index 7ad00ba1..e1dd76e1 100644
--- a/xml/htdocs/xsl/menu.xml
+++ b/xml/htdocs/xsl/menu.xml
@@ -25,13 +25,10 @@
<item href="http://planet.gentoo.org/" label="Planet"/>
</group>
-<group title="About">
-<item href="/main/en/about.xml" label="About Gentoo"/>
-<item href="/main/en/philosophy.xml" label="Philosophy"/>
-<item href="/main/en/contract.xml" label="Social Contract"/>
-<item href="/main/en/name-logo.xml" label="Name and Logo Guidelines"/>
-<item href="/main/en/graphics.xml" label="Logos and themes"/>
-<item href="/main/en/shots.xml" label="Screenshots"/>
+<group title="Get Started">
+<item href="/doc/en/handbook/" label="Gentoo Handbook"/>
+<item href="/doc/en/" label="Installation Docs" param="?catid=install#doc_chap2"/>
+<item href="/main/en/where.xml" label="Downloads"/>
</group>
<group title="News">
@@ -39,12 +36,6 @@
<item href="/news/en/gmn/" label="Monthly Newsletter"/>
</group>
-<group title="Get Started">
-<item href="/doc/en/handbook/" label="Gentoo Handbook"/>
-<item href="/doc/en/" label="Installation Docs" param="?catid=install#doc_chap2"/>
-<item href="/main/en/where.xml" label="Downloads"/>
-</group>
-
<group title="Documentation">
<item href="/doc/en/handbook/" label="Gentoo Handbook"/>
<item href="/doc/en/list.xml" label="Documentation List" param="?desc=1"/>
@@ -52,12 +43,6 @@
<item href="http://devmanual.gentoo.org" label="Developer's Manual"/>
</group>
-<group title="Get Gentoo">
-<item href="/main/en/where.xml" label="Downloads"/>
-<item href="/main/en/mirrors2.xml" label="Mirrors"/>
-<item href="http://torrents.gentoo.org/" label="Torrents"/>
-</group>
-
<group title="Community">
<item href="http://forums.gentoo.org/" label="Discussion Forums"/>
<item href="/main/en/irc.xml" label="IRC Channels"/>
@@ -89,4 +74,13 @@
<item href="/proj/en/" label="Projects"/>
</group>
+<group title="About">
+<item href="/main/en/about.xml" label="About Gentoo"/>
+<item href="/main/en/philosophy.xml" label="Philosophy"/>
+<item href="/main/en/contract.xml" label="Social Contract"/>
+<item href="/main/en/name-logo.xml" label="Name and Logo Guidelines"/>
+<item href="/main/en/graphics.xml" label="Logos and themes"/>
+<item href="/main/en/shots.xml" label="Screenshots"/>
+</group>
+
</menu>