avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leosim...@apache.org
Subject cvs commit: jakarta-avalon-phoenix/src/xdocs/stylesheets docs.vsl velocity.properties
Date Sun, 26 May 2002 20:46:17 GMT
leosimons    02/05/26 13:46:17

  Modified:    .        docs.xml
               src/xdocs/stylesheets docs.vsl velocity.properties
  Added:       src/xdocs common.css
  Log:
  start modification of anakia vsl files to use the new L&F we agreed upon. Still need
to do changes.vsl, and figure out what is not quite right with the stylesheet stuff. First
thing in the morning.
  
  When we get this working, will move anakia stuff to jakarta-avalon module.
  
  Revision  Changes    Path
  1.8       +6 -1      jakarta-avalon-phoenix/docs.xml
  
  Index: docs.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/docs.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- docs.xml	25 May 2002 16:14:30 -0000	1.7
  +++ docs.xml	26 May 2002 20:46:17 -0000	1.8
  @@ -74,10 +74,15 @@
        <copy todir="${docs.dir}" filtering="off">
         <fileset dir="${xdocs.dir}">
           <include name="**/images/**"/>
  +        <include name="**/*.gif"/>
  +        <include name="**/*.jpg"/>
  +        <include name="**/*.png"/>
  +        <include name="**/*.css"/>
  +        <include name="**/*.js"/>
         </fileset>
       </copy>
       </target>
  -    
  +
     <!-- Create the API documentation -->
     <target name="javadocs">
   
  
  
  
  1.1                  jakarta-avalon-phoenix/src/xdocs/common.css
  
  Index: common.css
  ===================================================================
  html body, body div, body p, body th, body td, body li, body dl, body dd, input, select,
