jakarta-site-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@locus.apache.org
Subject cvs commit: jakarta-site2/xdocs/stylesheets site.vsl project.xml
Date Mon, 27 Nov 2000 03:20:44 GMT
jon         00/11/26 19:20:44

  Modified:    xdocs/stylesheets site.vsl project.xml
  Log:
  re-ordered macro's cause they need to be in order of execution
  for now due to the way velocity works.
  
  added $escape support
  
  added <logo> to the project.xml file
  
  Revision  Changes    Path
  1.3       +128 -134  jakarta-site2/xdocs/stylesheets/site.vsl
  
  Index: site.vsl
  ===================================================================
  RCS file: /home/cvs/jakarta-site2/xdocs/stylesheets/site.vsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- site.vsl	2000/11/25 22:59:17	1.2
  +++ site.vsl	2000/11/27 03:20:42	1.3
  @@ -15,109 +15,43 @@
   
   ## This is where the macro's live
   
  -#macro (document)
  -    <!-- ====================================================================== -->
  -    <!-- 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
  -
  -            <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="4">
  -                <!-- TOP IMAGE -->
  -                <tr><td colspan="2">
  -                    <a href="http://jakarta.apache.org"><img src="${relativePath}/images/jakarta-logo.gif"
align="left" border="0"/></a>
  -                </td></tr>
  -                <tr><td colspan="2">
  -                    <hr noshade="" size="1"/>
  -                </td></tr>
  -                
  -                <tr>
  -                    <!-- LEFT SIDE NAVIGATION -->
  -                    <td valign="top" nowrap="true">
  -                    #makeProject()
  -                    </td>
  -                    <td 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-2000, Apache Software Foundation
  -                    </em></font></div>
  -                </td></tr>
  -            </table>
  -        </body>
  -    </html>
  +#* FOR USE LATER
  +#macro ( td $value)
  +#if ($value.getAttributeValue("colspan"))
  +#set $colspan = $value.getAttributeValue("colspan")
   #end
  -
  -#macro ( section $section)
  -    <table border="0" cellspacing="0" cellpadding="2" width="100%">
  -      <tr><td bgcolor="$bannerbg">
  -        <font color="$bannerfg" face="arial,helvetica,sanserif">
  -          <strong>$section.getAttributeValue("name")</strong>
  -        </font>
  -      </td></tr>
  -      <tr><td>
  -        <blockquote>
  -        #foreach ( $items in $section.getChildren() )
  -            #if ($items.getName().equals("img"))
  -                #image ($items)
  -            #elseif ($items.getName().equals("source"))
  -                #source ($items)
  -            #else
  -                $xmlout.outputString($items)
  -            #end
  -        #end
  -        </blockquote>
  -      </td></tr>
  -    </table>
  +#if ($value.getAttributeValue("rowspan"))
  +#set $rowspan = $value.getAttributeValue("rowspan")
   #end
  -
  -#* For future:
  -#macro ( recursive $element )
  +<font color="#000000" size="-1" face="arial,helvetica,sanserif">
  +    <td bgcolor="{$tabletdbg}" colspan="$colspan" rowspan="$rowspan" valign="top" align="left">
  +        $value.getText()&#160;
  +    </td>
  +</font>
  +#end
   
  -#set $children = $element.getChildren()
  -#set $tmpelement = $element
  -#if ($children)
  -    #if ( $children.isEmpty() )
  -    $xmlout.outputString($tmpelement)    
  -    #else
  -    #recursive ($tmpelement)
  -    #end
  +#macro ( th $value)
  +#if ($value.getAttributeValue("colspan"))
  +#set $colspan = $value.getAttributeValue("colspan")
   #end
  +#if ($value.getAttributeValue("rowspan"))
  +#set $rowspan = $value.getAttributeValue("rowspan")
  +#end
  +<font color="#000000" size="-1" face="arial,helvetica,sanserif">
  +    <td bgcolor="{$tablethbg}" colspan="$colspan" rowspan="$rowspan" valign="top" align="left">
  +        $value.getText()&#160;
  +    </td>
  +</font>
  +#end
  +  FOR USE LATER *#
   
  +#macro ( projectanchor $name $value )
  +    <a href="$relativePath$value">$name</a>
   #end
  -*#
   
  -#macro ( makeProject )
  -    #set $menus = $project.getChild("body").getChildren("menu")
  -    #foreach ( $menu in $menus )
  -        <strong>$menu.getAttributeValue("name")</strong>
  -        <ul>
  -        #foreach ( $item in $menu.getChildren() )
  -            #set $name = $item.getAttributeValue("name")
  -            <li>#projectanchor($name $item.getAttributeValue("href"))</li>
  -        #end
  -        </ul>
  -    #end
  +#macro ( metaauthor $author $email )
  +            <meta name="author" value="$author">
  +            <meta name="email" value="$email">
   #end
   
   #macro ( image $value )
  @@ -133,7 +67,6 @@
   <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">
  @@ -144,7 +77,7 @@
       </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>$value.getText()</pre></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>
  @@ -155,48 +88,109 @@
       </table>
       </div>
   #end
  -
  -
   
  -
  -
  -
  -
  -#* FOR USE LATER
  -#macro ( td $value)
  -#if ($value.getAttributeValue("colspan"))
  -#set $colspan = $value.getAttributeValue("colspan")
  -#end
  -#if ($value.getAttributeValue("rowspan"))
  -#set $rowspan = $value.getAttributeValue("rowspan")
  +#macro ( section $section)
  +    <table border="0" cellspacing="0" cellpadding="2" width="100%">
  +      <tr><td bgcolor="$bannerbg">
  +        <font color="$bannerfg" face="arial,helvetica,sanserif">
  +          <strong>$section.getAttributeValue("name")</strong>
  +        </font>
  +      </td></tr>
  +      <tr><td>
  +        <blockquote>
  +        #foreach ( $items in $section.getChildren() )
  +            #if ($items.getName().equals("img"))
  +                #image ($items)
  +            #elseif ($items.getName().equals("source"))
  +                #source ($items)
  +            #else
  +                $xmlout.outputString($items)
  +            #end
  +        #end
  +        </blockquote>
  +      </td></tr>
  +    </table>
   #end
  -<font color="#000000" size="-1" face="arial,helvetica,sanserif">
  -    <td bgcolor="{$tabletdbg}" colspan="$colspan" rowspan="$rowspan" valign="top" align="left">
  -        $value.getText()&#160;
  -    </td>
  -</font>
  +
  +#macro ( makeProject )
  +    #set $menus = $project.getChild("body").getChildren("menu")
  +    #foreach ( $menu in $menus )
  +        <strong>$menu.getAttributeValue("name")</strong>
  +        <ul>
  +        #foreach ( $item in $menu.getChildren() )
  +            #set $name = $item.getAttributeValue("name")
  +            <li>#projectanchor($name $item.getAttributeValue("href"))</li>
  +        #end
  +        </ul>
  +    #end
   #end
   
  -#macro ( th $value)
  -#if ($value.getAttributeValue("colspan"))
  -#set $colspan = $value.getAttributeValue("colspan")
  +#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">
  +<a href="$project.getAttributeValue("href")"><img src="$project.getChild("logo").getAttributeValue("href")"
