blob: 6e733276f44578737fa5a21843c8965560b7c1e9 [file] [log] [blame]
#set( $relative-path = "." )
#set( $body-bg = '#ffffff' )
#set( $body-fg = '#000000' )
#set( $body-link = '#525D76' )
#set( $banner-bg = '#EEEEEE')
#set( $banner-fg = '#000000')
#set( $sub-banner-bg = '#828DA6')
#set( $sub-banner-fg = '#ffffff')
#set( $table-th-bg = '#FFEEEE')
#set( $table-td-bg = '#FFEEEE')
#set( $source-color = '#CCFFFF')
#set( $source-font-size = '-1')
## Double quote for convenience
#set ($qq = '"')
## Macro to output argument if test evaluates to true
#macro(ifset $test $output)
#if ( $test )$output#end
#end
#match( "document" )
#set( $project = $node.selectSingleNode("document('/src/site/resources/project.xml')/project" ) )
<html>
<head>
<title>$project.title - $node.properties.title</title>
#foreach( $n in $node.properties.selectNodes("author") )
<meta name="author" value="$n"/>
<meta name="email" value="$n.attribute("email")" />
#end
</head>
<body bgcolor="$body-bg" text="$body-fg" link="$body-link"
alink="$body-link" vlink="$body-link">
<table border="0" width="100%" cellspacing="4">
## PAGE HEADER
<tr>
<td>
## APACHE LOGO
<a href="http://velocity.apache.org/">
<img src="http://velocity.apache.org/images/velocity_project_wide.png"
align="left" alt="The Apache Velocity Project" border="0"/>
</a>
#if( $project.logo )
#set( $alt = $project.logo )
#set( $home = $project.attribute("href") )
#set( $src = $project.logo.attribute( "href" ) )
## PROJECT LOGO
<a href="$home">
<img src="$src" align="right" alt="$alt" border="0"/>
</a>
#end
</td></tr>
## HEADER SEPARATOR
<tr>
##<td colspan="2">
<td>
<hr noshade="" size="1"/>
</td>
</tr>
<tr>
<!-- RIGHT SIDE MAIN BODY -->
<td valign="top" align="left">
$context.applyTemplates("body/section")
</td>
</tr>
<!-- FOOTER SEPARATOR -->
<tr>
<td>
<hr noshade="" size="1"/>
</td>
</tr>
<!--Navigation-->
<tr><td>
<table cellspacing="4">
$context.applyTemplates( $project, "body/menu" )
</table>
</td></tr>
<!-- FOOTER SEPARATOR -->
<tr>
<td>
<hr noshade="" size="1"/>
</td>
</tr>
<!-- PAGE FOOTER -->
<tr>
<td>
<div align="center"><font color="$body-link" size="-1"><em>
Copyright &#169; 1999-2001, Apache Software Foundation
</em></font></div>
</td></tr>
</table>
</body>
</html>
#end
#*
* Process a menu for the navigation bar
*#
#match( "menu" )
<tr><td>
<p>
<strong>$attrib.name</strong>
</p>
</td><td>
<ul>
$context.applyTemplates("item")
</ul></td></tr>
#end
#*
* Process a menu item for the navigation bar
*#
#match( "item" )
#if( $attrib.href.endsWith("$outputfilename") && !$attrib.href.startsWith("http"))
<strong>$attrib.name</strong>
#else
#if( $attrib.href.startsWith("http") )
<a href="$attrib.href">$attrib.name</a>
#else
<a href="${relative-path}$attrib.href">$attrib.name</a>
#end
#end
#end
#*
* process a documentation section
*#
#match( "section" )
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="$banner-bg">
<font color="$banner-fg" face="arial,helvetica.sanserif">
#if ( $attrib.anchor )
#set( $anchor = $attrib.anchor )
#else
#set( $anchor = $attrib.name )
#end
<a name="$anchor">
<strong>$attrib.name</strong></a></font>
</td></tr>
<tr><td>
$context.applyTemplates("*")
</td></tr>
</table>
#end
#match( "subsection" )
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<!-- Subsection heading -->
<tr><td bgcolor="$sub-banner-bg">
<font color="$sub-banner-fg" face="arial,helvetica.sanserif">
#if ( $attrib.anchor )
#set( $anchor = $attrib.anchor )
#else
#set( $anchor = $attrib.name )
#end
<a name="$anchor">
<strong>$attrib.name</strong></a></font>
</td></tr>
<!-- Subsection body -->
<tr><td>
$context.applyTemplates("*")
</td></tr>
</table>
#end
#match( "source" )
<div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
<td bgcolor="$source-color" height="1">
<img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
</td>
</tr>
<tr>
<td bgcolor="#ffffff" height="1">
<font size="$source-font-size"><pre>$toolbox.htmlescape.getText( $node.value() )</pre></font>
</td>
</tr>
<tr>
<td bgcolor="$source-color" height="1">
<img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
</td>
</tr>
</table>
</div>
#end
#match("table")
<table>
$context.applyTemplates("*")
</table>
#end
#match("tr")
<tr>
$context.applyTemplates("*")
</tr>
#end
#match( "td" )
<td bgcolor="$table-td-bg" #*
*##ifset($attrib.colspan "colspan=$qq$attrib.colspan$qq ")#*
*##ifset($attrib.rowspan "rowspan=$qq$attrib.rowspan$qq ")#*
*#valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
$node.copy( $node.children() )
</font>
</td>
#end
#match( "th" )
<td bgcolor="$table-th-bg" #*
*##ifset($attrib.colspan "colspan=$qq$attrib.colspan$qq ")#*
*##ifset($attrib.rowspan "rowspan=$qq$attrib.rowspan$qq ")#*
*#valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
$node.copy( $node.children())
</font>
</td>
#end
#match("*")
$node.copy()
#end