summaryrefslogtreecommitdiff
path: root/gentoobrowse/xslt
diff options
context:
space:
mode:
Diffstat (limited to 'gentoobrowse/xslt')
-rw-r--r--gentoobrowse/xslt/package.xslt29
-rw-r--r--gentoobrowse/xslt/use.xslt3
-rw-r--r--gentoobrowse/xslt/usegroup-detail.xslt36
-rw-r--r--gentoobrowse/xslt/usegroup.xslt57
4 files changed, 114 insertions, 11 deletions
diff --git a/gentoobrowse/xslt/package.xslt b/gentoobrowse/xslt/package.xslt
index 287ede2..e6de8f0 100644
--- a/gentoobrowse/xslt/package.xslt
+++ b/gentoobrowse/xslt/package.xslt
@@ -138,7 +138,10 @@
</xsl:if>
<xsl:for-each select="use[group != preceding-sibling::use[1]/group or not(preceding-sibling::use[1]/group)]/group">
<h3>
- <xsl:value-of select="." />
+ <a>
+ <xsl:attribute name="href">/usegroup/<xsl:value-of select="." /></xsl:attribute>
+ <xsl:value-of select="." />
+ </a>
</h3>
<dl class="dl-horizontal">
<xsl:apply-templates select="../../use[group = current()]" />
@@ -149,20 +152,24 @@
</xsl:template>
<xsl:template match="/gentoo/uses/use">
<dt>
- <a>
- <xsl:attribute name="href">
- <xsl:text>/use/</xsl:text>
- <xsl:if test="group">
- <xsl:value-of select="group" />
- <xsl:text>_</xsl:text>
- </xsl:if>
- <xsl:value-of select="use" />
- </xsl:attribute>
+ <xsl:if test="group">
<xsl:if test="packageid">
<xsl:attribute name="class">local</xsl:attribute>
</xsl:if>
<xsl:value-of select="use" />
- </a>
+ </xsl:if>
+ <xsl:if test="not(group)">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:text>/use/</xsl:text>
+ <xsl:value-of select="use" />
+ </xsl:attribute>
+ <xsl:if test="packageid">
+ <xsl:attribute name="class">local</xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="use" />
+ </a>
+ </xsl:if>
</dt>
<dd>
<xsl:value-of select="description" />
diff --git a/gentoobrowse/xslt/use.xslt b/gentoobrowse/xslt/use.xslt
index 3b148a2..8c8509d 100644
--- a/gentoobrowse/xslt/use.xslt
+++ b/gentoobrowse/xslt/use.xslt
@@ -20,6 +20,9 @@
<xsl:variable name="firsts" select="use[substring(use, 1, 1) != substring(preceding-sibling::use[1]/use, 1, 1)]" />
<div class="span3 bs-docs-sidebar">
<ul class="nav nav-list bs-docs-sidenav">
+ <li>
+ <a href="/usegroup"><i class="icon-chevron-right">&#160;</i> Groups</a>
+ </li>
<xsl:for-each select="$firsts">
<xsl:variable name="char" select="substring(use, 1, 1)" />
<li>
diff --git a/gentoobrowse/xslt/usegroup-detail.xslt b/gentoobrowse/xslt/usegroup-detail.xslt
new file mode 100644
index 0000000..af71785
--- /dev/null
+++ b/gentoobrowse/xslt/usegroup-detail.xslt
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <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/group" /> options &#183; Gentoo Browse</title>
+ <meta name="description"><xsl:value-of select="/gentoo/group" /> options</meta>
+ </xsl:template>
+
+ <xsl:template name="header">
+ <h1><xsl:value-of select="/gentoo/group" /> options</h1>
+ </xsl:template>
+
+ <xsl:template name="content">
+ <xsl:apply-templates select="/gentoo/uses" />
+ </xsl:template>
+
+ <xsl:template match="/gentoo/uses">
+ <div class="span3 bs-docs-sidebar">
+ </div>
+ <div class="span9">
+ <dl class="dl-horizontal">
+ <xsl:for-each select="use">
+ <dt>
+ <xsl:value-of select="use" />
+ </dt>
+ <dd>
+ <xsl:value-of select="description" />
+ </dd>
+ </xsl:for-each>
+ </dl>
+ </div>
+ </xsl:template>
+</xsl:stylesheet>
+
diff --git a/gentoobrowse/xslt/usegroup.xslt b/gentoobrowse/xslt/usegroup.xslt
new file mode 100644
index 0000000..9afafec
--- /dev/null
+++ b/gentoobrowse/xslt/usegroup.xslt
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:import href="base.xslt" />
+ <xsl:output encoding="utf-8" method="html" media-type="text/html" indent="yes" />
+
+ <xsl:template name="head">
+ <title>Use group index &#183; Gentoo Browse</title>
+ <meta name="description">Use group index</meta>
+ </xsl:template>
+
+ <xsl:template name="header">
+ <h1>Use group index</h1>
+ </xsl:template>
+
+ <xsl:template name="content">
+ <xsl:apply-templates select="/gentoo/groups" />
+ </xsl:template>
+
+ <xsl:template match="/gentoo/groups">
+ <xsl:variable name="firsts" select="element[substring(., 1, 1) != substring(preceding-sibling::element[1], 1, 1)]" />
+ <div class="span3 bs-docs-sidebar">
+ <ul class="nav nav-list bs-docs-sidenav">
+ <xsl:for-each select="$firsts">
+ <xsl:variable name="char" select="substring(., 1, 1)" />
+ <li>
+ <a>
+ <xsl:attribute name="href">#<xsl:value-of select="$char" /></xsl:attribute>
+ <i class="icon-chevron-right">&#160;</i> <xsl:value-of select="$char" />
+ </a>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </div>
+ <div class="span9">
+ <xsl:for-each select="$firsts">
+ <xsl:variable name="char" select="substring(., 1, 1)" />
+ <section>
+ <xsl:attribute name="id"><xsl:value-of select="$char" /></xsl:attribute>
+ <h2 class="page-header">
+ <xsl:value-of select="$char" />
+ </h2>
+ <ul>
+ <xsl:for-each select="../element[substring(., 1, 1) = $char]">
+ <li>
+ <a>
+ <xsl:attribute name="href">/usegroup/<xsl:value-of select="." /></xsl:attribute>
+ <xsl:value-of select="." />
+ </a>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </section>
+ </xsl:for-each>
+ </div>
+ </xsl:template>
+</xsl:stylesheet>
+