Remove plain html navigation and replace it with xml/xslt based navigation
So navigation is now maintained through navigation.xml. This makes adding links very simple now. Approved by: simon(mentor) trhodes
This commit is contained in:
parent
4b85adbd2b
commit
b0c3856a5f
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=19900
5 changed files with 128 additions and 106 deletions
|
|
@ -1,4 +1,4 @@
|
|||
# $FreeBSD: www/en/Makefile,v 1.105 2003/12/06 07:39:32 hrs Exp $
|
||||
# $FreeBSD: www/en/Makefile,v 1.106 2004/01/12 21:26:59 hrs Exp $
|
||||
.if exists(Makefile.conf)
|
||||
.include "Makefile.conf"
|
||||
.endif
|
||||
|
|
@ -105,7 +105,7 @@ webcheck:
|
|||
|
||||
index.html: index.xsl ${XML_INCLUDES}\
|
||||
${XML_NEWS_INCLUDES} ${XML_NEWS_NEWS} ${XML_NEWS_PRESS}\
|
||||
${XML_MIRRORS} ${XML_TRANSTABLE} ${XML_ADVISORIES}
|
||||
${XML_MIRRORS} ${XML_TRANSTABLE} ${XML_ADVISORIES} ${XML_NAVIGATION}
|
||||
${XSLTPROC} ${XSLTPROCOPTS} \
|
||||
-o $@ \
|
||||
--param mirrors.xml "'${XML_MIRRORS}'" \
|
||||
|
|
@ -113,6 +113,7 @@ index.html: index.xsl ${XML_INCLUDES}\
|
|||
--param news.press.xml "'${XML_NEWS_PRESS}'" \
|
||||
--param news.project.xml "'${XML_NEWS_NEWS}'" \
|
||||
--param transtable.xml "'${XML_TRANSTABLE}'" \
|
||||
--param navigation.xml "'${XML_NAVIGATION}'" \
|
||||
${.CURDIR}/index.xsl ${XML_NEWS_NEWS}
|
||||
.if !defined(NO_TIDY)
|
||||
-${TIDY} ${TIDYOPTS} ${.TARGET}
|
||||
|
|
|
|||
109
en/index.xsl
109
en/index.xsl
|
|
@ -1,4 +1,4 @@
|
|||
<!-- $FreeBSD: www/en/index.xsl,v 1.91 2004/01/02 14:07:33 blackend Exp $ -->
|
||||
<!-- $FreeBSD: www/en/index.xsl,v 1.92 2004/01/08 00:42:58 stephane Exp $ -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
<xsl:import href="news/includes.xsl"/>
|
||||
|
||||
<xsl:variable name="base" select="'.'"/>
|
||||
<xsl:variable name="date" select="'$FreeBSD: www/en/index.xsl,v 1.91 2004/01/02 14:07:33 blackend Exp $'"/>
|
||||
<xsl:variable name="date" select="'$FreeBSD: www/en/index.xsl,v 1.92 2004/01/08 00:42:58 stephane Exp $'"/>
|
||||
<xsl:variable name="title" select="'The FreeBSD Project'"/>
|
||||
|
||||
<!-- these params should be externally bound. The values
|
||||
|
|
@ -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="navigation.xml" select="$navigation.xml"/>
|
||||
</xsl:call-template>
|
||||
|
||||
<form action="http://www.FreeBSD.org/cgi/search.cgi" method="get">
|
||||
<small>Search for:<br/>
|
||||
|
|
@ -207,7 +111,8 @@
|
|||
<input type="hidden" name="max" value="25"/>
|
||||
<input type="hidden" name="source" value="www"/>
|
||||
<input type="submit" value="Go"/></small>
|
||||
</form></td>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
|
|
|||
77
en/navigation.xml
Normal file
77
en/navigation.xml
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
<?xml version="1.0"?>
|
||||
<navigation>
|
||||
<cvs:keywords xmlns:cvs="http://www.FreeBSD.org/XML/CVS" version="1.0">
|
||||
<cvs:keyword name="freebsd">
|
||||
$FreeBSD$
|
||||
</cvs:keyword>
|
||||
</cvs:keywords>
|
||||
|
||||
<category src="platforms/index.html" name="Platforms">
|
||||
<link src="smp/index.html" name="i386"/>
|
||||
<link src="platforms/alpha.html" name="Alpha"/>
|
||||
<link src="platforms/ia64/index.html" name="IA-64"/>
|
||||
<link src="platforms/amd64.html" name="AMD64"/>
|
||||
<link src="platforms/sparc.html" name="Sparc64"/>
|
||||
<link src="platforms/index.html" name="More?"/>
|
||||
</category>
|
||||
|
||||
<category src="" name="Software">
|
||||
<link src="doc/en_US.ISO8859-1/books/handbook/mirrors.html" name="Getting FreeBSD"/>
|
||||
<link src="releases/index.html" name="Release Information"/>
|
||||
<link src="ports/index.html" name="Ported Applications"/>
|
||||
</category>
|
||||
|
||||
<category src="docs.html" name="Documentation">
|
||||
<link src="doc/en_US.ISO8859-1/books/faq/index.html" name="FAQ"/>
|
||||
<link src="doc/en_US.ISO8859-1/books/handbook/index.html" name="Handbook"/>
|
||||
<link src="http://www.freebsd.org/cgi/man.cgi" name="Manual pages"/>
|
||||
<link src="projects/newbies.html" name="For Newbies"/>
|
||||
<link src="docproj/index.html" name="Doc. Project"/>
|
||||
</category>
|
||||
|
||||
<category src="support.html" name="Support">
|
||||
<link src="support.html#mailing-list" name="Mailing lists"/>
|
||||
<link src="support.html#newsgroups" name="Newsgroups"/>
|
||||
<link src="support.html#user" name="User Groups"/>
|
||||
<link src="support.html#web" name="Web Resources"/>
|
||||
<link src="security/index.html" name="Security"/>
|
||||
</category>
|
||||
|
||||
<category src="support.html#gnats" name="Bug Reports">
|
||||
<link src="http://www.freebsd.org/cgi/query-pr-summary.cgi?query" name="Search"/>
|
||||
<link src="http://www.freebsd.org/cgi/query-pr.cgi" name="View one bug report"/>
|
||||
<link src="http://www.freebsd.org/cgi/query-pr-summary.cgi" name="View all bug reports"/>
|
||||
<link src="send-pr.html" name="Send a bug report"/>
|
||||
<link src="doc/en_US.ISO8859-1/articles/problem-reports/article.html" name="Writing Bug Reports"/>
|
||||
</category>
|
||||
|
||||
<category src="projects/index.html" name="Development">
|
||||
<link src="doc/en_US.ISO8859-1/books/developers-handbook" name="Developer's Handbook"/>
|
||||
<link src="doc/en_US.ISO8859-1/books/porters-handbook" name="Porter's Handbook"/>
|
||||
<link src="support.html#cvs" name="CVS Repository"/>
|
||||
<link src="releng/index.html" name="Release Engineering"/>
|
||||
<link src="doc/en_US.ISO8859-1/articles/contributing/index.html" name="Contributing to FreeBSD"/>
|
||||
</category>
|
||||
|
||||
<category src="" name="Vendors">
|
||||
<link src="commercial/software_bycat.html" name="Software"/>
|
||||
<link src="commercial/hardware.html" name="Hardware"/>
|
||||
<link src="commercial/consulting_bycat.html" name="Consulting"/>
|
||||
<link src="commercial/misc.html" name="Misc"/>
|
||||
</category>
|
||||
|
||||
<category src="" name="Donations">
|
||||
<link src="donations/index.html" name="Donations Liaison"/>
|
||||
<link src="donations/donors.html" name="Current Donations"/>
|
||||
<link src="donations/wantlist.html" name="List of needs"/>
|
||||
</category>
|
||||
|
||||
<category src="search/index-site.html" name="This Site">
|
||||
<link src="search/search.html#web" name="Search Website"/>
|
||||
<link src="search/search.html#mailinglists" name="Search Mailing Lists"/>
|
||||
<link src="search/search.html" name="Search All"/>
|
||||
</category>
|
||||
|
||||
<category src="mailto.html" name="Contacting FreeBSD"/>
|
||||
<category src="copyright/index.html" name="The BSD Copyright"/>
|
||||
</navigation>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
# bsd.web.mk
|
||||
# $FreeBSD: www/share/mk/web.site.mk,v 1.49 2003/11/25 15:12:42 hrs Exp $
|
||||
# $FreeBSD: www/share/mk/web.site.mk,v 1.50 2004/01/12 21:27:00 hrs Exp $
|
||||
|
||||
#
|
||||
# Build and install a web site.
|
||||
|
|
@ -111,6 +111,8 @@ XML_NEWS_PRESS= ${WEB_PREFIX}/${WWW_LANGCODE}/news/press.xml
|
|||
XML_NEWS_INCLUDES_MASTER= ${WEB_PREFIX}/en/news/includes.xsl
|
||||
XML_NEWS_INCLUDES= ${WEB_PREFIX}/${WWW_LANGCODE}/news/includes.xsl
|
||||
|
||||
XML_NAVIGATION= ${WEB_PREFIX}/en/navigation.xml
|
||||
|
||||
XML_INCLUDES= ${WEB_PREFIX}/${WWW_LANGCODE}/includes.xsl
|
||||
XML_INCLUDES+= ${WEB_PREFIX}/share/sgml/includes.header.xsl
|
||||
XML_INCLUDES+= ${WEB_PREFIX}/share/sgml/includes.misc.xsl
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
|
||||
<!-- $FreeBSD: www/share/sgml/includes.misc.xsl,v 1.5 2004/01/17 18:58:07 hrs Exp $ -->
|
||||
<!-- $FreeBSD: www/share/sgml/includes.misc.xsl,v 1.6 2004/01/24 12:10:02 hrs Exp $ -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
|
||||
|
|
@ -212,6 +212,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="navigation.xml" select="''" />
|
||||
<xsl:for-each select="document($navigation.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 -->
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue