jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r763304 - in /jackrabbit/commons/site: pom.xml src/site/apt/index.apt src/site/resources/logo.png src/site/template.vm
Date Wed, 08 Apr 2009 16:16:22 GMT
Author: jukka
Date: Wed Apr  8 16:16:21 2009
New Revision: 763304

URL: http://svn.apache.org/viewvc?rev=763304&view=rev
Log:
commons: Updated site template

Added:
    jackrabbit/commons/site/src/site/resources/logo.png   (with props)
    jackrabbit/commons/site/src/site/template.vm   (with props)
Modified:
    jackrabbit/commons/site/pom.xml
    jackrabbit/commons/site/src/site/apt/index.apt

Modified: jackrabbit/commons/site/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/commons/site/pom.xml?rev=763304&r1=763303&r2=763304&view=diff
==============================================================================
--- jackrabbit/commons/site/pom.xml (original)
+++ jackrabbit/commons/site/pom.xml Wed Apr  8 16:16:21 2009
@@ -41,4 +41,19 @@
 
   <name>JCR Commons website</name>
 
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-site-plugin</artifactId>
+        <configuration>
+          <template>template.vm</template>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
 </project>

Modified: jackrabbit/commons/site/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/jackrabbit/commons/site/src/site/apt/index.apt?rev=763304&r1=763303&r2=763304&view=diff
==============================================================================
--- jackrabbit/commons/site/src/site/apt/index.apt (original)
+++ jackrabbit/commons/site/src/site/apt/index.apt Wed Apr  8 16:16:21 2009
@@ -1,6 +1,6 @@
-                       ------------------
-                       Apache JCR Commons
-                       ------------------
+                       -----------------------------
+                       Welcome to Apache JCR Commons
+                       -----------------------------
 
 ~~ Licensed to the Apache Software Foundation (ASF) under one or more
 ~~ contributor license agreements.  See the NOTICE file distributed with
@@ -17,8 +17,6 @@
 ~~ See the License for the specific language governing permissions and
 ~~ limitations under the License.
 
-Welcome to Apache JCR Commons
-
     The Apache JCR Commons project develops and maintains reusable components
     that are based on or related to the
     {{{http://jcp.org/en/jsr/detail?id=170}Content Repository for Java™

Added: jackrabbit/commons/site/src/site/resources/logo.png
URL: http://svn.apache.org/viewvc/jackrabbit/commons/site/src/site/resources/logo.png?rev=763304&view=auto
==============================================================================
Binary file - no diff available.

Propchange: jackrabbit/commons/site/src/site/resources/logo.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: jackrabbit/commons/site/src/site/template.vm
URL: http://svn.apache.org/viewvc/jackrabbit/commons/site/src/site/template.vm?rev=763304&view=auto
==============================================================================
--- jackrabbit/commons/site/src/site/template.vm (added)
+++ jackrabbit/commons/site/src/site/template.vm Wed Apr  8 16:16:21 2009
@@ -0,0 +1,155 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You 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.
+  -->
+
+#macro ( link $href $name )
+  #if ( ( $href.toLowerCase().startsWith("http") || $href.toLowerCase().startsWith("https")
) )
+    <a href="$href" class="externalLink">$name</a>
+  #else
+    <a href="$href">$name</a>
+  #end
+#end
+
+#macro ( displayTree $display $item )
+  #if ( $item && $item.items && $item.items.size() > 0 )
+    #foreach( $subitem in $item.items )
+      #set ( $subitemHref = $PathTool.calculateLink( $subitem.href, $relativePath ) )
+      #set ( $subitemHref = $subitemHref.replaceAll( "\\", "/" ) )
+      #if ( $alignedFileName == $subitemHref )
+        #set ( $display = true )
+      #end
+
+      #displayTree( $display $subitem )
+    #end
+  #end
+#end
+
+#macro ( menuItem $item )
+  #set ( $collapse = "none" )
+  #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
+  #set ( $currentItemHref = $currentItemHref.replaceAll( "\\", "/" ) )
+
+  #if ( $item && $item.items && $item.items.size() > 0 )
+    #if ( $item.collapse == false )
+      #set ( $collapse = "expanded" )
+    #else
+      ## By default collapsed
+      #set ( $collapse = "collapsed" )
+    #end
+
+    #set ( $display = false )
+    #displayTree( $display $item )
+
+    #if ( $alignedFileName == $currentItemHref || $display )
+      #set ( $collapse = "expanded" )
+    #end
+  #end
+  <li class="$collapse">
+    #if ( $item.img )
+      #if ( ! ( $item.img.toLowerCase().startsWith("http") || $item.img.toLowerCase().startsWith("https")
) )
+        #set ( $src = $PathTool.calculateLink( $item.img, $relativePath ) )
+        #set ( $src = $src.replaceAll( "\\", "/" ) )
+        <img src="$src"/>
+      #else
+        <img src="$item.img" align="absbottom" style="border-width: 0"/>
+      #end
+    #end
+    #if ( $alignedFileName == $currentItemHref )
+      <strong>$item.name</strong>
+    #else
+      #link( $currentItemHref $item.name )
+    #end
+  #if ( $item && $item.items && $item.items.size() > 0 )
+    #if ( $collapse == "expanded" )
+      <ul>
+        #foreach( $subitem in $item.items )
+          #menuItem( $subitem )
+        #end
+      </ul>
+    #end
+  #end
+  </li>
+#end
+
+#macro ( mainMenu $menus )
+  #foreach( $menu in $menus )
+    #if ( $menu.name )
+    <p>$menu.name</p>
+    #end
+    #if ( $menu.items && $menu.items.size() > 0 )
+    <ul>
+      #foreach( $item in $menu.items )
+        #menuItem( $item )
+      #end
+    </ul>
+    #end
+  #end
+#end
+
+<html>
+  <head>
+    <title>$title</title>
+    <link type="text/css" rel="stylesheet"
+          href="http://jackrabbit.apache.org/style/site.css">
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+  </head>
+  <body>
+    <div id="page">
+      <div id="header">
+        <p id="jcr"
+          ><a href="http://jackrabbit.apache.org/commons/"
+            ><img src="http://jackrabbit.apache.org/commons/logo.png"
+                  alt="Apache JCR Commons"
+              ></a></p>
+        <p id="asf"
+          ><a href="http://www.apache.org/"
+            ><img src="http://jackrabbit.apache.org/style/asf-logo.gif"
+                  alt="Apache Software Foundation" height="100" width="387"
+              ></a></p>
+      </div>
+      <div id="body">
+        <div id="navigation">
+          #mainMenu( $decoration.body.menus )
+        </div>
+        <div id="content">
+          <h1>$title.replaceAll(" - Apache JCR Commons", "")</h1>
+          $bodyContent
+        </div>
+        <div id="end"></div>
+      </div>
+      <div id="footer">
+        <p>
+          &copy; 2009 The Apache Software Foundation. -
+          <a href="http://jackrabbit.apache.org/privacy-policy.html"
+            >Privacy Policy</a>
+        </p>
+      </div>
+    </div>
+    <!-- JCR- 1315: Add Google Analytics to Jackrabbit web site -->
+    <script type="text/javascript">
+      var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+      document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js'
type='text/javascript'%3E%3C/script%3E"));
+    </script>
+    <script type="text/javascript">
+      var pageTracker = _gat._getTracker("UA-837900-2");
+      pageTracker._initData();
+      pageTracker._trackPageview();
+    </script>
+  </body>
+</html>

Propchange: jackrabbit/commons/site/src/site/template.vm
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message