jon 00/11/22 14:24:33
Modified: examples/anakia/xdocs/stylesheets project.xml site.vsl
Log:
added project functionality
Revision Changes Path
1.2 +9 -37 jakarta-velocity/examples/anakia/xdocs/stylesheets/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/jakarta-velocity/examples/anakia/xdocs/stylesheets/project.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- project.xml 2000/11/22 19:36:45 1.1
+++ project.xml 2000/11/22 22:24:32 1.2
@@ -4,41 +4,13 @@
<title>Jakarta Site</title>
- <menu name="Essentials">
- <item name="Front Page" href="index.html"/>
- <item name="News & Status" href="news.html"/>
- <item name="Mission" href="mission.html"/>
- <item name="Guidelines Notes" href="guidelines.html"/>
- <item name="FAQs" href="faqs.html"/>
- </menu>
-
- <menu name="Download">
- <item name="Binaries" href="binindex.html"/>
- <item name="Source Code" href="sourceindex.html"/>
- </menu>
-
- <menu name="Get Involved">
- <item name="Overview" href="getinvolved.html"/>
- <item name="CVS Repositories" href="cvsindex.html"/>
- <item name="Mailing Lists" href="mail.html"/>
- <item name="Reference Library" href="reference.html"/>
- <item name="Bug Database" href="bugs.html"/>
- </menu>
-
- <menu name="SubProjects">
- <item name="Ant" href="/ant/index.html"/>
- <item name="ORO" href="/oro/index.html"/>
- <item name="Regexp" href="/regexp/index.html"/>
- <item name="Slide" href="/slide/index.html"/>
- <item name="Struts" href="/struts/index.html"/>
- <item name="Taglibs" href="/taglibs/index.html"/>
- <item name="Tomcat" href="/tomcat/index.html"/>
- <item name="Velocity" href="/velocity/index.html"/>
- <item name="Watchdog" href="/watchdog/index.html"/>
- </menu>
-
- <menu name="Credits">
- <item name="Who We Are" href="whoweare.html"/>
- <item name="Acknowledgements" href="acknowledgements.txt"/>
- </menu>
+ <body>
+ <menu name="Home">
+ <item name="Front Page" href="index.html"/>
+ </menu>
+
+ <menu name="About">
+ <item name="About" href="about/index.html"/>
+ </menu>
+ </body>
</project>
1.3 +33 -12 jakarta-velocity/examples/anakia/xdocs/stylesheets/site.vsl
Index: site.vsl
===================================================================
RCS file: /home/cvs/jakarta-velocity/examples/anakia/xdocs/stylesheets/site.vsl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- site.vsl 2000/11/22 21:54:02 1.2
+++ site.vsl 2000/11/22 22:24:32 1.3
@@ -30,27 +30,48 @@
<title>$root.getChild("properties").getChild("title").getText()</title>
</head>
- <body bgcolor="$bodybg" text="$bodyfg" link="$bodylink">
- #set $sections = $root.getChild("body").getChildren("section")
- #foreach ( $sec in $sections )
- #set $data = $sec.getChildren()
- #foreach ( $item in $data )
- #if ($item.getName().equals("img"))
- #image ($item)
- #else
- $xmlout.outputString($item)
+ <body bgcolor="$bodybg" text="$bodyfg" link="$bodylink">
+ <table border="1">
+ <tr>
+ <td>
+ #makeProject()
+ </td>
+ <td>
+ #set $sections = $root.getChild("body").getChildren("section")
+ #foreach ( $sec in $sections )
+ #foreach ( $item in $sec.getChildren() )
+ #if ($item.getName().equals("img"))
+ #image ($item)
+ #else
+ $xmlout.outputString($item)
+ #end
#end
#end
- #end
+ </td>
+ </tr>
+ </table>
</body>
</html>
#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
+#end
+
#macro ( image $value )
<img src="$relativePath$value.getAttributeValue("src")">
#end
-#macro ( projectanchor $value )
- <a href="$relativePath$value.getAttributeValue("href")">
+#macro ( projectanchor $name $value )
+ <a href="$relativePath$value">$name</a>
#end
#macro ( metaauthor $author $email )
<meta name="author" value="$author">