continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1428177 - /continuum/skin/trunk/src/main/resources/META-INF/maven/site.vm
Date Thu, 03 Jan 2013 06:46:36 GMT
Author: brett
Date: Thu Jan  3 06:46:36 2013
New Revision: 1428177

URL: http://svn.apache.org/viewvc?rev=1428177&view=rev
Log:
incorporate recent improvements from the Stylus Skin to relativize links in
the banner, so that it works in paths like /development/

Modified:
    continuum/skin/trunk/src/main/resources/META-INF/maven/site.vm

Modified: continuum/skin/trunk/src/main/resources/META-INF/maven/site.vm
URL: http://svn.apache.org/viewvc/continuum/skin/trunk/src/main/resources/META-INF/maven/site.vm?rev=1428177&r1=1428176&r2=1428177&view=diff
==============================================================================
--- continuum/skin/trunk/src/main/resources/META-INF/maven/site.vm (original)
+++ continuum/skin/trunk/src/main/resources/META-INF/maven/site.vm Thu Jan  3 06:46:36 2013
@@ -11,7 +11,17 @@
 #macro ( banner $banner $id )
   #if ( $banner )
     #if( $banner.href )
-      <a href="$banner.href" id="$id">
+      #set ( $hrf = $banner.href )
+      #if ( ! ( $hrf.toLowerCase().startsWith("http:/") || $hrf.toLowerCase().startsWith("https:/")
||
+        $hrf.toLowerCase().startsWith("ftp:/") || $hrf.toLowerCase().startsWith("mailto:")
||
+        $hrf.toLowerCase().startsWith("file:/") || ($hrf.toLowerCase().indexOf("://") !=
-1) ) )
+        #set ( $hrf = $PathTool.calculateLink( $hrf, $relativePath ) )
+        #set ( $hrf = $hrf.replaceAll( '\\', '/' ) )
+        #if ( ( $hrf == '' ) )
+          #set ( $hrf = './' )
+        #end
+      #end
+      <a href="$hrf" id="$id">
     #else
         <span id="$id">
     #end



Mime
View raw message