[library-web/new-website-style: 7/55] Do not display deprecated API in the main page



commit 7308b68553396bfbfe67cf99834cb64bc1c16876
Author: Frédéric Péters <fpeters 0d be>
Date:   Sat Dec 4 00:18:34 2010 +0100

    Do not display deprecated API in the main page

 data/xslt/indexes.xsl |   44 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 44 insertions(+), 0 deletions(-)
---
diff --git a/data/xslt/indexes.xsl b/data/xslt/indexes.xsl
index fa22656..5269a53 100644
--- a/data/xslt/indexes.xsl
+++ b/data/xslt/indexes.xsl
@@ -184,7 +184,9 @@ $lang]"/>
 
 
 <xsl:template match="document" mode="channelindex">
+<xsl:param name="ignoredeprecated" select="true()"/>
 <xsl:param name="lang"/>
+<xsl:if test="not($ignoredeprecated) or not(keywords/keyword[. = 'upcoming-deprecation'])">
 <dt>
 <xsl:if test="keywords/keyword[. = 'upcoming-deprecation']">
 <xsl:attribute name="class">upcoming-deprecation</xsl:attribute>
@@ -259,6 +261,7 @@ $lang]"/>
 </p>
 </xsl:if>
 </dd>
+</xsl:if>
 </xsl:template>
 
 <xsl:template match="document[ path != '']" mode="modindex">
@@ -476,6 +479,7 @@ doctype-system="http://www.w3.org/TR/html4/loose.dtd";>
         <xsl:sort select="translate(title, $ucletters, $lcletters)"/>
         <xsl:apply-templates select="." mode="channelindex">
           <xsl:with-param name="lang" select="$lang"/>
+          <xsl:with-param name="ignoredeprecated" select="true()"/>
 	</xsl:apply-templates>
       </xsl:for-each>
       </dl>
@@ -535,6 +539,9 @@ doctype-system="http://www.w3.org/TR/html4/loose.dtd";>
       </xsl:if>
       </li>
      </xsl:for-each>
+     <xsl:if test="//keywords/keyword[. = 'upcoming-deprecation']">
+     <li><a href="deprecated">Deprecated APIs</a></li>
+     </xsl:if>
     </ul>
   </xsl:template>
 
@@ -826,6 +833,42 @@ div.body-sidebar { width: 100%; }
 
   </xsl:template>
 
+  <xsl:template match="indexes" mode="deprecated">
+    <xsl:message>Writing devel/deprecated.html</xsl:message>
+    <exsl:document href="devel/deprecated.html"
+        method="html" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"
+        doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
+        doctype-system="http://www.w3.org/TR/html4/loose.dtd";>
+      <html>
+	<head>
+	  <title>Deprecated API References - GNOME Library</title>
+	  <xsl:call-template name="libgo.head"/>
+          <script type="text/javascript" src="/js/strings.js" />
+	</head>
+	<body class="with-star">
+	  <xsl:call-template name="libgo.header">
+            <xsl:with-param name="channel">devel</xsl:with-param>
+          </xsl:call-template>
+	  <div id="container" class="two_columns">
+	    <div class="container_12">
+	  <div class="page_title"><h1 class="title">Deprecated API References</h1></div>
+	  <ul>
+	  <xsl:for-each select="//document">
+	    <xsl:if test="keywords/keyword[. = 'upcoming-deprecation'] and @path">
+              <li><a href="{ path}  /"><xsl:value-of select="title"/></a></li>
+	    </xsl:if>
+	  </xsl:for-each>
+	  </ul>
+	  </div>
+	  </div>
+	  <xsl:call-template name="libgo.footer"/>
+	</body>
+      </html>
+    </exsl:document>
+
+  </xsl:template>
+
+
   <!-- Google sitemap stuff -->
   <xsl:template match="document" mode="sitemap">
     <xsl:if test="@path"> <!-- only local documents -->
@@ -938,6 +981,7 @@ var remove_cookie_text = "<xsl:value-of select="$remove_cookie"/>";
       </xsl:apply-templates>
     </xsl:for-each>
     <xsl:apply-templates select="." mode="nightly"/>
+    <xsl:apply-templates select="." mode="deprecated"/>
     <xsl:apply-templates select="." mode="sitemap"/>
     <xsl:apply-templates select="." mode="robotstxt"/>
     <xsl:apply-templates select="home" mode="javascript"/>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]