Author: wglass
Date: Sat Feb  5 11:11:02 2005
New Revision: 151518

URL: http://svn.apache.org/viewcvs?view=rev&rev=151518
Log:
copied jakarta-site2/xdocs/stylesheets/site.vsl into Velocity distribution

Added:
    jakarta/velocity/trunk/xdocs/stylesheets/site.vsl
Modified:
    jakarta/velocity/trunk/build/build.xml

Modified: jakarta/velocity/trunk/build/build.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/velocity/trunk/build/build.xml?view=diff&r1=151517&r2=151518
==============================================================================
--- jakarta/velocity/trunk/build/build.xml (original)
+++ jakarta/velocity/trunk/build/build.xml Sat Feb  5 11:11:02 2005
@@ -659,36 +659,6 @@
           depends="jar"
           description="generates the HTML documentation"
           >
-<!--
-      <echo>
-       ####################################################################
-       #
-       #  Fetching the latest stylesheet from jakarta-site2
-       #
-       #  NOTE : As this build target is meant for developers, this requires 
-       #    a properly setup CVS.  But you are encouraged to use this to 
-       #    experiment with Anakia - if the fetch fails, it may be because 
-       #    you haven't yet logged into CVS. The way to do it, assuming you
-       #    have a resonable CVS client setup is
-       #
-       #  $ cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic login
-       #  password: anoncvs
-       #
-       #  and that should solve it.  
-       #
-       #  See http://jakarta.apache.org/site/cvsindex.html for more 
-       #      information, or http://www.cvshome.org/
-       #
-       #  Ant really is the bee's knees. http://jakarta.apache.org/ant/
-       #
-       ######################################################################
-       </echo>
-
-      <cvs cvsRoot=":pserver:[EMAIL PROTECTED]:/home/cvspublic"
-          command="checkout -p jakarta-site2/xdocs/stylesheets/site.vsl"
-          output="${docs.src}/stylesheets/site.vsl"
-      />
--->
       <taskdef name="anakia"
           classname="org.apache.velocity.anakia.AnakiaTask">
           
@@ -704,17 +674,7 @@
        #
        #  Now using Anakia to transform our XML documentation
        #  to HTML.
-       #
-       #  Note : this step depends upon having the jakarta-site2
-       #  project located as a peer to the jakarta-velocity
-       #  directory (the directory that holds the Velocity
-       #  distribution.)  That means that jakarta-site2 and
-       #  jakarta-velocity are located in the same subdirectory.
-       #
-       #  Please see :
-       #    http://jakarta.apache.org/site/cvsindex.html
-       #  for more information on obtaining jakarta-site2.
-       #
+        
        #######################################################
       </echo>
 
@@ -724,7 +684,7 @@
            excludes="**/stylesheets/** empty.xml"
            includes="**/*.xml"
            lastModifiedCheck="true"
-           templatePath="../../jakarta-site2/xdocs/stylesheets">
+           templatePath="../xdocs/stylesheets">
       </anakia>
 
       <copy todir="${docs.dest}/images" filtering="no">
@@ -768,16 +728,6 @@
        #  Now using Anakia to transform our XML documentation
        #  to HTML.
        #
-       #  Note : this step depends upon having the jakarta-site2
-       #  project located as a peer to the jakarta-velocity
-       #  directory (the directory that holds the Velocity
-       #  distribution.)  That means that jakarta-site2 and
-       #  jakarta-velocity are located in the same subdirectory.
-       #
-       #  Please see :
-       #    http://jakarta.apache.org/site/cvsindex.html
-       #  for more information on obtaining jakarta-site2.
-       #
        #######################################################
       </echo>
 
@@ -787,7 +737,7 @@
            excludes="**/stylesheets/** empty.xml"
            includes="**/*.xml"
            lastModifiedCheck="true"
-           templatePath="../../jakarta-site2/xdocs/stylesheets">
+              templatePath="../xdocs/stylesheets">
       </anakia>
 
       <copy todir="${docs_print.dest}/images" filtering="no">

