From 9378601a456c8a53966f30220beaa76b20d38c45 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Thu, 15 Mar 2001 10:31:36 +0000 Subject: [PATCH] adapt to new Anakia version git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268834 13f79535-47bb-0310-9956-ffa450edef68 --- webpage/build.xml | 2 +- webpage/docs/antnews.html | 1 - webpage/docs/external.html | 185 +++++++------------- webpage/docs/index.html | 1 - webpage/xdocs/stylesheets/site.vsl | 268 +++++++++++++++++++++++++++++ webpage/xdocs/velocity.properties | 2 - 6 files changed, 333 insertions(+), 126 deletions(-) create mode 100644 webpage/xdocs/stylesheets/site.vsl delete mode 100644 webpage/xdocs/velocity.properties diff --git a/webpage/build.xml b/webpage/build.xml index f4199a412..fe3dfc253 100644 --- a/webpage/build.xml +++ b/webpage/build.xml @@ -36,7 +36,7 @@ excludes="**/stylesheets/** empty.xml" includes="**/*.xml" lastModifiedCheck="true" - velocityPropertiesFile="${docs.src}/velocity.properties"> + templatePath="./xdocs/stylesheets"> + + ## Defined variables + #set ($bodybg = "#ffffff") + #set ($bodyfg = "#000000") + #set ($bodylink = "#525D76") + #set ($bannerbg = "#525D76") + #set ($bannerfg = "#ffffff") + #set ($subbannerbg = "#828DA6") + #set ($subbannerfg = "#ffffff") + #set ($tablethbg = "#039acc") + #set ($tabletdbg = "#a0ddf0") + + +#document() + + +## This is where the macro's live + +#macro ( table $table) + + #foreach ( $items in $table.getChildren() ) + #if ($items.getName().equals("tr")) + #tr ($items) + #end + #end +
+#end + +#macro ( tr $tr) + + #foreach ( $items in $tr.getChildren() ) + #if ($items.getName().equals("td")) + #td ($items) + #elseif ($items.getName().equals("th")) + #th ($items) + #end + #end + +#end + +#macro ( td $value) +#if ($value.getAttributeValue("colspan")) +#set ($colspan = $value.getAttributeValue("colspan")) +#end +#if ($value.getAttributeValue("rowspan")) +#set ($rowspan = $value.getAttributeValue("rowspan")) +#end + + + #if ($value.getText().length() != 0 || $value.hasChildren()) + $xmlout.outputString($value, true) + #else +   + #end + + +#end + +#macro ( th $value) +#if ($value.getAttributeValue("colspan")) +#set ($colspan = $value.getAttributeValue("colspan")) +#end +#if ($value.getAttributeValue("rowspan")) +#set ($rowspan = $value.getAttributeValue("rowspan")) +#end + + + #if ($value.getText().length() != 0 || $value.hasChildren()) + $xmlout.outputString($value, true) + #else +   + #end + + +#end + +#macro ( projectanchor $name $value ) +#if ($value.startsWith("http://")) + $name +#elseif ($value.startsWith("/site")) + $name +#else + $name +#end +#end + +#macro ( metaauthor $author $email ) + + +#end + +#macro ( image $value ) +#if ($value.getAttributeValue("width")) +#set ($width=$value.getAttributeValue("width")) +#end +#if ($value.getAttributeValue("height")) +#set ($height=$value.getAttributeValue("height")) +#end +#if ($value.getAttributeValue("align")) +#set ($align=$value.getAttributeValue("align")) +#end + +#end + +#macro ( source $value) +
+ + + + + + + + + + + + + + + + +
$escape.getText($value.getText())
+
+#end + +#macro ( subsection $subsection) + + + +
+ + $subsection.getAttributeValue("name") + +
+
+ #foreach ( $items in $subsection.getChildren() ) + #if ($items.getName().equals("img")) + #image ($items) + #elseif ($items.getName().equals("source")) + #source ($items) + #elseif ($items.getName().equals("table")) + #table ($items) + #else + $xmlout.outputString($items) + #end + #end +
+
+#end + +#macro ( section $section) + + + +
+ + $section.getAttributeValue("name") + +
+
+ #foreach ( $items in $section.getChildren() ) + #if ($items.getName().equals("img")) + #image ($items) + #elseif ($items.getName().equals("source")) + #source ($items) + #elseif ($items.getName().equals("table")) + #table ($items) + #elseif ($items.getName().equals("subsection")) + #subsection ($items) + #else + $xmlout.outputString($items) + #end + #end +
+
+#end + +#macro ( makeProject ) + #set ($menus = $project.getChild("body").getChildren("menu")) + #foreach ( $menu in $menus ) +

$menu.getAttributeValue("name")

+ + #end +#end + +#macro (getProjectImage) +#if ($project.getChild("logo")) + + + + +#set ( $logoString = $project.getChild("logo").getAttributeValue("href") ) +#if ( $logoString.startsWith("/") ) +$project.getChild( +#else +$project.getChild( +#end + +#else + + + +#end +#end + +#macro (document) + + + + + + + + #set ($authors = $root.getChild("properties").getChildren("author")) + #foreach ( $au in $authors ) + #metaauthor ( $au.getText() $au.getAttributeValue("email") ) + #end + + $project.getChild("title").getText() - $root.getChild("properties").getChild("title").getText() + + + + + + + #getProjectImage() + +
+ + + + + + + + + + + + +
+
+
+ #makeProject() + + #set ($allSections = $root.getChild("body").getChildren("section")) + #foreach ( $section in $allSections ) + #section ($section) + #end +
+
+
+
+ Copyright © 1999-2001, Apache Software Foundation +
+
+ + +#end diff --git a/webpage/xdocs/velocity.properties b/webpage/xdocs/velocity.properties deleted file mode 100644 index d4cee773d..000000000 --- a/webpage/xdocs/velocity.properties +++ /dev/null @@ -1,2 +0,0 @@ -resource.loader.1.resource.path = ../../jakarta-site2/xdocs/stylesheets -template.loader.1.template.path = ../../jakarta-site2/xdocs/stylesheets