textarea {
   font-family: Arial, Helvetica, sans-serif;
   }
  p, ul, ol, dl {
   margin-top: .67em;
   margin-bottom: .67em;
   }
  table, th, td {
   border: none
   }
  form {
   margin-top: 0;
   margin-bottom: 0;
   }
  
  body {
  	margin: 0px;
  	padding: 10px;
  }
  body, td {
  	background-color: white;
  	color: black;
  	font-family: Arial, Helvetica, sans-serif;
  	font-size: 11pt;
  }
  p {
  	text-align: justify;
  }
  div {
  	margin: 0px;
  	padding: 0px;
  }
  h1, h2, h3, h4, h5, h6 {
  	page-break-after: avoid;
  	color: black;
  	font-family: Verdana, Arial, sans-serif;
  	font-weight: bold;
  	padding: 0px;
  	margin: 0px;
  	margin-left: 40px;
  }
  h1 {
  	border: 1px solid #003366;
  	font-size: 18pt;
  	padding: 2px;
  	margin-bottom: 10px;
  	text-align: center;
  	background-color: #EEEEFF;
  	margin-left: 0px;
  }
  
  h2 {
  	font-size: 16pt;
  }
  h3 {
  	font-size: 14pt;
  	color: #000033;
  }
  h4 {
  	font-size: 12pt;
  	color: #000066;
  }
  h5 {
  	font-size: 11pt;
  	font-style: italic;
  	text-align: center;
  	color: #333399;
  	margin-left: 0px;
  }
  h6 {
  	font-size: 10pt;
  	text-align: center;
  	font-weight: normal;
  	color: #3333CC;
  	margin-left: 0px;
  }
  a, a:visited {
  	color: #336699;
  }
  a:hover, a:active {
  	color: #003366;;
  }
  #breadcrumbs {
  	border-top: 1px solid #003366;
  	border-bottom: 1px solid #003366;
  	margin-top: 10px;
  	margin-bottom: 20px;
  	padding-top: 0px;
  	padding-bottom: 2px;
  	padding-left: 10px;
  	font-size: 10pt;
  	font-weight: bold;
  }
  #menu {
  	border: 1px solid #003366;
  	width: 175px;
  }
  #menu h4 {
  	margin: 0px;
  	padding-left: 5px;
  	padding-top: 2px;
  	padding-bottom: 2px;
  	color: black;
  	text-align: left;
  	font-style: normal;
  	font-size: 10pt;
  	background-color: #EEEEFF;
  }
  #submenu h4 {
  	margin: 0px;
  	padding-left: 5px;
  	padding-top: 2px;
  	padding-bottom: 2px;
  	color: black;
  	text-align: left;
  	font-style: normal;
  	font-size: 10pt;
  	background-color: #EEEEFF;
  }
  #submenu ul {
  	margin-top: 5px;
  	margin-bottom: 5px;
  }
  #authors {
  	font-size: 10px;
  	text-align: right;
  }
  #footer {
  	border-top: 1px solid #003366;
  	margin-top: 20px;
  	padding: 3px;
  	text-align: center;
  	font-size: 9pt;
  	font-style: italic;
  }
  a.breadcrumbs, a.breadcrumbs:visited, a.menu, a.menu:visited {
  	font-size: 10pt;
  	font-weight: bold;
  	text-decoration: none;
  }
  a.breadcrumbs:hover, a.breadcrumbs:active, a.menu:hover, a.menu:active {
  	text-decoration: underline;
  }
  .section {
  	margin-left: 40px;
  }
  .code {
  	font-family: Courier, Courier New, monospace;
  	padding: 4px;
  	border: 1px solid #003366;
  }
  .code, pre {
  	font-size: 11px;
  }
  .section .code {
  	margin-left: -40px;
  }
  .section .section .code {
  	margin-left: -80px;
  }
  @media print {
  	body td {
  		font-family: Times New Roman, Zurich Bt, serif;
  		font-size: 10pt;
  	}
  	#menu h4 {
  		margin-left: 0px;
  	}
  	.code {
  		page-break-inside: avoid;
  	}
  	p ul {
  		page-break-inside: avoid;
  	}
  	.section .code {
  		margin-left: 0px;
  	}
  	#menu {
  		display: none;
  		width: 0px;
  	}
  	#contents div {
  		margin: 0px;
  	}
  }
  
  
  
  
  1.3       +307 -78   jakarta-avalon-phoenix/src/xdocs/stylesheets/docs.vsl
  
  Index: docs.vsl
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/xdocs/stylesheets/docs.vsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- docs.vsl	23 May 2002 11:43:13 -0000	1.2
  +++ docs.vsl	26 May 2002 20:46:17 -0000	1.3
  @@ -1,92 +1,321 @@
  -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  +## start the processing
  +#document()
   
  -<!-- Content Stylesheet for Site -->
  +##
  +## Macros for generation of the pages main sections and section contents
  +##
   
  -    ## 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")
  +#macro (table $table)
  +<table>
  +    #foreach ($items in $table.getChildren())
  +        #if ($items.getName().equals("tr"))
  +            #tr ($items)
  +        #end
  +    #end
  +</table>
  +#end
   
  -<!-- start the processing -->
  -#document()
  -<!-- end the processing -->
  +#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 colspan="$!colspan" rowspan="$!rowspan" valign="top" align="left">
  +	#if ($value.getText().length() != 0 || $value.hasChildren())
  +		$value.getContent()
  +	#else
  +		&nbsp;
  +	#end
  +</td>
  +#end
   
  -## This is where the common page macro's live
  +#macro (th $value)
  +	#if ($value.getAttributeValue("colspan"))
  +		#set ($colspan = $value.getAttributeValue("colspan"))
  +	#end
  +	#if ($value.getAttributeValue("rowspan"))
  +		#set ($rowspan = $value.getAttributeValue("rowspan"))
  +	#end
  +<td class="th" colspan="$!colspan" rowspan="$!rowspan" valign="top" align="left">
  +	#if ($value.getText().length() != 0 || $value.hasChildren())
  +		$value.getContent()
  +	#else
  +		&nbsp;
  +	#end
  +</td>
  +#end
   
  -#macro ( subsection $subsection)
  -  <table border="0" cellspacing="0" cellpadding="2" width="100%">
  -    <tr><td bgcolor="$subbannerbg">
  -      <font color="$subbannerfg" face="arial,helvetica,sanserif">
  -        #if ( $subsection.getAttributeValue("anchor") )
  -          #set ($anchor = $subsection.getAttributeValue("anchor"))
  -        #else
  -          #set ($anchor = $subsection.getAttributeValue("name"))
  -        #end
  -        <a name="$anchor"><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
  -          $xmlout.outputString($items)
  +#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 class="code"><pre class="code">
  +$escape.getText($value.getText())
  +	</pre></div>
  +#end
  +
  +#macro (subsection $subsection)
  +		<a name="$subsection.getAttributeValue("name")"><h3>$subsection.getAttributeValue("name")</h3></a>
  +		<div class="subsection">
  +        #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
  -      #end
  -      </blockquote>
  -    </td></tr>
  -  </table>
  +		</div>
   #end
   
  -#macro ( section $section)
  -  <table border="0" cellspacing="0" cellpadding="2" width="100%">
  -    <tr><td bgcolor="$bannerbg">
  -      <font color="$bannerfg" face="arial,helvetica,sanserif">
  -      #if ( $section.getAttributeValue("anchor") )
  -        #set ($anchor = $section.getAttributeValue("anchor"))
  -      #else
  -        #set ($anchor = $section.getAttributeValue("name"))
  -      #end
  -        <a name="$anchor"><strong>$section.getAttributeValue("name")</strong></a>
  -      </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)
  -        #elseif ($items.getName().equals("table"))
  -          #table ($items)
  -        #elseif ($items.getName().equals("subsection"))
  -          #subsection ($items)
  -        #else
  -          $xmlout.outputString($items)
  +#macro (section $section)
  +	<a name="$section.getAttributeValue("name")"><h2>$section.getAttributeValue("name")</h2></a>
  +	<div class="section">
  +        #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
  +	</div>
  +#end
  +
  +##
  +## 'Utility' macros
  +##
  +
  +#macro (projectAnchor $name $value)
  +#if ($value.startsWith("http://"))
  +    <a href="$value" class="menu">$name</a>
  +#elseif ($value.startsWith("/site"))
  +    <a href="http://jakarta.apache.org$value" class="menu">$name</a>
  +#else
  +    <a href="$relativePath$value" class="menu">$name</a>
  +#end
  +#end
  +
  +#macro (metaAuthor $author $email)
  +            <meta name="author" value="$author" />
  +            <meta name="email" value="$email" />
  +#end
  +
  +#macro (printMeta $metaElement)
  +	<meta #set ($attribs = $metaElement.getAttributes())
  +	#foreach ($a in $attribs) $a.getName()="$a.getValue()" #end />
  +#end
  +
  +##
  +## Macros for generation of all the bells and whistles around the content
  +##
  +
  +## print html <title/> info
  +#macro (getTitle)
  +			<title>$project.getChild("title").getText() - $root.getChild("header").getChild("title").getText()</title>
  +#end
  +
  +## print html <meta author=""/> info
  +#macro (getAuthors)
  +      #set ($authors = $root.getChild("header").getChildren("author"))
  +      #foreach ( $au in $authors )
  +        #metaAuthor ( $au.getAttributeValue("name") $au.getAttributeValue("email") )
         #end
  -      </blockquote>
  -    </td></tr>
  -  </table>
   #end
   
  +## print html <meta/> info
  +#macro (getMetas)
  +	#set ($metas = $root.getChildren("meta"))
  +	#foreach ($meta in $metas) #printMeta($meta) #end
  +#end
  +
  +## print html <style/> info
  +#macro (getStylesheet)
  +			<link rel="stylesheet" type="text/css" href="./common.css" />
  +#end
  +
  +## print html for the page header
  +#macro (getHeader)
  +#if ($project.getChild("logo"))
  +			<div id="header"><table width="100%" border="0" cellpadding="0" cellspacing="0">
  +				<tr>
  +					<td id="jakartaLogoTD" valign="middle" align="left"><a href="http://jakarta.apache.org"><img
