Date: Tue, 23 Dec 2003 00:23:58 +0100 (CET) From: Josef El-Rayes <josef@daemon.li> To: FreeBSD-gnats-submit@FreeBSD.org Subject: www/60517: [patch] xml'ify frontpage navigation bar Message-ID: <20031222232358.61C775C1@jenny.daemon.li> Resent-Message-ID: <200312222340.hBMNeH0A095838@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 60517 >Category: www >Synopsis: [patch] xml'ify frontpage navigation bar >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-www >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Mon Dec 22 15:40:16 PST 2003 >Closed-Date: >Last-Modified: >Originator: Josef El-Rayes >Release: FreeBSD 4.9-STABLE i386 >Organization: >Environment: System: FreeBSD jenny.daemon.li 4.9-STABLE FreeBSD 4.9-STABLE #5: Sun Nov 16 23:10:01 CET 2003 josef@jenny.daemon.li:/usr/obj/usr/src/sys/JENNY i386 >Description: This patch converts the html navigation bar in a xml powered navigation bar, which makes maintaining the links much easier and more powerful. >How-To-Repeat: >Fix: --- Makefile.diff begins here --- --- Makefile.orig Mon Dec 22 23:58:47 2003 +++ Makefile Mon Dec 22 23:52:26 2003 @@ -105,13 +105,14 @@ index.html: index.xsl ${XML_INCLUDES}\ ${XML_NEWS_INCLUDES} ${XML_NEWS_NEWS} ${XML_NEWS_PRESS}\ - ${XML_MIRRORS} ${XML_ADVISORIES} + ${XML_MIRRORS} ${XML_ADVISORIES} ${XML_NAVIGATION} ${XSLTPROC} ${XSLTPROCOPTS} \ -o $@ \ --param mirrors.xml "'${XML_MIRRORS}'" \ --param advisories.xml "'${XML_ADVISORIES}'" \ --param news.press.xml "'${XML_NEWS_PRESS}'" \ --param news.project.xml "'${XML_NEWS_NEWS}'" \ + --param index.xml "'${XML_NAVIGATION}'" \ ${.CURDIR}/index.xsl ${XML_NEWS_NEWS} .if !defined(NO_TIDY) -${TIDY} ${TIDYOPTS} ${.TARGET} --- Makefile.diff ends here --- --- includes.misc.xsl.diff begins here --- --- 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.xml begins here --- <?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="http://www.FreeBSD.org/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="http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/faq/index.html" name="FAQ"/> <link src="http://www.FreeBSD.org/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="http://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/problem-reports/article.html" name="Writing Bug Reports"/> </category> <category src="projects/index.html" name="Development"> <link src="http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/developers-handbook" name="Developer's Handbook"/> <link src="http://www.FreeBSD.org/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="http://www.FreeBSD.org/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="" 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> --- index.xml ends here --- --- index.xsl.diff begins 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 --- --- web.site.mk.diff begins here --- --- web.site.mk.orig Mon Dec 22 23:57:41 2003 +++ web.site.mk Mon Dec 22 23:52:08 2003 @@ -90,6 +90,8 @@ 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/index.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 --- web.site.mk.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031222232358.61C775C1>