diff options
Diffstat (limited to 'gentoobrowse/xslt/category.xslt')
-rw-r--r-- | gentoobrowse/xslt/category.xslt | 44 |
1 files changed, 37 insertions, 7 deletions
diff --git a/gentoobrowse/xslt/category.xslt b/gentoobrowse/xslt/category.xslt index 0f69260..f7dedc5 100644 --- a/gentoobrowse/xslt/category.xslt +++ b/gentoobrowse/xslt/category.xslt @@ -1,24 +1,54 @@ <?xml version="1.0" encoding="UTF-8" ?> -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:project2="http://project2.randomdan.homeip.net" exclude-result-prefixes="project2" > <xsl:import href="base.xslt" /> <xsl:output encoding="utf-8" method="html" media-type="text/html" indent="yes" /> + <xsl:template name="head"> - <title><xsl:value-of select="/gentoo/project2:uriElems/uriElem[2]" /> Package List - Gentoo Browse</title> + <title><xsl:value-of select="/gentoo/project2:uriElems/uriElem[2]" /> Package List · Gentoo Browse</title> <meta name="description"> <xsl:attribute name="content">Complete list of Gentoo Linux packages in the <xsl:value-of select="/gentoo/project2:uriElems/uriElem[2]" /> category</xsl:attribute> </meta> <link rel="contents" href="/categories" /> </xsl:template> + + <xsl:template name="header"> + <h1><xsl:value-of select="/gentoo/project2:uriElems/uriElem[2]" /> packages</h1> + <p class="lead"> + <xsl:value-of select="count(/gentoo/packages/package)" /> + packages from + <xsl:value-of select="count(/gentoo/packages/herds/value)" /> + herds. + </p> + </xsl:template> + <xsl:template name="content"> <xsl:apply-templates select="/gentoo/packages" /> </xsl:template> + <xsl:template match="/gentoo/packages"> - <h2>Packages</h2> - <section id="packages"> - <ul> - <xsl:apply-templates select="/gentoo/packages/package" /> + <div class="span3 bs-docs-sidebar"> + <ul class="nav nav-list bs-docs-sidenav"> + <xsl:for-each select="herds/value"> + <li> + <a> + <xsl:attribute name="href">#<xsl:value-of select="." /></xsl:attribute> + <i class="icon-chevron-right"></i> <xsl:value-of select="." /> + </a> + </li> + </xsl:for-each> </ul> - </section> + </div> + <div class="span9"> + <xsl:for-each select="herds/value"> + <section> + <xsl:attribute name="id"><xsl:value-of select="." /></xsl:attribute> + <h2 class="page-header"> + <xsl:value-of select="." /> + </h2> + <xsl:apply-templates select="/gentoo/packages/package[herd = current()/.]" /> + </section> + </xsl:for-each> + </div> </xsl:template> </xsl:stylesheet> |