You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

site.vsl 9.3 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!-- Content Stylesheet for Site -->
  3. ## Defined variables
  4. #set ($bodybg = "#ffffff")
  5. #set ($bodyfg = "#000000")
  6. #set ($bodylink = "#525D76")
  7. #set ($bannerbg = "#525D76")
  8. #set ($bannerfg = "#ffffff")
  9. #set ($subbannerbg = "#828DA6")
  10. #set ($subbannerfg = "#ffffff")
  11. #set ($tablethbg = "#039acc")
  12. #set ($tabletdbg = "#a0ddf0")
  13. <!-- start the processing -->
  14. #document()
  15. <!-- end the processing -->
  16. ## This is where the macro's live
  17. #macro ( table $table)
  18. <table>
  19. #foreach ( $items in $table.getChildren() )
  20. #if ($items.getName().equals("tr"))
  21. #tr ($items)
  22. #end
  23. #end
  24. </table>
  25. #end
  26. #macro ( tr $tr)
  27. <tr>
  28. #foreach ( $items in $tr.getChildren() )
  29. #if ($items.getName().equals("td"))
  30. #td ($items)
  31. #elseif ($items.getName().equals("th"))
  32. #th ($items)
  33. #end
  34. #end
  35. </tr>
  36. #end
  37. #macro ( td $value)
  38. #if ($value.getAttributeValue("colspan"))
  39. #set ($colspan = $value.getAttributeValue("colspan"))
  40. #end
  41. #if ($value.getAttributeValue("rowspan"))
  42. #set ($rowspan = $value.getAttributeValue("rowspan"))
  43. #end
  44. <td bgcolor="$tabletdbg" colspan="$!colspan" rowspan="$!rowspan" valign="top" align="left">
  45. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  46. #if ($value.getText().length() != 0 || $value.hasChildren())
  47. $xmlout.outputString($value, true)
  48. #else
  49. &nbsp;
  50. #end
  51. </font>
  52. </td>
  53. #end
  54. #macro ( th $value)
  55. #if ($value.getAttributeValue("colspan"))
  56. #set ($colspan = $value.getAttributeValue("colspan"))
  57. #end
  58. #if ($value.getAttributeValue("rowspan"))
  59. #set ($rowspan = $value.getAttributeValue("rowspan"))
  60. #end
  61. <td bgcolor="$tablethbg" colspan="$!colspan" rowspan="$!rowspan" valign="top" align="left">
  62. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  63. #if ($value.getText().length() != 0 || $value.hasChildren())
  64. $xmlout.outputString($value, true)
  65. #else
  66. &nbsp;
  67. #end
  68. </font>
  69. </td>
  70. #end
  71. #macro ( projectanchor $name $value )
  72. #if ($value.startsWith("http://"))
  73. <a href="$value">$name</a>
  74. #elseif ($value.startsWith("/site"))
  75. <a href="http://jakarta.apache.org$value">$name</a>
  76. #else
  77. <a href="$relativePath$value">$name</a>
  78. #end
  79. #end
  80. #macro ( metaauthor $author $email )
  81. <meta name="author" value="$author">
  82. <meta name="email" value="$email">
  83. #end
  84. #macro ( image $value )
  85. #if ($value.getAttributeValue("width"))
  86. #set ($width=$value.getAttributeValue("width"))
  87. #end
  88. #if ($value.getAttributeValue("height"))
  89. #set ($height=$value.getAttributeValue("height"))
  90. #end
  91. #if ($value.getAttributeValue("align"))
  92. #set ($align=$value.getAttributeValue("align"))
  93. #end
  94. <img src="$relativePath$value.getAttributeValue("src")" width="$!width" height="$!height" align="$!align">
  95. #end
  96. #macro ( source $value)
  97. <div align="left">
  98. <table cellspacing="4" cellpadding="0" border="0">
  99. <tr>
  100. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  101. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  102. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  103. </tr>
  104. <tr>
  105. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  106. <td bgcolor="#ffffff"><pre>$escape.getText($value.getText())</pre></td>
  107. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  108. </tr>
  109. <tr>
  110. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  111. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  112. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  113. </tr>
  114. </table>
  115. </div>
  116. #end
  117. #macro ( subsection $subsection)
  118. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  119. <tr><td bgcolor="$subbannerbg">
  120. <font color="$subbannerfg" face="arial,helvetica,sanserif">
  121. <strong>$subsection.getAttributeValue("name")</strong>
  122. </font>
  123. </td></tr>
  124. <tr><td>
  125. <blockquote>
  126. #foreach ( $items in $subsection.getChildren() )
  127. #if ($items.getName().equals("img"))
  128. #image ($items)
  129. #elseif ($items.getName().equals("source"))
  130. #source ($items)
  131. #elseif ($items.getName().equals("table"))
  132. #table ($items)
  133. #else
  134. $xmlout.outputString($items)
  135. #end
  136. #end
  137. </blockquote>
  138. </td></tr>
  139. </table>
  140. #end
  141. #macro ( section $section)
  142. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  143. <tr><td bgcolor="$bannerbg">
  144. <font color="$bannerfg" face="arial,helvetica,sanserif">
  145. <strong>$section.getAttributeValue("name")</strong>
  146. </font>
  147. </td></tr>
  148. <tr><td>
  149. <blockquote>
  150. #foreach ( $items in $section.getChildren() )
  151. #if ($items.getName().equals("img"))
  152. #image ($items)
  153. #elseif ($items.getName().equals("source"))
  154. #source ($items)
  155. #elseif ($items.getName().equals("table"))
  156. #table ($items)
  157. #elseif ($items.getName().equals("subsection"))
  158. #subsection ($items)
  159. #else
  160. $xmlout.outputString($items)
  161. #end
  162. #end
  163. </blockquote>
  164. </td></tr>
  165. </table>
  166. #end
  167. #macro ( makeProject )
  168. #set ($menus = $project.getChild("body").getChildren("menu"))
  169. #foreach ( $menu in $menus )
  170. <p><strong>$menu.getAttributeValue("name")</strong></p>
  171. <ul>
  172. #foreach ( $item in $menu.getChildren() )
  173. #set ($name = $item.getAttributeValue("name"))
  174. <li>#projectanchor($name $item.getAttributeValue("href"))</li>
  175. #end
  176. </ul>
  177. #end
  178. #end
  179. #macro (getProjectImage)
  180. #if ($project.getChild("logo"))
  181. <td align="left">
  182. <a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif" border="0"/></a>
  183. </td>
  184. <td align="right">
  185. #set ( $logoString = $project.getChild("logo").getAttributeValue("href") )
  186. #if ( $logoString.startsWith("/") )
  187. <a href="$project.getAttributeValue("href")"><img src="$relativePath$logoString" alt="$project.getChild("logo").getText()" border="0"/></a>
  188. #else
  189. <a href="$project.getAttributeValue("href")"><img src="$relativePath/$logoString" alt="$project.getChild("logo").getText()" border="0"/></a>
  190. #end
  191. </td>
  192. #else
  193. <td colspan="2">
  194. <a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif" align="left" border="0"/></a>
  195. </td>
  196. #end
  197. #end
  198. #macro (document)
  199. <!-- ====================================================================== -->
  200. <!-- Main Page Section -->
  201. <!-- ====================================================================== -->
  202. <html>
  203. <head>
  204. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
  205. #set ($authors = $root.getChild("properties").getChildren("author"))
  206. #foreach ( $au in $authors )
  207. #metaauthor ( $au.getText() $au.getAttributeValue("email") )
  208. #end
  209. <title>$project.getChild("title").getText() - $root.getChild("properties").getChild("title").getText()</title>
  210. </head>
  211. <body bgcolor="$bodybg" text="$bodyfg" link="$bodylink">
  212. <table border="0" width="100%" cellspacing="0">
  213. <!-- TOP IMAGE -->
  214. <tr>
  215. #getProjectImage()
  216. </tr>
  217. </table>
  218. <table border="0" width="100%" cellspacing="4">
  219. <tr><td colspan="2">
  220. <hr noshade="" size="1"/>
  221. </td></tr>
  222. <tr>
  223. <!-- LEFT SIDE NAVIGATION -->
  224. <td valign="top" nowrap="true">
  225. #makeProject()
  226. </td>
  227. <td align="left" valign="top">
  228. #set ($allSections = $root.getChild("body").getChildren("section"))
  229. #foreach ( $section in $allSections )
  230. #section ($section)
  231. #end
  232. </td>
  233. </tr>
  234. <!-- FOOTER -->
  235. <tr><td colspan="2">
  236. <hr noshade="" size="1"/>
  237. </td></tr>
  238. <tr><td colspan="2">
  239. <div align="center"><font color="$bodylink" size="-1"><em>
  240. Copyright &#169; 1999-2001, Apache Software Foundation
  241. </em></font></div>
  242. </td></tr>
  243. </table>
  244. </body>
  245. </html>
  246. #end