You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2018/03/11 18:16:10 UTC
[maven-fluido-skin] branch master updated: [MSKINS-142] indent html
for sub-menus
This is an automated email from the ASF dual-hosted git repository.
hboutemy 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 7bd5f8b [MSKINS-142] indent html for sub-menus
7bd5f8b is described below
commit 7bd5f8bcefa3147eddccdf41db657e9f86fbdaca
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Sun Mar 11 19:16:01 2018 +0100
[MSKINS-142] indent html for sub-menus
---
src/main/resources/META-INF/maven/site-macros.vm | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/main/resources/META-INF/maven/site-macros.vm b/src/main/resources/META-INF/maven/site-macros.vm
index 810f170..543ee67 100644
--- a/src/main/resources/META-INF/maven/site-macros.vm
+++ b/src/main/resources/META-INF/maven/site-macros.vm
@@ -267,7 +267,7 @@
##
##
##
-#macro ( menuItem $item )
+#macro ( menuItem $item $indent )
#**##set ( $collapseClass = "none" )
#**##set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
#**##set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) )
@@ -289,9 +289,9 @@
#**##end
##
#**##if ( $alignedFileName == $currentItemHref )
- <li class="active">##
+$indent <li class="active">##
#**##else
- <li>##
+$indent <li>##
#**##end
##
#**##if ( $item.img )
@@ -318,11 +318,11 @@
#**##if ( $item && $item.items && $item.items.size() > 0 )
#* *##if ( $collapseClass == "icon-chevron-down" )
- <ul class="nav nav-list">
+$indent <ul class="nav nav-list">
#* *##foreach( $subitem in $item.items )
-#* *##menuItem( $subitem )
+#* *##menuItem( $subitem "$indent " )
#* *##end
- </ul>
+$indent </ul>##
#* *##end
#**##end
#**#</li>
@@ -331,7 +331,7 @@
##
##
#macro ( mainMenu $menus )
- <ul class="nav nav-list">
+ <ul class="nav nav-list">
#**##foreach( $menu in $menus )
#**##if ( $menu.name )
#* *##if ( $menu.img )
@@ -375,21 +375,21 @@
#* *##set ( $img = '<img class="imageLink"' + $src + $alt + $border + $width + $height + "/>" )
##
#* *##if ( $position == "left" )
- <li class="nav-header">$img $menu.name</li>
+ <li class="nav-header">$img $menu.name</li>
#* *##else
- <li class="nav-header">$menu.name $img</li>
+ <li class="nav-header">$menu.name $img</li>
#* *##end
#* *##else
- <li class="nav-header">$menu.name</li>
+ <li class="nav-header">$menu.name</li>
#* *##end
#**##end
#**##if ( $menu.items && $menu.items.size() > 0 )
#* *##foreach( $item in $menu.items )
-#* *##menuItem( $item )
+#* *##menuItem( $item '' )
#* *##end
#**##end
#**##end
-</ul>
+ </ul>
#end
##
##
--
To stop receiving notification emails like this one, please contact
hboutemy@apache.org.