From 0f435c0f6bec0bc18cb1376fd864b0c9c4d8c339 Mon Sep 17 00:00:00 2001 From: Christoph Wilhelms Date: Mon, 10 Feb 2003 08:20:18 +0000 Subject: [PATCH] Prepared "FakeForrest" to handle "tabs" in Navigation, enabled the stylesheet to allow sub-directories, prepared everything for a "Projects" tab for Ant-subprojects like Antidote. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274028 13f79535-47bb-0310-9956-ffa450edef68 --- xdocs/stylesheets/project.xml | 84 ++++++++++++--------- xdocs/stylesheets/site.vsl | 1 + xdocs/stylesheets/templates.vm | 133 +++++++++++++++++++++++---------- 3 files changed, 141 insertions(+), 77 deletions(-) diff --git a/xdocs/stylesheets/project.xml b/xdocs/stylesheets/project.xml index 316611c70..77873f13c 100644 --- a/xdocs/stylesheets/project.xml +++ b/xdocs/stylesheets/project.xml @@ -3,47 +3,59 @@ Apache Ant Apache Ant - + - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - - + + + + - - - - - - + + + + + + - - - - - - + + + + + + + diff --git a/xdocs/stylesheets/site.vsl b/xdocs/stylesheets/site.vsl index 17cc57301..5127b62d6 100644 --- a/xdocs/stylesheets/site.vsl +++ b/xdocs/stylesheets/site.vsl @@ -55,6 +55,7 @@ #set ($lightfg = "#ffffff") #set ($darkfg = "#000000") #set ($active = "#ffcc00") + #set ($blue4 = "#B2C4E0") #set ($blue3 = "#294563") #set ($blue2 = "#4C6C8F") #set ($blue1 = "#CFDCED") diff --git a/xdocs/stylesheets/templates.vm b/xdocs/stylesheets/templates.vm index 52b3baa71..15c034420 100644 --- a/xdocs/stylesheets/templates.vm +++ b/xdocs/stylesheets/templates.vm @@ -150,8 +150,71 @@
$escape.getText($value.getText())
#end -#macro ( makeProject ) - #set ($menus = $project.getChild("body").getChildren("menu")) +#macro ( makeTabs ) +
+ + + #set ( $tabs = $project.getChild("body").getChildren("menusection")) + #if ( $project.getChild("body").getChild("menusection") ) + #foreach ( $tab in $tabs ) + #set ($currentIndex = $root.getChild("properties").getChild("index").getAttributeValue("value") ) + #set ($index = $tab.getAttributeValue("index")) + #set ($name = $tab.getAttributeValue("name")) + #set ($link = $tab.getAttributeValue("href")) + #if ( ($currentIndex && $currentIndex.trim().equals( $index )) || ((!$currentIndex) && $velocityCount == 1) ) + + #else + + #end + #end + #else + + #end + +
+ + + + +
$name
+
+ + + + +
$name
+
+ + + + +
Home
+
+
+#end + + +#macro ( makeMainNavigation ) + #set ( $tabs = $project.getChild("body").getChildren("menusection")) + #if ( $project.getChild("body").getChild("menusection") ) + #set ( $currentIndex = $root.getChild("properties").getChild("index").getAttributeValue("value") ) + #if ( $currentIndex ) + #foreach ( $tab in $tabs ) + #set ($index = $tab.getAttributeValue("index")) + #if ( $currentIndex.trim().equals( $index ) ) + #set ($menus = $tab.getChildren("menu")) + #end + #end + #else + #set ($menus = $project.getChild("body").getChild("menusection").getChildren("menu")) + #end + #else + #set ($menus = $project.getChild("body").getChildren("menu")) + #end + #makeProject ( $menus ) +#end + +#macro ( makeProject $menus)