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 8.0 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. #*
  2. * Licensed to the Apache Software Foundation (ASF) under one or more
  3. * contributor license agreements. See the NOTICE file distributed with
  4. * this work for additional information regarding copyright ownership.
  5. * The ASF licenses this file to You under the Apache License, Version 2.0
  6. * (the "License"); you may not use this file except in compliance with
  7. * the License. You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. *
  17. *#
  18. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  19. <!--
  20. Licensed to the Apache Software Foundation (ASF) under one or more
  21. contributor license agreements. See the NOTICE file distributed with
  22. this work for additional information regarding copyright ownership.
  23. The ASF licenses this file to You under the Apache License, Version 2.0
  24. (the "License"); you may not use this file except in compliance with
  25. the License. You may obtain a copy of the License at
  26. http://www.apache.org/licenses/LICENSE-2.0
  27. Unless required by applicable law or agreed to in writing, software
  28. distributed under the License is distributed on an "AS IS" BASIS,
  29. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  30. See the License for the specific language governing permissions and
  31. limitations under the License.
  32. -->
  33. ## Content Stylesheet for Site
  34. ## Defined variables
  35. #set ($lightbg = "#ffffff")
  36. #set ($lightfg = "#ffffff")
  37. #set ($darkfg = "#000000")
  38. #set ($active = "#ffcc00")
  39. #set ($blue4 = "#B2C4E0")
  40. #set ($blue3 = "#294563")
  41. #set ($blue2 = "#4C6C8F")
  42. #set ($blue1 = "#CFDCED")
  43. #set ($sourceborder = "#023264")
  44. #set ($pound = "#" )
  45. #set ($ssi = "include virtual=")
  46. #set ($adsurl = "/ads/buttonbar.html")
  47. ## start the processing
  48. #document()
  49. ## end the processing
  50. ## This is where the common page macro's live
  51. #macro ( isbn $isbn)
  52. <p><b>Available from:</b><br>
  53. <a href="http://www.amazon.com/exec/obidos/tg/detail/-/$!isbn/apachesoftwar-20/" target="_blank">Amazon.com</a>
  54. | <a href="http://service.bfast.com/bfast/click?bfmid=2181&amp;bfmtype=book&amp;sourceid=41462544&amp;bfpid=$!isbn" target="_blank">Barnes &amp; Noble</a>
  55. | <a href="http://www.booksense.com/product/info.jsp?affiliateId=Apache&amp;isbn=$!isbn" target="_blank">Book Sense</a>
  56. | <a href="http://www.powells.com/cgi-bin/biblio?isbn=$!isbn&amp;partner_id=29693" target="_blank">Powells.com</a>
  57. <br></p>
  58. #end
  59. #macro ( subsection $subsection)
  60. <h4 class="subsection">
  61. <a name="$escape.getText($subsection.getAttributeValue("name"))"></a>
  62. $subsection.getAttributeValue("name")
  63. </h4>
  64. #foreach ( $items in $subsection.getChildren() )
  65. #if ($items.getName().equals("img"))
  66. #image ($items)
  67. #elseif ($items.getName().equals("source"))
  68. #source ($items)
  69. #elseif ($items.getName().equals("table"))
  70. #table ($items)
  71. #elseif ($items.getName().equals("subsubsection"))
  72. #subsubsection ($items)
  73. #else
  74. $xmlout.outputString($items)
  75. #end
  76. #end
  77. #if ($subsection.getAttributeValue("isbn"))
  78. #set ($isbn = $subsection.getAttributeValue("isbn"))
  79. #isbn ($isbn)
  80. #end
  81. #end
  82. #macro ( subsubsection $subsubsection)
  83. <h5 class="subsection">
  84. <a name="$escape.getText($subsubsection.getAttributeValue("name"))"></a>
  85. *** $subsubsection.getAttributeValue("name") ***
  86. </h5>
  87. #foreach ( $items in $subsubsection.getChildren() )
  88. #if ($items.getName().equals("img"))
  89. #image ($items)
  90. #elseif ($items.getName().equals("source"))
  91. #source ($items)
  92. #elseif ($items.getName().equals("table"))
  93. #table ($items)
  94. #else
  95. $xmlout.outputString($items)
  96. #end
  97. #end
  98. #end
  99. #macro ( teamcity $teamcity)
  100. <table class="ContinuousBuild">
  101. <tr>
  102. <th>Title</th>
  103. <th>Description</th>
  104. <th>Build command</th>
  105. <th>When</th>
  106. <th>last build</th>
  107. <th>last success</th>
  108. </tr>
  109. #set ($viewLink = $teamcity.getAttributeValue("viewlog") )
  110. #foreach ($project in $teamcity.getChildren() )
  111. <tr><td colspan="6" class="title"><b>$project.getAttributeValue("name")</b></td></tr>
  112. #foreach ($configuration in $project.getChildren() )
  113. #configuration ($configuration $viewLink)
  114. #end
  115. #end
  116. </table>
  117. #end
  118. #macro ( configuration $conf $viewLink)
  119. #set ($id = $conf.getAttributeValue("id") )
  120. <tr>
  121. <td class="title">$conf.getAttributeValue("title")</td>
  122. <td class="description">$conf.getChild("description").getContent()</td>
  123. <td class="command">$conf.getAttributeValue("command")</td>
  124. #if ($conf.getChild("when"))
  125. <td class="when">$conf.getChild("when").getContent()</td>
  126. #else
  127. <td class="when">continuously</td>
  128. #end
  129. <td class="link"><a href="$viewLink?&buildTypeId=$id&buildId=lastFinished">last build</a></td>
  130. <td class="link"><a href="$viewLink?&buildTypeId=$id&buildId=lastSuccessful">last success</a></td>
  131. </tr>
  132. #end
  133. #macro ( section $section)
  134. <h3 class="section">
  135. <a name="$escape.getText($section.getAttributeValue("name"))"></a>
  136. $section.getAttributeValue("name")
  137. </h3>
  138. #foreach ( $items in $section.getChildren() )
  139. #if ($items.getName().equals("img"))
  140. #image ($items)
  141. #elseif ($items.getName().equals("source"))
  142. #source ($items)
  143. #elseif ($items.getName().equals("table"))
  144. #table ($items)
  145. #elseif ($items.getName().equals("subsection"))
  146. #subsection ($items)
  147. #elseif ($items.getName().equals("teamcity"))
  148. #teamcity ($items)
  149. #else
  150. $xmlout.outputString($items)
  151. #end
  152. #end
  153. #end
  154. ## This is where the FAQ specific macro's live
  155. #macro (toc $section)
  156. <h4 class="toc">$section.getAttributeValue("title")</h4>
  157. <ul>
  158. #foreach ($faq in $section.getChildren("faq") )
  159. #subtoc ($faq)
  160. #end
  161. </ul>
  162. #end
  163. #macro (subtoc $faq)
  164. #set ($id = $faq.getAttributeValue("id"))
  165. <li><a href="$pound$id">
  166. $xmlout.outputString($faq.getChild("question"), true)
  167. </a></li>
  168. #end
  169. #macro (answers $section)
  170. #foreach ($faq in $section.getChildren("faq") )
  171. #faq ($faq)
  172. #end
  173. #end
  174. #macro (faq $faq)
  175. #set ($id = $faq.getAttributeValue("id"))
  176. <p class="faq">
  177. <a name="$id"></a>
  178. $xmlout.outputString($faq.getChild("question"), true)
  179. </p>
  180. #foreach ($item in $faq.getChild("answer").getChildren())
  181. #if ($item.getName().equals("img"))
  182. #image ($item)
  183. #elseif ($item.getName().equals("source"))
  184. #source ($item)
  185. #elseif ($item.getName().equals("table"))
  186. #table ($item)
  187. #else
  188. $xmlout.outputString($item)
  189. #end
  190. #end
  191. #end
  192. #macro (document)
  193. #header()
  194. <div class="main">
  195. <div class="content">
  196. <h1 class="title">$root.getChild("properties").getChild("title").getText()</h1>
  197. #set ($allSections = $root.getChild("body").getChildren("section"))
  198. #foreach ( $section in $allSections )
  199. #section ($section)
  200. #end
  201. #if ($root.getChildren("faqsection").size() > 0)
  202. #set ($allFaqSections = $root.getChildren("faqsection"))
  203. <h3 class="section">Questions</h3>
  204. #foreach ( $faqSection in $allFaqSections )
  205. #toc ($faqSection)
  206. #end
  207. <h3 class="section">Answers</h3>
  208. #foreach ( $faqSection in $allFaqSections )
  209. #answers ($faqSection)
  210. #end
  211. #end
  212. </div>
  213. </div>
  214. #footer()
  215. #end