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,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