Skip to content

Commit

Permalink
[MSKINS-169] Image height not effective
Browse files Browse the repository at this point in the history
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
  • Loading branch information
michael-o committed May 1, 2022
1 parent 7e92f9b commit 98dd26b
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 73 deletions.
1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ under the License.
<goals>
<goal>site</goal>
</goals>
<streamLogsOnFailures>true</streamLogsOnFailures>
</configuration>
<executions>
<execution>
Expand Down
100 changes: 50 additions & 50 deletions src/it/mskins-16/src/site/site.xml
Original file line number Diff line number Diff line change
@@ -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>
2 changes: 1 addition & 1 deletion src/it/mskins-75/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ assert 1 == index.getText().count( '''\
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script><noscript><p><img src="http://example.org/piwik/piwik.php?idsite=1" style="border:0" alt="Piwik"/></p></noscript>
</script><noscript><p><img src="http://example.org/piwik/piwik.php?idsite=1" style="border: 0;" alt="Piwik"/></p></noscript>
<!-- End Piwik Tag -->
'''.replace( "\n", System.getProperty( "line.separator" ) ) )
2 changes: 1 addition & 1 deletion src/it/mskins-76/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ assert 1 == index.getText().count( '''\
assert 1 == index.getText().count( '''\
<a class="FlattrButton" style="display:none;" href="http://opensource.org/"></a>
<noscript><a href="https://flattr.com/thing/448050/Open-Source-Initiative-OSI" target="_blank">
<img src="https://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a></noscript>'''.replace( "\n", System.getProperty( "line.separator" ) ) )
<img src="https://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" style="border: 0;" /></a></noscript>'''.replace( "\n", System.getProperty( "line.separator" ) ) )
2 changes: 1 addition & 1 deletion src/it/mskins-76_topbar/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ assert 1 == index.getText().count( '''\
assert 1 == index.getText().count( '''\
<a class="FlattrButton" style="display:none;" rev="flattr;button:compact;" href="http://opensource.org/"></a>
<noscript><a href="https://flattr.com/thing/448050/Open-Source-Initiative-OSI" target="_blank">
<img src="https://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a></noscript>'''.replace( "\n", System.getProperty( "line.separator" ) ) )
<img src="https://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" style="border: 0;" /></a></noscript>'''.replace( "\n", System.getProperty( "line.separator" ) ) )
38 changes: 19 additions & 19 deletions src/main/resources/META-INF/maven/site-macros.vm
Original file line number Diff line number Diff line change
Expand Up @@ -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
##
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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() )
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit 98dd26b

Please sign in to comment.