You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2022/05/01 10:21:11 UTC

[maven-fluido-skin] 01/01: [MSKINS-169] image height not effective

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch MSKINS-169
in repository https://gitbox.apache.org/repos/asf/maven-fluido-skin.git

commit f56c97745ad8748a91dada70d0acf89606b0d6f5
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun May 1 12:07:53 2022 +0200

    [MSKINS-169] image height not effective
    
    It is also imperative to provide units otherwise the browser will ignore
    them.
    
    Reason for the failure: https://stackoverflow.com/a/44010892/696632
    
    This closes #23
---
 src/it/mskins-16/src/site/site.xml               | 100 +++++++++++------------
 src/main/resources/META-INF/maven/site-macros.vm |  38 ++++-----
 2 files changed, 69 insertions(+), 69 deletions(-)

diff --git a/src/it/mskins-16/src/site/site.xml b/src/it/mskins-16/src/site/site.xml
index 7b13813..8b361e0 100644
--- a/src/it/mskins-16/src/site/site.xml
+++ b/src/it/mskins-16/src/site/site.xml
@@ -1,51 +1,51 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
- -->
-
-<project xmlns="http://maven.apache.org/DECORATION/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 http://maven.apache.org/xsd/decoration-1.1.0.xsd"
-  name="${skinName}">
-
-  <skin>
-    <groupId>${skinGroupId}</groupId>
-    <artifactId>${skinArtifactId}</artifactId>
-    <version>${skinVersion}</version>
-  </skin>
-
-  <bannerLeft>
-    <href>http://www.apache.org</href>
-    <border>0</border>
-    <width>473</width>
-    <height>93</height>
-    <src>images/apache-maven-project-2.png</src>
-  </bannerLeft>
-
-  <bannerRight>
-    <href>http://maven.apache.org</href>
-    <border>1</border>
-    <width>473</width>
-    <height>93</height>
-    <src>images/apache-maven-project-2.png</src>
-  </bannerRight>
-
-  <body/>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+ -->
+
+<project xmlns="http://maven.apache.org/DECORATION/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 http://maven.apache.org/xsd/decoration-1.1.0.xsd"
+  name="${skinName}">
+
+  <skin>
+    <groupId>${skinGroupId}</groupId>
+    <artifactId>${skinArtifactId}</artifactId>
+    <version>${skinVersion}</version>
+  </skin>
+
+  <bannerLeft>
+    <href>http://www.apache.org</href>
+    <border>0</border>
+    <width>473px</width>
+    <height>93px</height>
+    <src>images/apache-maven-project-2.png</src>
+  </bannerLeft>
+
+  <bannerRight>
+    <href>http://maven.apache.org</href>
+    <border>1</border>
+    <width>473px</width>
+    <height>93px</height>
+    <src>images/apache-maven-project-2.png</src>
+  </bannerRight>
+
+  <body/>
 </project>
\ No newline at end of file
diff --git a/src/main/resources/META-INF/maven/site-macros.vm b/src/main/resources/META-INF/maven/site-macros.vm
index aa0151f..73b2e36 100644
--- a/src/main/resources/META-INF/maven/site-macros.vm
+++ b/src/main/resources/META-INF/maven/site-macros.vm
@@ -110,21 +110,21 @@
 #*    *##set ( $imgAlt = ' alt=""' )
 #*  *##end
 #*  *##if( $border )
-#*    *##set ( $imgBorder = ' border="' + $border + '"' )
+#*    *##set ( $imgBorder = 'border: ' + $border + ';' )
 #*  *##else
 #*    *##set ( $imgBorder = "" )
 #*  *##end
 #*  *##if( $width )
-#*    *##set ( $imgWidth = ' width="' + $width + '"' )
+#*    *##set ( $imgWidth = 'width: ' + $width + ';' )
 #*  *##else
 #*    *##set ( $imgWidth = "" )
 #*  *##end
 #*  *##if( $height )
-#*    *##set ( $imgHeight = ' height="' + $height + '"' )
+#*    *##set ( $imgHeight = 'height: ' + $height + ';' )
 #*  *##else
 #*    *##set ( $imgHeight = "" )
 #*  *##end
-<img class="imageLink"$imgSrc$imgAlt$imgBorder$imgWidth$imgHeight/>##
+<img class="imageLink"$imgSrc$imgAlt style="$imgBorder $imgWidth $imgHeight" />##
 #**##end
 #end
 ##
@@ -158,17 +158,17 @@
 #*      *##set ( $alt = ' alt=""' )
 #*    *##end
 #*    *##if( $banner.border )
-#*      *##set ( $imgBorder = ' border="' + $banner.border + '"' )
+#*      *##set ( $imgBorder = 'border: ' + $banner.border + ';' )
 #*    *##else
 #*      *##set ( $imgBorder = "" )
 #*    *##end
 #*    *##if( $banner.width )
