Author: cvrabie
Date: 2008-01-16 17:13:07 +0100 (Wed, 16 Jan 2008)
New Revision: 6867
Modified:
xwiki-products/curriki/trunk/web/src/main/webapp/skins/curriki8/macros.vm
Log:
CURRIKI-1364 Applied the new logo image resizing to all the macros that use it
Modified:
xwiki-products/curriki/trunk/web/src/main/webapp/skins/curriki8/macros.vm
===================================================================
--- xwiki-products/curriki/trunk/web/src/main/webapp/skins/curriki8/macros.vm
2008-01-16 16:06:51 UTC (rev 6866)
+++ xwiki-products/curriki/trunk/web/src/main/webapp/skins/curriki8/macros.vm
2008-01-16 16:13:07 UTC (rev 6867)
@@ -1030,15 +1030,30 @@
#end
#set($logowidth = $xwiki.image.getWidth($srcdoc.fullName,$logofilename))
#set($logoheight = $xwiki.image.getHeight($srcdoc.fullName,$logofilename))
-#if($logowidth > 121)
- #set($logowidth = 121)
+##if($logowidth > 121)
+## #set($logowidth = 121)
+###end
+###if($logoheight > 83)
+## #set($logoheight = 83)
+###end
+
+## find out wich dimmension overflows the most
+#set( $image_resize = "" )
+#if( $logowidth > 120 || $logoheight > 82 )
+ #set( $ratio = $logowidth / $logoheight )
+ #set( $width_overflow = 80 * $ratio )
+ #set( $height_overflow = 120 / $ratio )
+ #if( $width_overflow > 120 )
+ #set( $image_resize = "?width=120")
+ #else
+ #set( $image_resize = "?height=82")
+ #end
#end
-#if($logoheight > 83)
- #set($logoheight = 83)
-#end
+
<div id="asset-metadatas-block-groupimg">
<a href="${sUrl}">
-<img src="$m_logo" width="$logowidth" height="$logoheight"
title="${s.getDisplayTitle()}" alt="${s.getDisplayTitle()}" />
+##<img src="$m_logo" width="$logowidth" height="$logoheight"
title="${s.getDisplayTitle()}" alt="${s.getDisplayTitle()}" />
+<img src="${m_logo}${image_resize}" title="${s.getDisplayTitle()}"
alt="${s.getDisplayTitle()}" />
</a>
</div>
<div id="asset-metadatas-block-groupname">
_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications