You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by ge...@apache.org on 2002/02/13 11:57:11 UTC

cvs commit: jakarta-velocity-dvsl/src/stylesheets site.dvsl site_printable.dvsl

geirm       02/02/13 02:57:11

  Modified:    src/stylesheets site.dvsl site_printable.dvsl
  Log:
  Patches from Bill Burton <bi...@progress.com>
  
  Revision  Changes    Path
  1.3       +30 -13    jakarta-velocity-dvsl/src/stylesheets/site.dvsl
  
  Index: site.dvsl
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity-dvsl/src/stylesheets/site.dvsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- site.dvsl	11 Jan 2002 01:39:57 -0000	1.2
  +++ site.dvsl	13 Feb 2002 10:57:11 -0000	1.3
  @@ -12,6 +12,15 @@
   #set( $table-th-bg = '#039acc')
   #set( $table-td-bg = '#a0ddf0')
   #set( $source-color = '#023264')
  +#set( $source-font-size = '0')
  +
  +## Double quote for convenience
  +#set ($qq = '"')
  +
  +## Macro to output argument if test evaluates to true
  +#macro(ifset $test $output)
  +#if ( $test )$output#end
  +#end
   
   #match( "document" )
   
  @@ -131,7 +140,12 @@
   
         <tr><td bgcolor="$banner-bg">
             <font color="$banner-fg" face="arial,helvetica.sanserif">
  -          <a name="$attrib.name">
  +          #if ( $attrib.anchor )
  +              #set( $anchor = $attrib.anchor )
  +          #else
  +              #set( $anchor = $attrib.name )
  +          #end
  +          <a name="$anchor">
             <strong>$attrib.name</strong></a></font>
         </td></tr>
   
  @@ -148,7 +162,12 @@
         <!-- Subsection heading -->
         <tr><td bgcolor="$sub-banner-bg">
             <font color="$sub-banner-fg" face="arial,helvetica.sanserif">
  -          <a name="$attrib.name">
  +          #if ( $attrib.anchor )
  +              #set( $anchor = $attrib.anchor )
  +          #else
  +              #set( $anchor = $attrib.name )
  +          #end
  +          <a name="$anchor">
             <strong>$attrib.name</strong></a></font>
         </td></tr>
         <!-- Subsection body -->
  @@ -179,7 +198,7 @@
               <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
             </td>
             <td bgcolor="#ffffff" height="1">
  -          <pre>$toolbox.htmlescape.getText( $node.value() )</pre>
  +          <font size="$source-font-size"><pre>$toolbox.htmlescape.getText( $node.value() )</pre></font>
             </td>
             <td bgcolor="$source-color" width="1">
               <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
  @@ -215,11 +234,10 @@
   #end
   
   #match( "td" )
  -
  -#set ($colspan = $attrib.colspan)
  -#set ($rowspan = $attrib.rowspan)
  -
  -<td bgcolor="$table-td-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top" align="left">
  +<td bgcolor="$table-td-bg" #*
  +    *##ifset($attrib.colspan "colspan=$qq$attrib.colspan$qq ")#*
  +    *##ifset($attrib.rowspan "rowspan=$qq$attrib.rowspan$qq ")#*
  +    *#valign="top" align="left">
       <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          $node.copy( $node.children() )
       </font>
  @@ -227,11 +245,10 @@
   #end
   
   #match( "th" )
  -
  -#set ($colspan = $attrib.colspan )
  -#set ($rowspan = $attrib.rowspan )
  -
  -<td bgcolor="$table-th-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top" align="left">
  +<td bgcolor="$table-th-bg" #*
  +    *##ifset($attrib.colspan "colspan=$qq$attrib.colspan$qq ")#*
  +    *##ifset($attrib.rowspan "rowspan=$qq$attrib.rowspan$qq ")#*
  +    *#valign="top" align="left">
       <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          $node.copy( $node.children())
       </font>
  
  
  
  1.3       +29 -14    jakarta-velocity-dvsl/src/stylesheets/site_printable.dvsl
  
  Index: site_printable.dvsl
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity-dvsl/src/stylesheets/site_printable.dvsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- site_printable.dvsl	11 Feb 2002 11:18:12 -0000	1.2
  +++ site_printable.dvsl	13 Feb 2002 10:57:11 -0000	1.3
  @@ -12,8 +12,15 @@
   #set( $table-th-bg = '#FFEEEE')
   #set( $table-td-bg = '#FFEEEE')
   #set( $source-color = '#CCFFFF')
  +#set( $source-font-size = '-1')
   
  -#set($fontSizeCode = '1')
  +## Double quote for convenience
  +#set ($qq = '"')
  +
  +## Macro to output argument if test evaluates to true
  +#macro(ifset $test $output)
  +#if ( $test )$output#end
  +#end
   
   #match( "document" )
   
  @@ -152,7 +159,12 @@
   
         <tr><td bgcolor="$banner-bg">
             <font color="$banner-fg" face="arial,helvetica.sanserif">
  -          <a name="$attrib.name">
  +          #if ( $attrib.anchor )
  +              #set( $anchor = $attrib.anchor )
  +          #else
  +              #set( $anchor = $attrib.name )
  +          #end
  +          <a name="$anchor">
             <strong>$attrib.name</strong></a></font>
         </td></tr>
   
  @@ -169,7 +181,12 @@
         <!-- Subsection heading -->
         <tr><td bgcolor="$sub-banner-bg">
             <font color="$sub-banner-fg" face="arial,helvetica.sanserif">
  -          <a name="$attrib.name">
  +          #if ( $attrib.anchor )
  +              #set( $anchor = $attrib.anchor )
  +          #else
  +              #set( $anchor = $attrib.name )
  +          #end
  +          <a name="$anchor">
             <strong>$attrib.name</strong></a></font>
         </td></tr>
         <!-- Subsection body -->
  @@ -194,7 +211,7 @@
           <tr>
             
             <td bgcolor="#ffffff" height="1">
  -          <font size="$fontSizeCode"><pre>$toolbox.htmlescape.getText( $node.value() )</pre></font>
  +          <font size="$source-font-size"><pre>$toolbox.htmlescape.getText( $node.value() )</pre></font>
             </td>
             
           </tr>
  @@ -224,11 +241,10 @@
   #end
   
   #match( "td" )
  -
  -#set ($colspan = $attrib.colspan)
  -#set ($rowspan = $attrib.rowspan)
  -
  -<td bgcolor="$table-td-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top" align="left">
  +<td bgcolor="$table-td-bg" #*
  +    *##ifset($attrib.colspan "colspan=$qq$attrib.colspan$qq ")#*
  +    *##ifset($attrib.rowspan "rowspan=$qq$attrib.rowspan$qq ")#*
  +    *#valign="top" align="left">
       <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          $node.copy( $node.children() )
       </font>
  @@ -236,11 +252,10 @@
   #end
   
   #match( "th" )
  -
  -#set ($colspan = $attrib.colspan )
  -#set ($rowspan = $attrib.rowspan )
  -
  -<td bgcolor="$table-th-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top" align="left">
  +<td bgcolor="$table-th-bg" #*
  +    *##ifset($attrib.colspan "colspan=$qq$attrib.colspan$qq ")#*
  +    *##ifset($attrib.rowspan "rowspan=$qq$attrib.rowspan$qq ")#*
  +    *#valign="top" align="left">
       <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          $node.copy( $node.children())
       </font>
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>