This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-fluido-skin.git
The following commit(s) were added to refs/heads/master by this push:
new e29a190 Skip the empty sidebar box when nothing is configured for it
e29a190 is described below
commit e29a190cdbc91a9b49de69da4d4ed20a8a3d12ef
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Sat Oct 31 17:21:29 2026 +0000
Skip the empty sidebar box when nothing is configured for it
Since the default Built by Maven logo was removed, the box below the menu
stayed empty unless search, social buttons or poweredBy were configured.
---
src/it/mskins-14/verify.groovy | 24 ++++++++++++++++++++++++
src/it/mskins-16/verify.groovy | 24 ++++++++++++++++++++++++
src/main/resources/META-INF/maven/site.vm | 16 ++++++++++------
3 files changed, 58 insertions(+), 6 deletions(-)
diff --git a/src/it/mskins-14/verify.groovy b/src/it/mskins-14/verify.groovy
new file mode 100644
index 0000000..8cca5b2
--- /dev/null
+++ b/src/it/mskins-14/verify.groovy
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+
+String html = new File( basedir, "target/site/index.html" ).text
+
+// Google search configured: the box below the menu holds the search form
+assert ( html =~ /class="well sidebar-nav"/ ).size() == 2
+assert html.contains( '<form id="search-form"
action="https://www.google.com/search" method="get" >' )
diff --git a/src/it/mskins-16/verify.groovy b/src/it/mskins-16/verify.groovy
new file mode 100644
index 0000000..2f25c0b
--- /dev/null
+++ b/src/it/mskins-16/verify.groovy
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+
+String html = new File( basedir, "target/site/index.html" ).text
+
+// no search, social buttons or poweredBy configured: only the menu box, no
empty one below it
+assert ( html =~ /class="well sidebar-nav"/ ).size() == 1
+assert !html.contains( 'id="poweredBy"' )
diff --git a/src/main/resources/META-INF/maven/site.vm
b/src/main/resources/META-INF/maven/site.vm
index 9c4845c..0b59b21 100644
--- a/src/main/resources/META-INF/maven/site.vm
+++ b/src/main/resources/META-INF/maven/site.vm
@@ -215,18 +215,22 @@
#* *##mainMenu( $site.body.menus )
#* *##publishDate( "navigation-bottom" $site.publishDate $site.version )
</nav>
+## no empty box when nothing is configured for it
+#* *##if( $searchEnabled || ( $site.getCustomChild(
'fluidoSkin.facebookLike' ) && $project.url )
+ || $site.getCustomChild( 'fluidoSkin.twitter.user' ) || (
$site.poweredBy && !$site.poweredBy.isEmpty() ) )
<div class="well sidebar-nav">
-#* *##if( $searchEnabled )
-#* *##googleSearch( false )
-#* *##end
+#* *##if( $searchEnabled )
+#* *##googleSearch( false )
+#* *##end
<div id="poweredBy">
-#* *##facebookLike( $sideBarEnabled )
+#* *##facebookLike( $sideBarEnabled )
<div class="clear"></div>
-#* *##followTwitter( $sideBarEnabled )
+#* *##followTwitter( $sideBarEnabled )
<div class="clear"></div>
-#* *##builtByLogo( $site.poweredBy )
+#* *##builtByLogo( $site.poweredBy )
</div>
</div>
+#* *##end
</header>
#* *##end
##