alt="$project.getChild("logo").getText()" border="0"/></a>
  +</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
  -#if ($value.getAttributeValue("rowspan"))
  -#set $rowspan = $value.getAttributeValue("rowspan")
   #end
  -<font color="#000000" size="-1" face="arial,helvetica,sanserif">
  -    <td bgcolor="{$tablethbg}" colspan="$colspan" rowspan="$rowspan" valign="top" align="left">
  -        $value.getText()&#160;
  -    </td>
  -</font>
  -#end
  -  FOR USE LATER *#
   
  -#macro ( projectanchor $name $value )
  -    <a href="$relativePath$value">$name</a>
  -#end
  +#macro (document)
  +    <!-- ====================================================================== -->
  +    <!-- Main Page Section -->
  +    <!-- ====================================================================== -->
  +    <html>
  +        <head>
  +            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
   
  -#macro ( metaauthor $author $email )
  -            <meta name="author" value="$author">
  -            <meta name="email" value="$email">
  +            #set $authors = $root.getChild("properties").getChildren("author")
  +            #foreach ( $au in $authors )
  +                #metaauthor ( $au.getText() $au.getAttributeValue("email") )
  +            #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 valign="top" nowrap="true">
  +                    #makeProject()
  +                    </td>
  +                    <td 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-2000, Apache Software Foundation
  +                    </em></font></div>
  +                </td></tr>
  +            </table>
  +        </body>
  +    </html>
   #end
  
  
  
  1.3       +4 -1      jakarta-site2/xdocs/stylesheets/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-site2/xdocs/stylesheets/project.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- project.xml	2000/11/25 22:59:17	1.2
  +++ project.xml	2000/11/27 03:20:43	1.3
  @@ -3,7 +3,10 @@
           href="http://jakarta.apache.org/">
   
       <title>The Jakarta Site</title>
  -
  +    <!-- uncomment and put your project logo here!
  +    <logo href="http://jakarta.apache.org/images/jakarta-logo.gif">The Jakarta Project</logo>
  +    -->
  +    
       <body>
       <menu name="Essentials">
           <item name="Front Page"            href="/index.html"/>
  
  
  

Mime
View raw message