maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ltheu...@apache.org
Subject svn commit: r1054240 - /maven/skins/trunk/maven-stylus-skin/src/main/resources/META-INF/maven/site.vm
Date Sat, 01 Jan 2011 14:47:23 GMT
Author: ltheussl
Date: Sat Jan  1 14:47:23 2011
New Revision: 1054240

URL: http://svn.apache.org/viewvc?rev=1054240&view=rev
Log:
[MSKINS-9] stylus skin does not relativize banner hrefs

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

Modified: maven/skins/trunk/maven-stylus-skin/src/main/resources/META-INF/maven/site.vm
URL: http://svn.apache.org/viewvc/maven/skins/trunk/maven-stylus-skin/src/main/resources/META-INF/maven/site.vm?rev=1054240&r1=1054239&r2=1054240&view=diff
==============================================================================
--- maven/skins/trunk/maven-stylus-skin/src/main/resources/META-INF/maven/site.vm (original)
+++ maven/skins/trunk/maven-stylus-skin/src/main/resources/META-INF/maven/site.vm Sat Jan
 1 14:47:23 2011
@@ -27,7 +27,15 @@
 #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")
) )
+        #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