donaldp 2002/06/22 03:50:27
Added: src/xdocs/stylesheets changes.vsl docs.vsl project.xml
templates.vm velocity.properties
Log:
Add in anakia stylesheets.
Revision Changes Path
1.1
jakarta-avalon-cornerstone/src/xdocs/stylesheets/changes.vsl
Index: changes.vsl
===================================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
#parse( "templates.vm" )
<!-- Content Stylesheet for Site -->
## 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")
#set ($pound = "#" )
<!-- start the processing -->
#changes()
<!-- end the processing -->
#macro (change $action)
<p>$action.getText() ($action.getAttributeValue("dev"))</p>
#end
#macro (changeset $release)
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="$subbannerbg">
<font color="$subbannerfg" face="arial,helvetica,sanserif">
<strong>
Revision $release.getAttributeValue("version")
($release.getAttributeValue("date"))
</strong>
</font>
</td></tr>
<tr><td>
<blockquote>
<ul>
#foreach ($action in $release.getChildren("action"))
<li>#change ($action)</li>
#end
</ul>
</blockquote>
</td></tr>
</table>
</a>
#end
#macro (changes)
#header
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="$bannerbg">
<font color="$bannerfg" face="arial,helvetica,sanserif">
<strong>ChangeLog</strong>
</font>
</td></tr>
<tr><td>
<blockquote>
#set ($releases = $root.getChildren("release"))
#foreach ( $release in $releases )
#changeset ($release)
#end
</blockquote>
</td></tr>
</table>
#footer
#end
1.1 jakarta-avalon-cornerstone/src/xdocs/stylesheets/docs.vsl
Index: docs.vsl
===================================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
#macro (document)
#header
#set ($allSections = $root.getChild("body").getChildren("section"))
#foreach ( $section in $allSections )
#section ($section)
#end
#footer
#end
#macro ( subsection $subsection)
<div class="h4">
#if ( $subsection.getAttributeValue("anchor") )
#set ($anchor = $subsection.getAttributeValue("anchor"))
#else
#set ($anchor = $subsection.getAttributeValue("name"))
#end
<h4><a name="$anchor">$subsection.getAttributeValue("name")</a></h4>
#foreach ( $items in $subsection.getChildren() )
#copy($items)
#end
</div>
#end
#macro (section $section)
<div class="h3">
#if ( $section.getAttributeValue("anchor") )
#set ($anchor = $section.getAttributeValue("anchor"))
#else
#set ($anchor = $section.getAttributeValue("name"))
#end
<h3><a name="$anchor">$section.getAttributeValue("name")</a></h3>
#foreach ( $items in $section.getChildren() )
#if ($items.getName().equals("subsection"))
#subsection ($items)
#else
#copy($items)
#end
#end
</div>
#end
#parse ( "templates.vm" )
<!-- This is a generated file. Do not edit. -->
#document()
1.1
jakarta-avalon-cornerstone/src/xdocs/stylesheets/project.xml
Index: project.xml
===================================================================
<?xml version="1.0"?>
<project
name="Cornerstone"
href="http://jakarta.apache.org/avalon/cornerstone">
<title>Cornerstone</title>
<body>
<item name="Back to Avalon" href="http://jakarta.apache.org/avalon"/>
<menu name="About">
<item name="Overview" href="/index.html"/>
<item name="Download"
href="http://jakarta.apache.org/builds/jakarta-avalon/release/cornerstone"/>
<item name="Changes" href="/changes.html"/>
<item name="API Docs" href="/api/index.html"/>
</menu>
</body>
</project>
1.1
jakarta-avalon-cornerstone/src/xdocs/stylesheets/templates.vm
Index: templates.vm
===================================================================
#macro (header)
<html>
<head>
<style type="text/css">
@import url("$relativePath/css/tigris.css");
@import url("$relativePath/css/site.css");
</style>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1"/>
#set ($authors = $root.getChild("properties").getChildren("author"))
#foreach ( $au in $authors )
#metaauthor ( $au.getText() $au.getAttributeValue("email") )
#end
<title>$project.getChild("title").getText() -
$root.getChild("properties").getChild("title").getText()</title>
</head>
<body marginwidth="0" marginheight="0" class="composite">
<div id="banner">
<table border="0" cellspacing="0" cellpadding="8" width="100%">
<!-- TOP IMAGE -->
<tr>
<td>#getProjectImage()</td>
<td><div align="right" valign="bottom"><b><font
size="+3">$project.getChild("title").getText()</font></b></div></td>
</tr>
</table>
</div>
<table border="0" cellspacing="0" cellpadding="8" width="100%"
id="main">
<tr valign="top">
<!-- LEFT SIDE NAVIGATION -->
<td id="leftcol" width="20%">
<div id="navcolumn">
#makeProject()
</div>
</td>
<td><div id="bodycol"><div class="app">
#end
#macro (footer)
</div>
#getAuthorList()
</div></td>
</tr>
</table>
<!-- FOOTER -->
<div id="footer">
<table border="0" cellspacing="0" cellpadding="4">
<tr>
<td>Copyright © 1999-2002, Apache Software Foundation</td>
</tr>
</table>
</div>
</body>
</html>
#end
#macro ( subsection $subsection)
<div class="h4">
#if ( $subsection.getAttributeValue("anchor") )
#set ($anchor = $subsection.getAttributeValue("anchor"))
#else
#set ($anchor = $subsection.getAttributeValue("name"))
#end
<h4><a name="$anchor">$subsection.getAttributeValue("name")</a></h4>
#foreach ( $items in $subsection.getChildren() )
#copy($items)
#end
</div>
#end
#macro (section $section)
<div class="h3">
#if ( $section.getAttributeValue("anchor") )
#set ($anchor = $section.getAttributeValue("anchor"))
#else
#set ($anchor = $section.getAttributeValue("name"))
#end
<h3><a name="$anchor">$section.getAttributeValue("name")</a></h3>
#foreach ( $items in $section.getChildren() )
#if ($items.getName().equals("subsection"))
#subsection ($items)
#else
#copy($items)
#end
#end
</div>
#end
#macro ( table $table)
#set ($rowcount = 1)
<table cellpadding="3" cellspacing="2" border="1" width="100%">
#foreach ( $items in $table.getChildren() )
#if ($items.getName().equals("tr"))
#tr ($items)
#end
#end
</table>
#end
#macro ( tr $tr)
#printRow ($rowcount)
#set ($rowcount = $rowcount + 1)
#foreach ( $items in $tr.getChildren() )
#if ($items.getName().equals("td"))
#td ($items)
#elseif ($items.getName().equals("th"))
#th ($items)
#end
#end
</tr>
#end
#macro (printRow $count)
#if ($count % 2 > 0)
<tr class="a">
#else
<tr class="b">
#end
#end
#macro ( td $value)
<td
#if ($value.getAttributeValue("colspan"))
#set ($colspan = $value.getAttributeValue("colspan"))
colspan="$!colspan"
#end
#if ($value.getAttributeValue("rowspan"))
#set ($rowspan = $value.getAttributeValue("rowspan"))
rowspan="$!rowspan"
#end
>
#if ($value.getText().length() != 0 || $value.hasChildren())
#copycontent($value)
#else
#end
</td>
#end
#macro ( th $value)
<th
#if ($value.getAttributeValue("colspan"))
#set ($colspan = $value.getAttributeValue("colspan"))
colspan="$!colspan"
#end
#if ($value.getAttributeValue("rowspan"))
#set ($rowspan = $value.getAttributeValue("rowspan"))
rowspan="$!rowspan"
#end
>
#if ($value.getText().length() != 0 || $value.hasChildren())
#copycontent($value)
#else
#end
</th>
#end
#macro ( anchor $name $value )
#if ($value.startsWith("http://"))
<a href="$value">$name</a>
#elseif ($value.startsWith("/site"))
<a href="http://jakarta.apache.org$value">$name</a>
#elseif ( $value.startsWith("/") )
<a href="$relativePath$value">$name</a>
#else
<a href="$value">$name</a>
#end
#end
#macro ( metaauthor $author $email )
<meta name="author" value="$author">
<meta name="email" value="$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
<img src="$relativePath$value.getAttributeValue("src")">
#end
#macro ( source $value)
<div id="source">
<pre>$escape.getText( $value.text.trim() )</pre>
</div>
#end
#macro ( makeProject )
#set ($menus = $project.getChild("body").getChildren("menu"))
#foreach ( $menu in $menus )
<div>
<strong>$menu.getAttributeValue("name")</strong>
#foreach ( $item in $menu.getChildren() )
#set ($name = $item.getAttributeValue("name"))
<div><small>#anchor($name
$item.getAttributeValue("href"))</small></div>
#end
</div>
#end
#end
#macro (getProjectImage)
#if ($project.getChild("logo"))
<td align="left">
<a href="http://jakarta.apache.org"><img
src="http://jakarta.apache.org/images/jakarta-logo.gif" border="0"/></a>
</td>
<td align="right">
#set ( $logoString = $project.getChild("logo").getAttributeValue("href") )
#if ( $logoString.startsWith("/") )
<a href="$project.getAttributeValue("href")"><img
src="$relativePath$logoString" alt="$project.getChild("logo").getText()"
border="0"/></a>
#else
<a href="$project.getAttributeValue("href")"><img
src="$relativePath/$logoString" alt="$project.getChild("logo").getText()"
border="0"/></a>
#end
</td>
#else
<td colspan="2">
<a href="http://jakarta.apache.org"><img
src="http://jakarta.apache.org/images/jakarta-logo.gif" align="left"
border="0"/></a>
</td>
#end
#end
#macro (copy $element)
#if ( $element.name == "a" )
#anchor ( $element.content $element.getAttributeValue( "href" ) )
#elseif ( $element.name == "img" )
#image ($element)
#elseif ( $element.name == "source" )
#source ($element)
#elseif ( $element.name == "table" )
#table ($element)
#elseif ( $element.name == "pre" )
<pre>$element.content</pre>
#elseif ( $element.name == "escaped" )
$element.text
#else
<$element.name
#foreach ( $attr in $element.attributes )
$attr.name="$attr.value"
#end
>#copycontent($element)</$element.name>
#end
#end
#macro (getAuthorList)
<div align="right" id="authors">
#set ($authors = $root.getChild("properties").getChildren("author"))
#foreach ( $au in $authors )
#if( $velocityCount == 1 )by #end
#if( $velocityCount != 1 ),#end <a
href="$au.getAttributeValue("email")">$au.getText()</a>
#end
</div>
#end
#macro (copycontent $element)
#if ( $element.children.size() > 0 )
#foreach ( $child in $element.content )
#if ( $child.class.name.endsWith( "Element" ) )
#copy( $child )
#else
$escape.getText( $child.getText() )
#end
#end
#else
$element.content
#end
#end
1.1
jakarta-avalon-cornerstone/src/xdocs/stylesheets/velocity.properties
Index: velocity.properties
===================================================================
file.resource.loader.path=src/xdocs/stylesheets
# disable this for now velocimacro.library=templates.vm
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>