diff options
Diffstat (limited to 'gentoobrowse/browse.xslt')
-rw-r--r-- | gentoobrowse/browse.xslt | 127 |
1 files changed, 54 insertions, 73 deletions
diff --git a/gentoobrowse/browse.xslt b/gentoobrowse/browse.xslt index 2382013..8d3643d 100644 --- a/gentoobrowse/browse.xslt +++ b/gentoobrowse/browse.xslt @@ -12,28 +12,20 @@ </xsl:template> <xsl:template match="/gentoo/categories"> <h2>Package groups</h2> - <table class="grps"> - <tr> - <th>Category</th> - <th>Packages</th> - </tr> + <ul> <xsl:apply-templates select="/gentoo/categories/category" /> - </table> + </ul> </xsl:template> <xsl:template match="/gentoo/categories/category"> - <tr> - <td> - <a> - <xsl:attribute name="href"> - /category/<xsl:value-of select="catname" /> - </xsl:attribute> - <xsl:value-of select="catname" /> - </a> - </td> - <td> - <xsl:value-of select="packages" /> - </td> - </tr> + <li> + <a> + <xsl:attribute name="href"> + /category/<xsl:value-of select="catname" /> + </xsl:attribute> + <xsl:value-of select="catname" /> + </a> + (<xsl:value-of select="packages" />) + </li> </xsl:template> <xsl:template match="/gentoo/packages"> <h2>Packages</h2> @@ -43,33 +35,34 @@ </xsl:template> <xsl:template match="/gentoo/summary/package/versions"> <div class="tabvisible" id="versions"> - <table class="versions"> + <ul> <xsl:apply-templates select="version" /> - </table> + </ul> </div> </xsl:template> <xsl:template match="/gentoo/summary/package/versions/version"> - <tr class="row1"> - <td class="ver"> - v<xsl:value-of select="version" /> - </td> - <td class="archs"> - <xsl:apply-templates select="../../versionArchs/arch[ebuildid=current()/ebuildid]"> - <xsl:sort select="arch" /> - </xsl:apply-templates> - </td> - </tr> - <tr class="row2"> - <td colspan="2" class="use"> - Use flags: - <xsl:apply-templates select="../../versionUses/use[ebuildid=current()/ebuildid]"> - <xsl:sort select="use" /> - </xsl:apply-templates> - </td> - </tr> + <li> + <span class="ver">v<xsl:value-of select="version" /></span> (<xsl:value-of select="moddate" />) + <ul> + <li> + <xsl:for-each select="../../versionArchs/arch[ebuildid=current()/ebuildid]"> + <xsl:sort select="arch" /> + <xsl:value-of select="arch" /> + <xsl:text> </xsl:text> + </xsl:for-each> + </li> + <li> + <xsl:for-each select="../../versionUses/use[ebuildid=current()/ebuildid]"> + <xsl:sort select="use" /> + <xsl:value-of select="use" /> + <xsl:text> </xsl:text> + </xsl:for-each> + </li> + </ul> + </li> </xsl:template> <xsl:template match="/gentoo/summary/package"> - <script language="javascript"> + <script language="javascript" type="text/javascript"> function showTab(name) { var children = document.getElementById('tabcontainer').childNodes; @@ -117,7 +110,7 @@ <p> <xsl:value-of select="description" /> </p> - <div class="tabbox" id="tabcontainer"> + <div class="tabstrip"> <!-- handles --> <a class="tabhandle" href="javascript:showTab('versions');">Versions</a> <xsl:if test="count(/gentoo/summary/package/deps/package) > 0"> @@ -126,6 +119,8 @@ <xsl:if test="count(/gentoo/summary/package/packageBugs/bug) > 0"> <a class="tabhandle" href="javascript:showTab('bugs');">Open bugs</a> </xsl:if> + </div> + <div class="tabbox" id="tabcontainer"> <!-- content --> <xsl:apply-templates select="versions" /> <xsl:apply-templates select="deps" /> @@ -137,48 +132,34 @@ <!-- Package URLs --> <xsl:template match="/gentoo/summary/package/packageUrls"> <div class="urls"> - <xsl:apply-templates match="url" /> - </div> - </xsl:template> - <xsl:template match="/gentoo/summary/package/packageUrls/url"> - <a target="_blank"> - <xsl:attribute name="href"> + <xsl:for-each select="url"> + <a target="_blank"> + <xsl:attribute name="href"> + <xsl:value-of select="url" /> + </xsl:attribute> <xsl:value-of select="url" /> - </xsl:attribute> - <xsl:value-of select="url" /> - </a> - <br /> + </a> + <br /> + </xsl:for-each> + </div> </xsl:template> <!-- Package bugs --> <xsl:template match="/gentoo/summary/package/packageBugs"> <xsl:if test="count(/gentoo/summary/package/packageBugs/bug) > 0"> <ul class="tabhidden" id="bugs"> - <xsl:apply-templates match="bug" /> + <xsl:for-each select="bug"> + <li> + <a target="_blank"> + <xsl:attribute name="href">http://bugs.gentoo.org/<xsl:value-of select="bugid" /></xsl:attribute> + <xsl:value-of select="summary" /> + </a> + (<xsl:value-of select="bugid" />) + </li> + </xsl:for-each> </ul> </xsl:if> </xsl:template> - <xsl:template match="/gentoo/summary/package/packageBugs/bug"> - <li> - <a target="_blank"> - <xsl:attribute name="href">http://bugs.gentoo.org/<xsl:value-of select="bugid" /></xsl:attribute> - <xsl:value-of select="summary" /> - </a> - (<xsl:value-of select="bugid" />) - </li> - </xsl:template> - - <!-- Version use flags --> - <xsl:template match="/gentoo/summary/package/versionUses/use"> - <xsl:value-of select="use" /> - <xsl:text> </xsl:text> - </xsl:template> - - <!-- Version archs --> - <xsl:template match="/gentoo/summary/package/versionArchs/arch"> - <xsl:value-of select="arch" /> - <xsl:text> </xsl:text> - </xsl:template> <!-- Package dependencies --> <xsl:template match="/gentoo/summary/package/deps"> |