| Summary: | [patch] xml'ify frontpage navigation bar | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Documentation | Reporter: | Josef El-Rayes <josef> | ||||||||
| Component: | Books & Articles | Assignee: | josef | ||||||||
| Status: | Closed FIXED | ||||||||||
| Severity: | Affects Only Me | ||||||||||
| Priority: | Normal | ||||||||||
| Version: | Latest | ||||||||||
| Hardware: | Any | ||||||||||
| OS: | Any | ||||||||||
| Attachments: |
|
||||||||||
Responsible Changed From-To: freebsd-www->josef I'll take this one. State Changed From-To: open->closed Commited, thanks josef! |
This patch converts the html navigation bar in a xml powered navigation bar, which makes maintaining the links much easier and more powerful. Fix: --- includes.misc.xsl.orig Mon Dec 22 23:57:04 2003 +++ includes.misc.xsl Mon Dec 22 23:51:50 2003 @@ -99,6 +99,43 @@ <xsl:value-of select="document($news.press.xml)/descendant::year[position() = 1]/name"/> </xsl:template> + <!-- template: "html-index-navigation-link-list" + generates navigation bar in index.html --> + + <xsl:template name="html-index-navigation-link-list"> + <xsl:param name="index.xml" select="''" /> + <xsl:for-each select="document($index.xml)/navigation/category"> + <p> + <xsl:if test="@src != ''"> + <a> + <xsl:attribute name="href"> + <xsl:value-of select="@src"/> + </xsl:attribute> + <font size="+1" color="#990000"><b><xsl:value-of select="@name"/></b></font> + </a> + </xsl:if> + + <xsl:if test="not(@src != '')"> + <font size="+1" color="#990000"><b><xsl:value-of select="@name"/></b></font> + </xsl:if> + <br/> + <small> + <xsl:apply-templates select="link"/> + </small> + </p> + </xsl:for-each> + </xsl:template> + + <!-- template: "link" generates links inside of category --> + <xsl:template match="link"> + · + <a> + <xsl:attribute name="href"> + <xsl:value-of select="@src"/> + </xsl:attribute> + <xsl:value-of select="@name"/></a><br/> + </xsl:template> + <!-- template: "html-index-mirrors-options-list" generates mirror sites list in index.html --> --- includes.misc.xsl.diff ends here --- --- index.xsl.orig Mon Dec 22 23:58:25 2003 +++ index.xsl Tue Dec 23 00:04:08 2003 @@ -101,105 +101,9 @@ bgcolor="#ffcc66" width="100%"> <tr> <td> - <p> - <a href="platforms/index.html"> - <font size="+1" color="#990000"><b>Platforms</b></font> - </a><small><br/> - · <a href="smp/index.html">i386</a><br/> - · <a href="platforms/alpha.html">Alpha</a><br/> - · <a href="platforms/ia64/index.html">IA-64</a><br/> - · <a href="platforms/amd64.html">AMD64</a><br/> - · <a href="platforms/sparc.html">Sparc64</a><br/> - · <a href="platforms/index.html">More?</a><br/> - </small></p> - - <p><font size="+1" color="#990000"><b>Software</b></font> - <small><br/> - · <a href="{$base}/doc/en_US.ISO8859-1/books/handbook/mirrors.html">Getting FreeBSD</a><br/> - · <a href="releases/index.html">Release Information</a><br/> - · <a href="{$base}/ports/index.html">Ported Applications</a><br/> - </small></p> - - <p> - <a href="docs.html"> - <font size="+1" color="#990000"><b>Documentation</b></font> - </a><small><br/> - · <a href="{$base}/doc/en_US.ISO8859-1/books/faq/index.html">FAQ</a><br/> - · <a href="{$base}/doc/en_US.ISO8859-1/books/handbook/index.html">Handbook</a><br/> - · <a href="http://www.FreeBSD.org/cgi/man.cgi">Manual pages</a><br/> - · <a href="projects/newbies.html">For Newbies</a><br/> - · <a href="{$base}/docproj/index.html">Doc. Project</a><br/> - </small></p> - - <p> - <a href="support.html"> - <font size="+1" color="#990000"><b>Support</b></font> - </a><small><br/> - · <a href="{$base}/support.html#mailing-list">Mailing lists</a><br/> - · <a href="{$base}/support.html#newsgroups">Newsgroups</a><br/> - · <a href="{$base}/support.html#user">User Groups</a><br/> - · <a href="{$base}/support.html#web">Web Resources</a><br/> - · <a href="security/index.html">Security</a><br/> - </small></p> - - <p> - <a href="{$base}/support.html#gnats"> - <font size="+1" color="#990000"><b>Bug Reports</b></font> - </a><small><br/> - · <a href="http://www.FreeBSD.org/cgi/query-pr-summary.cgi?query">Search</a><br/> - · <a href="http://www.FreeBSD.org/cgi/query-pr.cgi">View one bug report</a><br/> - · <a href="http://www.FreeBSD.org/cgi/query-pr-summary.cgi">View all bug reports</a><br/> - · <a href="send-pr.html">Send a bug report</a><br/> - · <a href="doc/en_US.ISO8859-1/articles/problem-reports/article.html">Writing Bug Reports</a><br/> - </small></p> - - - <p> - <a href="projects/index.html"> - <font size="+1" color="#990000"><b>Development</b></font> - </a><small><br/> - · <a href="{$base}/doc/en_US.ISO8859-1/books/developers-handbook">Developer's Handbook</a><br/> - · <a href="{$base}/doc/en_US.ISO8859-1/books/porters-handbook">Porter's Handbook</a><br/> - · <a href="{$base}/support.html#cvs">CVS Repository</a><br/> - · <a href="releng/index.html">Release Engineering</a><br/> - · <a href="{$base}/doc/en_US.ISO8859-1/articles/contributing/index.html">Contributing to FreeBSD</a><br/> - </small></p> - - <p><font size="+1" color="#990000"><b>Vendors</b></font> - <small><br/> - · <a href="{$base}/commercial/software_bycat.html">Software</a><br/> - · <a href="{$base}/commercial/hardware.html">Hardware</a><br/> - · <a href="{$base}/commercial/consulting_bycat.html">Consulting</a><br/> - · <a href="{$base}/commercial/misc.html">Misc</a><br/> - </small></p> - - <p><font size="+1" color="#990000"><b>Donations</b></font> - <small><br/> - · <a href="{$base}/donations/index.html">Donations Liaison</a><br/> - · <a href="{$base}/donations/donors.html">Current Donations</a><br/> - · <a href="{$base}/donations/wantlist.html">List of needs</a><br/> - </small></p> - - <p> - <a href="{$base}/search/index-site.html"> - <font size="+1" color="#990000"><b>This Site</b></font> - </a><small><br/> - · <a href="{$base}/search/search.html#web">Search Website</a><br/> - · <a href="{$base}/search/search.html#mailinglists">Search Mailing Lists</a><br/> - · <a href="{$base}/search/search.html">Search All</a><br/> - </small></p> - - <p> - <a href="mailto.html"> - <font size="+1" color="#990000"><b>Contacting FreeBSD</b></font> - </a> - </p> - - <p> - <a href="copyright/index.html"> - <font size="+1" color="#990000"><b>The BSD Copyright</b></font> - </a> - </p> + <xsl:call-template name="html-index-navigation-link-list"> + <xsl:with-param name="index.xml" select="$index.xml"/> + </xsl:call-template> <form action="http://www.FreeBSD.org/cgi/search.cgi" method="get"> <small>Search for:<br/> --- index.xsl.diff ends here ---