You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by si...@apache.org on 2011/10/15 10:26:59 UTC
svn commit: r1183595 -
/maven/sandbox/trunk/skin/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm
Author: simonetripodi
Date: Sat Oct 15 08:26:58 2011
New Revision: 1183595
URL: http://svn.apache.org/viewvc?rev=1183595&view=rev
Log:
added main menu items in the topbar
Modified:
maven/sandbox/trunk/skin/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm
Modified: maven/sandbox/trunk/skin/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/skin/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm?rev=1183595&r1=1183594&r2=1183595&view=diff
==============================================================================
--- maven/sandbox/trunk/skin/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm (original)
+++ maven/sandbox/trunk/skin/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm Sat Oct 15 08:26:58 2011
@@ -7,6 +7,44 @@
#set ( $text = $StringUtils.replace( $text, $documentHeader, '' ) )
#end
+#macro ( topMenu $menus )
+ <!-- $menus -->
+ #foreach( $menu in $menus )
+ #if ( $menu.name )
+ <li class="dropdown" data-dropdown="dropdown" >
+ <a href="#" class="dropdown-toggle">$menu.name</a>
+ <ul class="dropdown-menu">
+ #foreach( $item in $menu.items )
+ #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
+ #set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) )
+ <li>#topLink( $currentItemHref $item.name $item.target )</li>
+ #end
+ </ul>
+ </li>
+ #end
+ #end
+#end
+##
+#macro ( topLink $href $name $target )
+ #set ( $linkTitle = ' title="' + $name + '"' )
+ #if( $target )
+ #set ( $linkTarget = ' target="' + $target + '"' )
+ #else
+ #set ( $linkTarget = "" )
+ #end
+ <a href="$href" $linkTarget title="$name">$name</a>
+#end
+##
+#macro ( topLinks $links )
+ #set ( $counter = 0 )
+ #foreach( $item in $links )
+ #set ( $counter = $counter + 1 )
+ #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
+ #set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) )
+ <li>#topLink( $currentItemHref $item.name $item.target )</li>
+ #end
+#end
+##
#macro ( link $href $name $target $img $position $alt $border $width $height )
#set ( $linkTitle = ' title="' + $name + '"' )
#if( $target )
@@ -468,9 +506,13 @@
<link rel="stylesheet" href="$relativePath/css/maven-base.css" />
<link rel="stylesheet" href="$relativePath/css/maven-theme.css" />
<script type="text/javascript" src="$relativePath/js/jquery-1.6.4.min.js"></script>
+ <script type="text/javascript" src="$relativePath/js/bootstrap-1.3.0-dropdown.js"></script>
<script type="text/javascript">
jQuery( document ).ready( function()
{
+ // initialize the dropdown menu
+ $( '.topbar' ).dropdown();
+
// improve table layout
jQuery( 'table.bodyTable' ).each( function()
{
@@ -532,12 +574,22 @@
#googleAnalytics( $decoration.googleAnalyticsAccountId )
</head>
<body>
- <div class="topbar">
+ <div id="topbar-example" class="topbar" data-dropdown="dropdown">
<div class="topbar-inner">
- <div class="container-fluid">
- <a class="brand" href="$relativePath/index.html">$project.name</a>
- <ul class="nav">
- #links( $decoration.body.links )
+ <div class="container">
+ <h3><a href="$relativePath/index.html">$project.name</a></h3>
+
+ <ul>
+ #topMenu( $decoration.body.menus )
+ </ul>
+
+ <ul class="nav secondary-nav">
+ <li class="menu">
+ <a href="#" class="menu">External Links</a>
+ <ul class="menu-dropdown">
+ #topLinks( $decoration.body.links )
+ </ul>
+ </li>
</ul>
</div>
</div>