blob: e539eb5cbc70b95489f9f84060c3a5f75c1974f5 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
##
## Content Stylesheet for Site
##
## Defined variables
##
##
## Start and end the processing
##
#document
##
## This is where the macros live
##
## ** resource_table macro **
##
## <resource_table project="NAME_OF_PROJECT" subproject="OPTIONAL_NAME_OF_SUBPROJECT" hide_keys="true|false" replace_dev="alternate_list" board_report_id="OPTIONAL_ALTERNATIVE_BOARD_REPORT_ID">
## <mail name='MAIL_NAME(s): eg user[,issues,commits]'/>
## <jira key="OPTIONAL_KEY[,key2,...]"/> OR <bugzilla/>
## <cwiki/>
## <svn/> OR <git/>
## <no_website/>
## <no_lists/>
## <no_downloads/>
## </resource_table>
##
## Project website, downloads, board minutes (unless subproject)
## and dev mailing list are added by default.
##
#macro ( resource_table $elem)
#set ($proj = $elem.getAttributeValue("project"))
#if($elem.getAttributeValue("subproject"))
#set ($subproj = $elem.getAttributeValue("subproject"))
#set ($full_slash = "${proj}/${subproj}")
#set ($full_dash = "${proj}-${subproj}")
#set ($pluralize_user = "")
#else
#set ($subproj = '')
#set ($full_slash = "$proj")
#set ($full_dash = "$proj")
#set ($pluralize_user = "s")
#end
<table style="margin-left: auto; margin-right:auto; width:90%">
<tr>
<th>Read-only Resource</th>
<th>Link(s)</th>
</tr>
<tr>
<td>Website</td>
#if($elem.getChild("no_website"))
<td>n/a</td>
#else
<td><a href="https://${proj}.apache.org/${subproj}">${proj}.apache.org/${subproj}</a></td>
#end
</tr>
<tr>
<td>Mailing List Archives</td>
<td>
#if($elem.getChild("no_lists"))
n/a
#elseif($elem.getAttributeValue("replace_dev"))
#set ($replacedev = $elem.getAttributeValue("replace_dev"))
<a href="https://mail-archives.apache.org/mod_mbox/${full_dash}-${replacedev}/">${replacedev}</a>
#else
<a href="https://mail-archives.apache.org/mod_mbox/${full_dash}-dev/">dev</a>
#end
#set ($mail_links = $elem.getChildren("mail"))
#foreach ( $mail_link in $mail_links )
#set ($mail_name = $mail_link.getAttributeValue('name'))
#foreach ($name in $mail_name.split(","))
| <a href="https://mail-archives.apache.org/mod_mbox/${full_dash}-${name}/">${name}</a>
#end
#end
</td>
</tr>
#if($elem.getChild("jira"))
#if ($elem.getChild("jira").getAttributeValue("key"))
#set ($keys = $elem.getChild("jira").getAttributeValue("key"))
#foreach ($key in $keys.split(","))
<tr>
<td>Issue Tracker (JIRA)</td>
<td><a href="https://issues.apache.org/jira/browse/${key.toUpperCase()}/">${key.toUpperCase()}</a></td>
</tr>
#end
#else
<tr>
<td>Issue Tracker (JIRA)</td>
#if ($elem.getAttributeValue("subproject"))
<td><a href="https://issues.apache.org/jira/browse/${subproj.toUpperCase()}/">${subproj.toUpperCase()}</a></td>
#else
<td><a href="https://issues.apache.org/jira/browse/${proj.toUpperCase()}/">${proj.toUpperCase()}</a></td>
#end
</tr>
#end
#end
#if($elem.getChild("bugzilla"))
<tr>
<td>Issue Tracker (Bugzilla)</td>
#if ($elem.getAttributeValue("subproject"))
<td><a href="https://bz.apache.org/bugzilla/buglist.cgi?product=${subproj}">${subproj}</a></td>
#else
<td><a href="https://bz.apache.org/bugzilla/buglist.cgi?product=${proj}">${proj}</a></td>
#end
</tr>
#end
#if($elem.getChild("cwiki"))
#if ($elem.getChild("cwiki").getAttributeValue("key"))
#set ($keys = $elem.getChild("cwiki").getAttributeValue("key"))
#foreach ($key in $keys.split(","))
<tr>
<td>Wiki</td>
<td><a href="https://cwiki.apache.org/confluence/display/${key}/">cwiki.apache.org: ${key}</a></td>
</tr>
#end
#else
<tr>
<td>Wiki</td>
<td><a href="https://cwiki.apache.org/confluence/display/${proj}/">cwiki.apache.org: ${proj}</a></td>
</tr>
#end
#end
#if($elem.getChild("svn"))
<tr>
<td>Source Code (Subversion)</td>
<td><a href="https://svn.apache.org/repos/asf/${proj}/${subproj}">svn.apache.org/repos/asf/${proj}/${subproj}</a></td>
</tr>
#end
#if($elem.getChild("git"))
<tr>
<td>Source Code (Git)</td>
<td><a href="https://gitbox.apache.org/repos/asf#${proj}">https://gitbox.apache.org/repos/asf#${proj}</a></td>
</tr>
#end
#if (!$elem.getAttributeValue("subproject"))
<tr>
<td>Board Reports</td>
#if ($elem.getAttributeValue("board_report_id"))
#set ($br_id = $elem.getAttributeValue("board_report_id"))
<td><a href="https://whimsy.apache.org/board/minutes/${br_id}.html">Minutes</a></td>
#else
<td><a href="https://whimsy.apache.org/board/minutes/${proj}.html">Minutes</a></td>
#end
</tr>
#end
<tr>
<td>Downloads</td>
#if($elem.getChild("no_downloads"))
<td>n/a</td>
#else
<td><a href="https://archive.apache.org/dist/${full_slash}/">archive.apache.org/dist/${full_slash}/</a>
#if($elem.getAttributeValue("hide_keys"))
<!-- hiding KEYS -->
#else
| <a href="https://archive.apache.org/dist/${full_slash}/KEYS">KEYS</a>
#end
</td>
#end
</tr>
</table>
#end
##
##
#macro ( relativise $elem )
#if ($elem.getAttribute("href"))
#set ($href = $elem.getAttributeValue("href"))
#if ($href.startsWith("/"))
#set ($elem = $elem.setAttribute("href", "$relativePath$href"))
#end
#end
#if ($elem.getAttribute("src"))
#set ($href = $elem.getAttributeValue("src"))
#if ($href.startsWith("/"))
#set ($elem = $elem.setAttribute("src", "$relativePath$href"))
#end
#end
#end
##
##
#macro ( color_table $table )
#set ($table = $table.setAttribute("class", "colortable"))
#foreach ( $tw in $treeWalk.allElements($table) )
#if ($tw.getName().equals("trh"))
#set ($tw = $tw.setAttribute("align", "left"))
#set ($tw = $tw.setName("th"))
#end
#end
#if (! $table.getAttributeValue("width"))
#set ($table = $table.setAttribute("width", "100%"))
#end
$table
#end
##
#macro ( make_toc )
#set ($allSections = $root.getChild("body").getChildren("section"))
<ul>
#foreach ( $section in $allSections )
<li>#if ($section.getAttributeValue("id"))
<a href='#$section.getAttributeValue("id")'>
#end
$section.getChild("title").getText()
#if ($section.getAttributeValue("id")) </a>
#end
#if ( $section.getChildren("section").size() > 0 ) <ul>
#foreach ( $subsection in $section.getChildren("section") )
<li>#if ($subsection.getAttributeValue("id"))
<a href='#$subsection.getAttributeValue("id")'>
#end
$subsection.getChild("title").getText()
#if ($subsection.getAttributeValue("id")) </a>
#end
#if ( $subsection.getChildren("section").size() > 0 ) <ul>
#foreach ( $subsubsection in $subsection.getChildren("section") )
<li>#if ($subsubsection.getAttributeValue("id"))
<a href='#$subsubsection.getAttributeValue("id")'>
#end
$subsubsection.getChild("title").getText()
#if ($subsubsection.getAttributeValue("id")) </a>
#end
#if ( $subsubsection.getChildren("section").size() > 0 ) <ul>
#foreach ( $subsubsubsection in $subsubsection.getChildren("section") )
<li>#if ($subsubsubsection.getAttributeValue("id"))
<a href='#$subsubsubsection.getAttributeValue("id")'>
#end
$subsubsubsection.getChild("title").getText()
#if ($subsubsubsection.getAttributeValue("id")) </a>
#end
</li>
#end
</ul>
#end
</li>
#end
</ul>
#end
</li>
#end
</ul>
#end
</li>
#end
</ul>
#end
##
##
#macro ( make_note $note)
<div class="note">
$note
</div>
#end
##
##
#macro ( metaauthor $author $email )
<meta name="author" content="$author" /><meta name="email" content="$email" />
#end
##
##
#macro ( metaatom $title $url )
<link rel="alternate" title="$title" type="application/atom+xml" href="$url" />
#end
##
##
#macro ( source $value )
<div class="source"><code>$escape.getText($value.getText())</code>
</div>
#end
##
##
#macro ( eccnmatrix $matrix )
<table width="100%" border="1" class="eccnmatrix">
#foreach ( $project in $matrix.getChildren('Project') )
<tr><th colspan="4"><a href="$project.getAttributeValue('href')">$project.getChild('Name').getText()</a></th></tr>
<tr>
<th>Product Name</th>
<th>Versions</th>
<th>ECCN</th>
<th>Controlled Source</th>
</tr>
#foreach ( $product in $project.getChildren('Product') )
#set ($prodspan = $product.getChildren("Version").size())
#foreach ( $version in $product.getChildren('Version') )
#set ($sources = '')
#foreach ( $source in $version.getChildren('ControlledSource') )
#set ($itA = '<a href="')
#set ($itB = '" title="')
#set ($itC = '">')
#set ($item = "$itA$source.getAttributeValue('href')$itB$source.getChild('Why').getText()$itC$source.getChild('Manufacturer').getText()</a>")
#if ($velocityCount == 1)
#set ($sources = $item)
#else
#set ($sources = "$sources, $item")
#end
#end
<tr>
#if ($velocityCount == 1)
<td rowspan="$prodspan">$product.getChild('Name').getText()</td>
#end
<td>$version.getChild('Names').getText()</td>
<td>$version.getChild('ECCN').getText()</td>
<td>$sources</td>
</tr>
#end
#end
#end
</table>
#end
##
##
#macro ( section $section $level )
#if ($section.getChild("title"))
#set ($heading = $section.getChildText("title"))
#elseif ($section.getAttributeValue("id"))
#set ($heading = $section.getAttributeValue("id"))
#else
#set ($heading = "")
#end
#if ($level == 0)
#set ($foo = "bar")
#elseif ($level == 1)
#if ($section.getAttributeValue("id"))
<h4 id="$section.getAttributeValue("id")">
$heading
#else
<h4>
$heading
#end
</h4>
#elseif ($level == 2)
#if ($section.getAttributeValue("id"))
<h5 id="$section.getAttributeValue("id")">
$heading
#else
<h5>
$heading
#end
</h5>
#else
#if ($section.getAttributeValue("id"))
<h6 id="$section.getAttributeValue("id")">
$heading
#else
<h6>
$heading
#end
</h6>
#end
<div class="section-content">
## First, walk the tree and relativise any absolute path URI references
##foreach ( $tw in $treeWalk.allElements($section) )
##relativise ($tw)
##end
## Second, output the section-level children with transformers
#foreach ( $items in $section.getChildren() )
#if ($items.getName().equals("source"))
#source ($items)
#elseif ($items.getName().equals("resource_table"))
#resource_table($items)
#elseif ($items.getName().equals("table"))
#color_table ($items)
#elseif ($items.getName().equals("note"))
#make_note ($items)
#elseif ($items.getName().equals("toc"))
#make_toc ()
#elseif ($items.getName().equals("eccnmatrix"))
#eccnmatrix ($items)
#elseif ($items.getName().equals("section"))
#set ($sublevel = $level + 1)
#section ($items $sublevel)
#elseif ($items.getName().equals("title"))
## we already handled this one
#else
$items
#end
#end
</div>
#end
##
##
#macro ( makeProject )
#set ($menus = $project.selectNodes("body/menu"))
#foreach ( $menu in $menus )
##foreach ( $tw in $menu.selectNodes("//*") )
##relativise ($tw)
##end
#set ($title = $menu.getChild("title"))
#if ($title.getAttributeValue("href"))
<h6><a
href="$title.getAttributeValue("href")">$menu.getChildText("title")</a></h6>
#else
<h6>$menu.getChildText("title")</h6>
#end
<ul>
#foreach ( $item in $menu.getChildren("li") )
$item
#end
</ul>
#end
#end
##
##
#macro ( listProjects )
#set ($menus = $project.selectNodes("body/projects"))
#foreach ( $menu in $menus )
##foreach ( $tw in $menu.selectNodes("//*") )
##relativise ($tw)
##end
#set ($title = $menu.getChild("title"))
#if ($title.getAttributeValue("href"))
<div class="menuheader"><a
href="$title.getAttributeValue("href")">$menu.getChildText("title")</a></div>
#else
<div class="menuheader">$menu.getChildText("title")</div>
#end
<ul>
#foreach ( $item in $menu.getChildren("li") )
$item
#end
</ul>
#end
#end
##
##
#macro ( getProjectImage )
#if ($project.getChild("logo"))
<td align="left" valign="top">
<a href="https://www.apache.org/"><img src="$relativePath/images/asf_logo_wide.gif" alt="The Apache Software Foundation" title="The Apache Software Foundation" 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()" title="$project.getChild("logo").getText()" border="0"/></a>
#else
<a href="$project.getAttributeValue("href")"><img src="$logoString" alt="$project.getChild("logo").getText()" title="$project.getChild("logo").getText()" border="0"/></a>
#end
</td>
<td>
<!-- Need to specify height otherwise iframe seems to grab extra -->
<iframe src="https://www.apache.org/ads/halfbanner.html" height="65"
style="border-width:0; float: right" frameborder="0" scrolling="no"></iframe>
</td>
#else
<td align="left" valign="top">
<a href="https://www.apache.org/"><img src="$relativePath/images/asf_logo_wide.gif" alt="The Apache Software Foundation" title="The Apache Software Foundation" align="left" border="0"/></a>
</td>
<td>
<!-- Need to specify height otherwise iframe seems to grab extra -->
<iframe src="https://www.apache.org/ads/halfbanner.html" height="65"
style="border-width:0; float: right" frameborder="0" scrolling="no"></iframe>
</td>
##<td width="150" valign="middle" align="center">
## <p><strong><a href="https://www.apache.org/dyn/closer.cgi">Mirrored<br />
## Worldwide</a></strong></p>
##</td>
#end
#end
##
##
#macro ( document )
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!--
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This file is generated from XML source: DO NOT EDIT!
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
#set ($base = $root.getChild("properties").getChild("base"))
#if ( $base )
$base
#end
#set ($refresh = $root.getChild("properties").getChild("refresh").getText())
#if ( $refresh )
<meta http-equiv="refresh" content="$refresh"/>
#end
#set ($is_dynpage = 0)
#if ($root.getAttributeValue("id","") == "closer")
#set ($is_dynpage = 1)
#end
<link rel="stylesheet" href="/style/compressed.css" type="text/css" media="screen, projection"/>
<link rel="stylesheet" href="/style/style.css" type="text/css" media="screen, projection"/>
<link rel="stylesheet" href="/style/attic.css" type="text/css" media="screen, projection"/>
#if ($is_dynpage == 1)
<!--[[]if IE]><link rel="stylesheet" href="/style/ie.css" type="text/css" media="screen, projection"/><![[]endif]-->
#else
<!--[if IE]><link rel="stylesheet" href="/style/ie.css" type="text/css" media="screen, projection"/><![endif]-->
#end
#set ($atoms = $root.getChild("properties").getChildren("atom"))
#foreach ( $atom in $atoms )
#metaatom ( $atom.getText() $atom.getAttributeValue("url") )
#end
#set ($authors = $root.getChild("properties").getChildren("author"))
#foreach ( $au in $authors )
#metaauthor ( $au.getText() $au.getAttributeValue("email") )
#end
<title>$root.getChild("properties").getChild("title").getText() - $project.getChild("title").getText()</title>
#set ($scripts = $root.getChild("properties").getChildren("script"))
#if ( $scripts )
$scripts
#end
</head>
#set ($isHomePage = 0)
#set ($headerSection = $root.getChild("body").getChild("header_section"))
#if ( $headerSection )
#set ($isHomePage = 1)
#end
#if ($isHomePage == 1)
<body>
#else
<body id="sub">
#end
<div class="container">
<hr class="space col"/>
<div class="block">
<div class="column span-24">
<div id="header">
#set ($headerSection = $root.getChild("body").getChild("header_section"))
#if ( $headerSection )
$headerSection.getChildren()
#else
<!-- Add 'default' header section here. -->
#set ($allSections = $root.getChild("body").getChildren("section"))
#if ($allSections.get(0).getChild('title').getText())
<h1>$allSections.get(0).getChild('title').getText()</h1>
#end
#end
</div>
</div>
</div>
<hr/>
<div class="block content">
<div class="column span-15 colborder">
#set ($allSections = $root.getChild("body").getChildren("section"))
#foreach ( $section in $allSections )
#set ($level = 1)
#if ( $section.getChild('title').getText() == $allSections.get(0).getChild('title').getText())
#set ($level = 0)
#end
#section ($section $level)
#end
</div>
<div class="column span-8 last">
<div class="block">
<div class="nav column span-11">
<div>
#listProjects()
</div>
</div>
<div class="nav column prepend-1 span-12 last">
#makeProject()
</div>
</div>
</div>
<div class="column span-24 footer">
<hr/>
<p>Copyright &#169; 2009-2023 The Apache Software Foundation, Licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.<br/>
Apache and the Apache feather logo are trademarks of The Apache Software Foundation.</p>
</div>
</div>
</div>
</body>
</html>
#end