-#*      *##set ( $imgWidth = ' width="' + $banner.width + '"' )
+#*      *##set ( $imgWidth = 'width: ' + $banner.width + ';' )
 #*    *##else
 #*      *##set ( $imgWidth = "" )
 #*    *##end
 #*    *##if( $banner.height )
-#*      *##set ( $imgHeight = ' height="' + $banner.height + '"' )
+#*      *##set ( $imgHeight = 'height: ' + $banner.height + ';' )
 #*    *##else
 #*      *##set ( $imgHeight = "" )
 #*    *##end
@@ -177,7 +177,7 @@
 #*    *##else
 #*      *##set ( $bannerTitle="" )
 #*    *##end
-#*    *#<img src="$src" $alt$bannerTitle$imgBorder$imgWidth$imgHeight/>##
+#*    *#<img src="$src" $alt$bannerTitle style="$imgBorder $imgWidth $imgHeight" />##
 #*  *##else
 #*    *#<h2>$banner.name</h2>
 #*  *##end
@@ -336,23 +336,23 @@ $indent     </ul>##
 #*    *##end
 ##
 #*    *##if( $menu.border )
-#*      *##set ( $border = ' border="' + $menu.border + '"' )
+#*      *##set ( $border = 'border: ' + $menu.border + ';' )
 #*    *##else
-#*      *##set ( $border = ' border="0"' )
+#*      *##set ( $border = 'border: 0;' )
 #*    *##end
 ##
 #*    *##if( $menu.width )
-#*      *##set ( $width = ' width="' + $menu.width + '"' )
+#*      *##set ( $width = 'width: ' + $menu.width + ';' )
 #*    *##else
 #*      *##set ( $width = "" )
 #*    *##end
 #*    *##if( $menu.height )
-#*      *##set ( $height = ' height="' + $menu.height + '"' )
+#*      *##set ( $height = 'height: ' + $menu.height + ';' )
 #*    *##else
 #*      *##set ( $height = "" )
 #*    *##end
 ##
-#*    *##set ( $img = '<img class="imageLink"' + $src + $alt + $border + $width + $height + "/>" )
+#*    *##set ( $img = '<img class="imageLink"' + $src + $alt + ' style="' + $border + ' ' + $width + ' ' + $height + '" />' )
 ##
 #*    *##if ( $position == "left" )
    <li class="nav-header">$img $menu.name</li>
@@ -513,24 +513,24 @@ $indent     </ul>##
 #*  *##end
 ##
 #*  *##if( $item.border )
-#*    *##set ( $border = ' border="' + $item.border + '"' )
+#*    *##set ( $border = 'border: ' + $item.border + ';' )
 #*  *##else
 #*    *##set ( $border = "" )
 #*  *##end
 ##
 #*  *##if( $item.width )
-#*    *##set ( $width = ' width="' + $item.width + '"' )
+#*    *##set ( $width = 'width: ' + $item.width + ';' )
 #*  *##else
 #*    *##set ( $width = "" )
 #*  *##end
 #*  *##if( $item.height )
-#*    *##set ( $height = ' height="' + $item.height + '"' )
+#*    *##set ( $height = 'height: ' + $item.height + ';' )
 #*  *##else
 #*    *##set ( $height = "" )
 #*  *##end
 ##
 #*  *#<a href="$href" title="$name" class="builtBy">##
-#*    *#<img class="builtBy" $alt src="$img" $border $width $height />##
+#*    *#<img class="builtBy" $alt src="$img" style="$border $width $height" />##
 #*  *#</a>
 #**##end
 #**##if( $poweredBy.isEmpty() )
@@ -561,7 +561,7 @@ $indent     </ul>##
     piwikTracker.trackPageView();
     piwikTracker.enableLinkTracking();
     } catch( err ) {}
-    </script><noscript><p><img src="http://$piwikUrl/piwik.php?idsite=$idsite" style="border:0" alt="Piwik"/></p></noscript>
+    </script><noscript><p><img src="http://$piwikUrl/piwik.php?idsite=$idsite" style="border: 0;" alt="Piwik"/></p></noscript>
     <!-- End Piwik Tag -->
 #**##end
 #end
@@ -806,7 +806,7 @@ $indent     </ul>##
 ##
     <a class="FlattrButton" style="display:none;" $styleModifier href="$flattrUrl"></a>
     <noscript><a href="https://flattr.com/thing/$flattrThing" target="_blank">
-    <img src="https://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a></noscript>
+    <img src="https://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" style="border: 0;" /></a></noscript>
 ##
 #*  *##if ( $sideBarEnabled )
     </div>