id="jakartaLogo" src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="Jakarta Project
(go to homepage)" border="0" /></a></td>
  +					<td id="projectLogoTD" valign="middle" align="right">
  +#set ($logoString = $project.getChild("logo").getAttributeValue("href"))
  +#if ($logoString.startsWith("/"))
  +						<a href="$project.getAttributeValue("href")"><img id="projectLogo" src="$relativePath$logoString"
alt="$project.getChild("logo").getText()" border="0"/></a>
  +#else
  +						<a href="$project.getAttributeValue("href")"><img id="projectLogo" src="$relativePath/$logoString"
alt="$project.getChild("logo").getText()" border="0"/></a>
  +#end
  +					</td>
  +				</tr>
  +			</table></div>
  +#else
  +					<div id="header"><a href="http://jakarta.apache.org"><img id="jakartaLogo"
src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="Jakarta Project (go to homepage)"
border="0" /></a></div>
  +#end
  +#end
  +
  +## print html to call breadcrumb trail javascript
  +#macro (getBreadCrumbs)
  +			<div id="breadcrumbs">
  +				<a href="http://www.apache.org" class="breadcrumbs">Apache.org</a> &gt;
  +				<a href="/" class="breadcrumbs">Jakarta</a> &gt;
  +				<a href="/avalon" class="breadcrumbs">Avalon</a> &gt;
  +				## $relativePath contains the info I need. How to extract it?
  +				## the only option I know is to a) change anakia
  +				##								b) use javascript
  +				<script language="JavaScript1.2" type="text/javascript">
  +				<!--
  +					function sentenceCase(str) {
  +						var lower = str.toLowerCase();
  +						return lower.substr(0,1).toUpperCase() + lower.substr(1);
  +					}
  +					function getDirsAsArray() {
  +						var href = document.location.href + "";
  +						if(href.indexOf("jakarta.apache.org") == -1) return; // makes sure the script only
prints stuff when online. How to handle mirrors, though?
  +						var trail = document.location.pathname + "";
  +						var trail = trail.split("/");
  +						var lastdir = (trail[trail.length-1].indexOf(".html") != -1)? trail.length-2 : trail.length-1;
  +						var urlprefix = "/avalon/";
  +						var postfix = " &gt";
  +						for(var i = 1; i <= lastdir; i++) {
  +							document.writeln('<a href=' + urlprefix + trail[i] + ' class="menu">' + sentenceCase(trail[i])
+ '</a>'+postfix);
  +							urlprefix += trail[i] + "/";
  +							if(i == lastdir-1) postfix = ":";
  +						}
  +					}
  +					getDirsAsArray();
  +				// -->
  +				</script>
  +			</div>
  +#end
  +
  +## create the bulk of the html page
  +#macro (getMain)
  +			<div id="main"><table width="100%" border="0" cellpadding="0" cellspacing="0">
  +						<tr>
  +									<td valign="top">
  +									<!-- menu column -->
  +					                    #getMenu()
  +									<!-- end menu column -->
  +									</td>
  +									<!-- spacer -->
  +									<td width="10">&nbsp;</td>
  +									<td valign="top">
  +									<!-- contents column -->
  +										#getContents()
  +									<!-- end contents column -->
  +									</td>
  +						</tr>
  +			</table></div>
  +#end
  +
  +#macro (getMenu)
  +    #set ($menus = $project.getChild("body").getChildren("menu"))
  +    #foreach ( $menu in $menus )
  +			<div id="submenu">
  +						<h4>$menu.getAttributeValue("name")</h4>
  +						<ul>
  +				        #foreach ( $item in $menu.getChildren() )
  +				            #set ($name = $item.getAttributeValue("name"))
  +				            <li>#projectAnchor($name $item.getAttributeValue("href"))</li>
  +				        #end
  +						</ul>
  +			</div>
  +    #end
  +#end
  +
  +#macro (getContents)
  +<div id="contents">
  +	<h1>$project.getChild("title").getText() - $root.getChild("header").getChild("title").getText()</h1>
  +
  +	#set ($allSections = $root.getChild("body").getChildren("section"))
  +	#foreach ( $section in $allSections )
  +		#section ($section)
  +	#end
  +	#getAuthorList()
  +</div>
  +#end
  +
  +#macro (getAuthorList)
  +	<div id="authors">by
  +	#set ($authors = $root.getChild("header").getChildren("author"))
  +	#foreach ( $au in $authors )
  +		<a href="$au.getAttributeValue("email")">$au.getAttributeValue("name")</a>,
  +	#end
  +	</div>
  +
  +#end
  +
  +## print html for the page footer
  +#macro (getFooter)
  +			<div id="footer">
  +						 Copyright &copy;1999-2002 by the Apache Software Foundation. All Rights Reserved.
  +			</div>
  +#end
  +
  +##
  +## create the html document, sort of 'root' function
  +##
  +
   #macro (document)
  -  #header()
  -  #set ($allSections = $root.getChild("body").getChildren("section"))
  -  #foreach ( $section in $allSections )
  -    #section ($section)
  -    <br/>
  -  #end
  -  #footer()
  +	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  +			"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  +	<html xmlns="http://www.w3.org/1999/xhtml">
  +        <head>
  +            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
  +            #getTitle()
  +            #getAuthors()
  +			#getMetas()
  +			#getStylesheet()
  +        </head>
  +
  +		<body>
  +			<!-- header -->
  +                    #getHeader()
  +			<!-- end header -->
  +			<!-- breadcrumb trail -->
  +					#getBreadCrumbs()
  +			<!-- end breadcrumb trail -->
  +			<!-- main section of page -->
  +					#getMain()
  +			<!-- end main section of page -->
  +			<!-- footer -->
  +					#getFooter()
  +			<!-- end footer -->
  +		</body>
  +	</html>
   #end
  +
  
  
  
  1.3       +1 -1      jakarta-avalon-phoenix/src/xdocs/stylesheets/velocity.properties
  
  Index: velocity.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/xdocs/stylesheets/velocity.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- velocity.properties	23 May 2002 11:43:13 -0000	1.2
  +++ velocity.properties	26 May 2002 20:46:17 -0000	1.3
  @@ -1,2 +1,2 @@
   file.resource.loader.path=src/xdocs/stylesheets
  -velocimacro.library=templates.vm
  +# disable this for now velocimacro.library=templates.vm
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message