checkstyle/src/xdocs/stylesheets/site.vsl

337 lines
10 KiB
Plaintext

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- Content Stylesheet for Site -->
## Defined variables
#set ($bodybg = "#ffffff")
#set ($bodyfg = "#000000")
#set ($bodylink = "#525D76")
#set ($titlebg = "#FFFFFF")
#set ($titlefg = "#2222AA")
## #set ($bannerbg = "#525D76")
#set ($bannerbg = "#FFFFFF")
#set ($bannerfg = "#2222AA")
#set ($subbannerbg = "#828DA6")
#set ($subbannerfg = "#ffffff")
<!-- start the processing -->
#document()
<!-- end the processing -->
## This is where the macro's live
#macro ( table $table)
<table>
#set ($rowcount = 0)
#foreach ( $items in $table.getChildren() )
#if ($!rowcount == 0)
#set ($trclass = "even")
#else
#set ($trclass = "odd")
#end
#if ($items.getName().equals("tr"))
#tr ($items $trclass)
#end
#set ($rowcount = ($rowcount + 1) % 2)
#end
</table>
#end
#macro ( tr $tr $trclass)
<tr class="$trclass">
#foreach ( $items in $tr.getChildren() )
#if ($items.getName().equals("td"))
#td ($items $trclass)
#elseif ($items.getName().equals("th"))
#th ($items)
#end
#end
</tr>
#end
#macro ( td $value $trclass)
<td class="$!trclass"
#if ($value.getAttributeValue("colspan"))
#set ($colspan = $value.getAttributeValue("colspan"))
colspan="${value.getAttributeValue("colspan")}"
#end
#if ($value.getAttributeValue("rowspan"))
#set ($rowspan = $value.getAttributeValue("rowspan"))
rowspan="${value.getAttributeValue("rowspan")}"
#end
>
#if ($value.getText().length() != 0 || $value.hasChildren())
$value.getContent()
#else
&nbsp;
#end
</td>
#end
#macro ( th $value)
<th valign="top" align="left"
#if ($value.getAttributeValue("colspan"))
#set ($colspan = $value.getAttributeValue("colspan"))
colspan="${value.getAttributeValue("colspan")}"
#end
#if ($value.getAttributeValue("rowspan"))
#set ($rowspan = $value.getAttributeValue("rowspan"))
rowspan="${value.getAttributeValue("rowspan")}"
#end
>
#if ($value.getText().length() != 0 || $value.hasChildren())
$value.getContent()
#else
&nbsp;
#end
</th>
#end
#macro ( projectanchor $name $value $indent)
#if ($value.startsWith("http://"))
<a href="$value">${indent}$name</a>
#else
<a href="$relativePath$value">${indent}$name</a>
#end
#end
#macro ( metaauthor $author $email )
<meta name="author" content="$author">
<meta name="email" content="$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")" width="$!width" height="$!height" align="$!align">
#end
#macro ( source $value)
<div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#ffffff"><pre>$escape.getText($value.getText().trim())</pre></td>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
</table>
</div>
#end
## ============================================
## subsection macro
## ============================================
#macro ( subsection $subsection)
<h3>$subsection.getAttributeValue("name")</h3>
#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
$items
#end
#end
#end
## ===================================
## titleSection macro
## ===================================
#macro ( titleSection $titleSection)
<font size="+2" color="$titlefg"><b>$titleSection.getAttributeValue("name")</b></font>
#end
## ================================
## section macro
## ================================
#macro ( section $section)
<a id="$section.getAttributeValue("name")"></a>
<h2>$section.getAttributeValue("name")</h2>
#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
$items
#end
#end
#end
## ===================================
## make navigation bar
## ===================================
#macro ( makeNavigationMenu $menu $indentStr)
#foreach ( $item in $menu.getChildren() )
#set ($name = $item.getAttributeValue("name"))
#if ( $name.equalsIgnoreCase($docname) )
<li><b>#projectanchor($name $item.getAttributeValue("href") ${indentStr})</b></li>
#else
<li>#projectanchor($name $item.getAttributeValue("href") ${indentStr})</li>
#end
#if ( $name.equalsIgnoreCase($docname) )
#foreach ( $candidate in $root.getChild("body").getChildren() )
#if ($candidate.getName().equals("section"))
#set ($sectionName = $candidate.getAttributeValue("name"))
<li><a href="#$sectionName">${indentStr}&nbsp;&nbsp;&nbsp;$sectionName</a></li>
#end
#end
#end
#makeNavigationMenu ($item "${indentStr}&nbsp;&nbsp;&nbsp;")
#end
#end
#macro ( makeNavigationBar )
<!-- ============================================================ -->
<!-- start makeNavigationBar -->
#set ($menus = $project.getChild("body").getChildren("menu"))
#set ($docname = $root.getChild("properties").getChild("title").getText())
<ul>
#foreach ( $menu in $menus )
<li>
<strong>$menu.getAttributeValue("name")</strong>
</li>
#makeNavigationMenu ($menu "")
#end
</ul>
<ul>
<li>
<strong>Hosted by:</strong>
<div align="center">
<p><a href="http://sourceforge.net">
<img src="http://sourceforge.net/sflogo.php?group_id=29721&amp;type=1" width="88" height="31" alt="SourceForge Logo"/></a>
</p>
</div>
</li>
</ul>
<!-- end makeNavigationBar -->
<!-- ============================================================ -->
#end
#macro (printMeta $metaElement)
<meta #set ($attribs = $metaElement.getAttributes())
#foreach ($a in $attribs) $a.getName()="$a.getValue()" #end />
#end
#macro (document)
<!-- ====================================================================== -->
<!-- GENERATED FILE, DO NOT EDIT, EDIT THE XML FILE IN xdocs INSTEAD! -->
<!-- Main Page Section -->
<!-- ====================================================================== -->
<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" />
#set ($authors = $root.getChild("properties").getChildren("author"))
#foreach ( $au in $authors )
#metaauthor ( $au.getText() $au.getAttributeValue("email") )
#end
#set ($metas = $root.getChildren("meta"))
## Parse meta directives such as
## <meta name="keyword" content="jakarta, java"/>
#foreach ($meta in $metas) #printMeta($meta) #end
## Support for <base> tags.
#if ($root.getChild("properties").getChild("base"))
#set ($url = $root.getChild("properties").getChild("base").getAttributeValue("href"))
<base href="$url"/>
#end
<title>$project.getChild("title").getText() - $root.getChild("properties").getChild("title").getText()</title>
<style type="text/css" media="all">
@import url("$relativePath/css/cs-layout.css");
@import url("$relativePath/css/cs-style.css");
</style>
</head>
<body>
<div class="csTopBar">
<div class="csTopBarContents">
<div class="csLeft">
<h1>$root.getChild("properties").getChild("title").getText()</h1>
</div>
<div class="csRight">
<a href="http://checkstyle.sourceforge.net/">
<img src="images/logo.png" alt="Checkstyle Logo" height="70"/>
</a>
</div>
</div>
</div>
<div class="csMiddleContainer">
<div class="csLeftBar">
<div class="csLeftBarContents">
#makeNavigationBar()
</div>
</div>
<div class="csMain">
#foreach ( $item in $root.getChild("body").getChildren() )
#if ($item.getName().equals("img"))
#image ($item)
#elseif ($item.getName().equals("section"))
#section ($item)
#elseif ($item.getName().equals("source"))
#source ($item)
#elseif ($item.getName().equals("table"))
#table ($item)
#elseif ($item.getName().equals("subsection"))
#subsection ($item)
#else
$item
#end
#end
</div>
</div>
<div class="csBottomBar">
<div class="csBottomBarContents">
Copyright &copy; 2001-2007, Oliver Burn
</div>
</div>
</body>
</html>
#end