Added: jakarta/velocity/trunk/xdocs/stylesheets/site.vsl
URL: 
http://svn.apache.org/viewcvs/jakarta/velocity/trunk/xdocs/stylesheets/site.vsl?view=auto&rev=151518
==============================================================================
--- jakarta/velocity/trunk/xdocs/stylesheets/site.vsl (added)
+++ jakarta/velocity/trunk/xdocs/stylesheets/site.vsl Sat Feb  5 11:11:02 2005
@@ -0,0 +1,314 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
+
+<!--
+Copyright 1999-2004 The Apache Software Foundation
+Licensed 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
+    #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")
+    
+<!-- start the processing -->
+#document()
+<!-- end the processing -->
+
+## This is where the macro's live
+
+#macro ( table $table)
+<table>
+    #foreach ( $items in $table.getChildren() )
+        #if ($items.getName().equals("tr"))
+            #tr ($items)
+        #end
+    #end
+</table>
+#end
+
+#macro ( tr $tr)
+<tr>
+    #foreach ( $items in $tr.getChildren() )
+        #if ($items.getName().equals("td"))
+            #td ($items)
+        #elseif ($items.getName().equals("th"))
+            #th ($items)
+        #end
+    #end
+</tr>
+#end
+
+#macro ( td $value)
+#if ($value.getAttributeValue("colspan"))
+#set ($colspan = $value.getAttributeValue("colspan"))
+#end
+#if ($value.getAttributeValue("rowspan"))
+#set ($rowspan = $value.getAttributeValue("rowspan"))
+#end
+<td bgcolor="$tabletdbg" colspan="$!colspan" rowspan="$!rowspan" valign="top" 
align="left">
+    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+        #if ($value.getText().length() != 0 || $value.hasChildren())
+        $value.getContent()
+        #else
+        &nbsp;
+        #end
+    </font>
+</td>
+#end
+
+#macro ( th $value)
+#if ($value.getAttributeValue("colspan"))
+#set ($colspan = $value.getAttributeValue("colspan"))
+#end
+#if ($value.getAttributeValue("rowspan"))
+#set ($rowspan = $value.getAttributeValue("rowspan"))
+#end
+<th bgcolor="$tablethbg" colspan="$!colspan" rowspan="$!rowspan" valign="top" 
align="left">
+    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+        #if ($value.getText().length() != 0 || $value.hasChildren())
+        $value.getContent()
+        #else
+        &nbsp;
+        #end
+    </font>
+</th>
+#end
+
+#macro ( projectanchor $name $value )
+#if ($value.startsWith("http://";))
+    <a href="$value">$name</a>
+#elseif ($value.startsWith("/site"))
+    <a href="http://jakarta.apache.org$value";>$name</a>
+#else
+    <a href="$relativePath$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")" 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())</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
+
+#macro ( subsection $subsection)
+    <table border="0" cellspacing="0" cellpadding="2" width="100%">
+      <tr><td bgcolor="$subbannerbg">
+        <font color="$subbannerfg" face="arial,helvetica,sanserif">
+          <a 
name="$subsection.getAttributeValue("name")"><strong>$subsection.getAttributeValue("name")</strong></a>
+        </font>
+      </td></tr>
+      <tr><td>
+        <blockquote>
+        #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
+        </blockquote>
+      </td></tr>
+      <tr><td><br/></td></tr>
+    </table>
+#end
+
+#macro ( section $section)
+    <table border="0" cellspacing="0" cellpadding="2" width="100%">
+      <tr><td bgcolor="$bannerbg">
+        <font color="$bannerfg" face="arial,helvetica,sanserif">
+          <a 
name="$section.getAttributeValue("name")"><strong>$section.getAttributeValue("name")</strong></a>
+        </font>
+      </td></tr>
+      <tr><td>
+        <p>
+        <blockquote>
+        #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
+        </blockquote>
+        </p>
+      </td></tr>
+      <tr><td><br/></td></tr>
+    </table>
+#end
+
+#macro ( makeProject )
+
+    <!-- ============================================================ -->
+
+    #set ($menus = $project.getChild("body").getChildren("menu"))
+    #foreach ( $menu in $menus )
+        <p><strong>$menu.getAttributeValue("name")</strong></p>
+        <ul>
+        #foreach ( $item in $menu.getChildren() )
+            #set ($name = $item.getAttributeValue("name"))
+            <li>#projectanchor($name $item.getAttributeValue("href"))</li>
+        #end
+        </ul>
+    #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 (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 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
+
+           #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>
+        </head>
+
+        <body bgcolor="$bodybg" text="$bodyfg" link="$bodylink">        
+            <table border="0" width="100%" cellspacing="0">
+                <!-- TOP IMAGE -->
+                <tr>
+                    #getProjectImage()
+                </tr>
+            </table>
+            <table border="0" width="100%" cellspacing="4">
+                <tr><td colspan="2">
+                    <hr noshade="" size="1"/>
+                </td></tr>
+                
+                <tr>
+                    <!-- LEFT SIDE NAVIGATION -->
+                    <td width="20%" valign="top" nowrap="true">
+                    #makeProject()
+                    </td>
+                    <td width="80%" align="left" valign="top">
+                    #set ($allSections = 
$root.getChild("body").getChildren("section"))
+                    #foreach ( $section in $allSections )
+                        #section ($section)
+                    #end
+                    </td>
+                </tr>
+
+                <!-- FOOTER -->
+                <tr><td colspan="2">
+                    <hr noshade="" size="1"/>
+                </td></tr>
+                <tr><td colspan="2">
+                    <div align="center"><font color="$bodylink" size="-1"><em>
+                    Copyright &#169; 1999-2005, The Apache Software Foundation
+                    </em></font></div>
+                </td></tr>
+            </table>
+        </body>
+    </html>
+#end
+
+
+
+
+



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to