You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by br...@apache.org on 2013/01/03 07:46:36 UTC
svn commit: r1428177 -
/continuum/skin/trunk/src/main/resources/META-INF/maven/site.vm
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