[DOXIASITETOOLS-150] use new $decoration.isLink($href) in default skin
git-svn-id: https://svn.apache.org/repos/asf/maven/doxia/doxia-sitetools/trunk@1729275 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/doxia-site-renderer/src/main/resources/org/apache/maven/doxia/siterenderer/resources/default-site.vm b/doxia-site-renderer/src/main/resources/org/apache/maven/doxia/siterenderer/resources/default-site.vm
index 9176c70..e73b8aa 100644
--- a/doxia-site-renderer/src/main/resources/org/apache/maven/doxia/siterenderer/resources/default-site.vm
+++ b/doxia-site-renderer/src/main/resources/org/apache/maven/doxia/siterenderer/resources/default-site.vm
@@ -24,9 +24,7 @@
#else
#set ( $linkTarget = "" )
#end
- #if ( $href.toLowerCase().startsWith("http:/") || $href.toLowerCase().startsWith("https:/") ||
- $href.toLowerCase().startsWith("ftp:/") || $href.toLowerCase().startsWith("mailto:") ||
- $href.toLowerCase().startsWith("file:/") || ($href.toLowerCase().indexOf("://") != -1) )
+ #if ( $decoration.isLink( $href ) )
#set ( $linkClass = ' class="externalLink"' )
#else
#set ( $linkClass = "" )
@@ -44,9 +42,7 @@
##
#macro ( image $img $alt $border $width $height $title )
#if( $img )
- #if ( ! ( $img.toLowerCase().startsWith("http:/") || $img.toLowerCase().startsWith("https:/") ||
- $img.toLowerCase().startsWith("ftp:/") || $img.toLowerCase().startsWith("mailto:") ||
- $img.toLowerCase().startsWith("file:/") || ($img.toLowerCase().indexOf("://") != -1) ) )
+ #if ( !$decoration.isLink( $img ) )
#set ( $imgSrc = $PathTool.calculateLink( $img, $relativePath ) )
#set ( $imgSrc = $imgSrc.replaceAll( '\\', '/' ) )
#set ( $imgSrc = ' src="' + $imgSrc + '"' )
@@ -85,9 +81,7 @@
#if ( $banner )
#if( $banner.href )
#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) ) )
+ #if ( !$decoration.isLink( $hrf ) )
#set ( $hrf = $PathTool.calculateLink( $hrf, $relativePath ) )
#set ( $hrf = $hrf.replaceAll( '\\', '/' ) )
#if ( ( $hrf == '' ) )
@@ -101,9 +95,7 @@
##
#if( $banner.src )
#set ( $src = $banner.src )
- #if ( ! ( $src.toLowerCase().startsWith("http:/") || $src.toLowerCase().startsWith("https:/") ||
- $src.toLowerCase().startsWith("ftp:/") || $src.toLowerCase().startsWith("mailto:") ||
- $src.toLowerCase().startsWith("file:/") || ($src.toLowerCase().indexOf("://") != -1) ) )
+ #if ( !$decoration.isLink( $src ) )
#set ( $src = $PathTool.calculateLink( $src, $relativePath ) )
#set ( $src = $src.replaceAll( '\\', '/' ) )
#end
@@ -231,9 +223,7 @@
#set ( $position = "left" )
#end
##
- #if ( ! ( $menu.img.toLowerCase().startsWith("http:/") || $menu.img.toLowerCase().startsWith("https:/") ||
- $menu.img.toLowerCase().startsWith("ftp:/") || $menu.img.toLowerCase().startsWith("mailto:") ||
- $menu.img.toLowerCase().startsWith("file:/") || ($menu.img.toLowerCase().indexOf("://") != -1) ) )
+ #if ( !$decoration.isLink( $menu.img ) )
#set ( $src = $PathTool.calculateLink( $menu.img, $relativePath ) )
#set ( $src = $src.replaceAll( '\\', '/' ) )
#set ( $src = ' src="' + $src + '"' )
@@ -430,9 +420,7 @@
#set ( $img = "images/logos/maven-feather.png" )
#end
##
- #if ( ! ( $img.toLowerCase().startsWith("http:/") || $img.toLowerCase().startsWith("https:/") ||
- $img.toLowerCase().startsWith("ftp:/") || $img.toLowerCase().startsWith("mailto:") ||
- $img.toLowerCase().startsWith("file:/") || ($img.toLowerCase().indexOf("://") != -1) ) )
+ #if ( !$decoration.isLink( $img ) )
#set ( $img = $PathTool.calculateLink( $img, $relativePath ) )
#set ( $img = $img.replaceAll( '\\', '/' ) )
#end