| ## 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. |
| ## |
| #macro ( topMenu $menus ) |
| #**##foreach( $menu in $menus ) |
| #**##if ( $menu.name ) |
| <li class="dropdown"> |
| <a class="dropdown-toggle" data-toggle="dropdown">$menu.name <b class="caret"></b></a> |
| <ul class="dropdown-menu"> |
| #* *##foreach( $item in $menu.items ) |
| #* *##if ( $item.items.size() > 0 ) |
| <li class="dropdown-submenu"> |
| #* *##set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) ) |
| #* *##set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) ) |
| #* *##topLink( $currentItemHref $item.name $item.target ) |
| |
| <ul class="dropdown-menu"> |
| #* *##foreach( $subitem in $item.items ) |
| #* *##set ( $currentItemHref = $PathTool.calculateLink( $subitem.href, $relativePath ) ) |
| #* *##set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) ) |
| <li>#topLink( $currentItemHref $subitem.name $subitem.target )</li> |
| #* *##end |
| </ul> |
| </li> |
| #* *##else |
| #* *##set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) ) |
| #* *##set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) ) |
| <li>#topLink( $currentItemHref $item.name $item.target )</li> |
| #* *##end |
| #* *##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 |
| #**##if ( $alignedFileName == $href ) |
| #* *#<a title="$name">$name</a>## |
| #**##else |
| #* *#<a href="$href"$linkTarget title="$name">$name</a>## |
| #**##end |
| #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 $icon ) |
| #**##set ( $linkTitle = ' title="' + $name + '"' ) |
| #**##if( $target ) |
| #* *##set ( $linkTarget = ' target="' + $target + '"' ) |
| #**##else |
| #* *##set ( $linkTarget = "" ) |
| #**##end |
| #**##if ( $decoration.isLink( $href ) ) |
| #* *##set ( $linkClass = ' class="externalLink"' ) |
| #**##else |
| #* *##set ( $linkClass = "" ) |
| #**##end |
| #**##if( $href ) |
| #* *##set ( $href = ' href="' + $href + '"' ) |
| #**##else |
| #* *##set ( $href = "" ) |
| #**##end |
| #**##if ( $img ) |
| #* *##if ( $position == "left" ) |
| #* *#<a$href$linkClass$linkTarget$linkTitle>#image( $img $alt $border $width $height )$name</a>## |
| #* *##else |
| #* *#<a$href$linkClass$linkTarget$linkTitle>$name #image( $img $alt $border $width $height )</a>## |
| #* *##end |
| #**##else |
| #* *#<a$href$linkClass$linkTarget$linkTitle>## |
| #* *##if( $icon ) |
| #* *#<span class="$icon"></span>## |
| #* *##end |
| #* *#$name</a>## |
| #**##end |
| #end |
| ## |
| #macro ( image $img $alt $border $width $height ) |
| #**##if( $img ) |
| #* *##if ( !$decoration.isLink( $img ) ) |
| #* *##set ( $imgSrc = $PathTool.calculateLink( $img, $relativePath ) ) |
| #* *##set ( $imgSrc = $imgSrc.replaceAll( '\\', '/' ) ) |
| #* *##set ( $imgSrc = ' src="' + $imgSrc + '"' ) |
| #* *##else |
| #* *##set ( $imgSrc = ' src="' + $img + '"' ) |
| #* *##end |
| #* *##if( $alt ) |
| #* *##set ( $imgAlt = ' alt="' + $alt + '"' ) |
| #* *##else |
| #* *##set ( $imgAlt = ' alt=""' ) |
| #* *##end |
| #* *##if( $border ) |
| #* *##set ( $imgBorder = 'border: ' + $border + '; ' ) |
| #* *##else |
| #* *##set ( $imgBorder = "" ) |
| #* *##end |
| #* *##if( $width ) |
| #* *##set ( $imgWidth = 'width: ' + $width + '; ' ) |
| #* *##else |
| #* *##set ( $imgWidth = "" ) |
| #* *##end |
| #* *##if( $height ) |
| #* *##set ( $imgHeight = 'height: ' + $height + ';' ) |
| #* *##else |
| #* *##set ( $imgHeight = "" ) |
| #* *##end |
| <img class="imageLink"$imgSrc$imgAlt style="$imgBorder$imgWidth$imgHeight" />## |
| #**##end |
| #end |
| ## |
| #macro ( banner $banner $id ) |
| #**##if ( $banner ) |
| #* *##if( $banner.href ) |
| #* *##set ( $hrf = $banner.href ) |
| #* *##if ( !$decoration.isLink( $hrf ) ) |
| #* *##set ( $hrf = $PathTool.calculateLink( $hrf, $relativePath ) ) |
| #* *##set ( $hrf = $hrf.replaceAll( '\\', '/' ) ) |
| #* *##if ( ( $hrf == '' ) ) |
| #* *##set ( $hrf = './' ) |
| #* *##end |
| #* *##end |
| #* *#<a href="$hrf" id="$id"#if( $banner.alt ) title="$banner.alt"#end>## |
| #* *##else |
| #* *#<div id="$id">## |
| #* *##end |
| ## |
| #* *##if( $banner.src ) |
| #* *##set ( $src = $banner.src ) |
| #* *##if ( !$decoration.isLink( $src ) ) |
| #* *##set ( $src = $PathTool.calculateLink( $src, $relativePath ) ) |
| #* *##set ( $src = $src.replaceAll( '\\', '/' ) ) |
| #* *##end |
| #* *##if ( $banner.alt ) |
| #* *##set ( $alt = ' alt="' + $banner.alt + '"' ) |
| #* *##elseif ( $banner.name ) |
| #* *##set ( $alt = ' alt="' + $banner.name + '"' ) |
| #* *##else |
| #* *##set ( $alt = ' alt=""' ) |
| #* *##end |
| #* *##if( $banner.border ) |
| #* *##set ( $imgBorder = 'border: ' + $banner.border + '; ' ) |
| #* *##else |
| #* *##set ( $imgBorder = "" ) |
| #* *##end |
| #* *##if( $banner.width ) |
| #* *##set ( $imgWidth = 'width: ' + $banner.width + '; ' ) |
| #* *##else |
| #* *##set ( $imgWidth = "" ) |
| #* *##end |
| #* *##if( $banner.height ) |
| #* *##set ( $imgHeight = 'height: ' + $banner.height + ';' ) |
| #* *##else |
| #* *##set ( $imgHeight = "" ) |
| #* *##end |
| #* *##if( $banner.title ) |
| #* *##set ( $bannerTitle=' title="' + $banner.title + '"' ) |
| #* *##else |
| #* *##set ( $bannerTitle="" ) |
| #* *##end |
| #* *#<img src="$src" $alt$bannerTitle style="$imgBorder$imgWidth$imgHeight" />## |
| #* *##else |
| #* *#<h1>$banner.name</h1> |
| #* *##end |
| ## |
| #* *##if( $banner.href ) |
| #* *#</a>## |
| #* *##else |
| #* *#</div> |
| #* *##end |
| #**##end |
| #end |
| ## |
| #macro ( links $links ) |
| #**##if ( $links && $links.size() > 0 ) |
| #* *##set ( $counter = 0 ) |
| #* *### MSKINS-41 |
| #* *##set ( $begin = $links.size() - 1 ) |
| #* *##foreach( $index in [$begin..0] ) |
| #* *##set ( $item = $links.get( $index ) ) |
| #* *##set ( $counter = $counter + 1 ) |
| #* *##set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) ) |
| #* *##set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) ) |
| ## |
| <li class="pull-right">## |
| #* *##if ( $counter > 0 && $counter < $links.size() ) |
| #* *#<span class="divider">|</span> |
| #* *##end |
| #* *##link( $currentItemHref $item.name $item.target $item.img $item.position $item.alt $item.border $item.width $item.height false ) |
| #* *#</li> |
| #* *##end |
| #**##end |
| #end |
| ## |
| #macro ( breadcrumbs $breadcrumbs $cssClass ) |
| #**##set ( $breadcrumbDivider = $decoration.getCustomValue( 'fluidoSkin.breadcrumbDivider', '/' ) ) |
| #**##foreach( $item in $breadcrumbs ) |
| #* *##set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) ) |
| #* *##set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) ) |
| #* *##if ( ( $currentItemHref == '' ) ) |
| #* *##set ( $currentItemHref = './' ) |
| #* *##end |
| ## |
| #* *##if( $cssClass ) |
| <li class="$cssClass">## |
| #* *##else |
| <li>## |
| #end |
| #* *##link( $currentItemHref $item.name $item.target $item.img $item.position $item.alt $item.border $item.width $item.height false ) |
| #* *#<span class="divider">$breadcrumbDivider</span>## |
| #* *#</li> |
| #**##end |
| #**### add Edit button if content is editable |
| #**##if( $decoration.edit && $docRenderingContext.editable ) |
| #* *##set ( $edit = ' <a href="' + $docRenderingContext.getDoxiaSourcePath( $decoration.edit ) + '"><img src="' + $relativePath + '/images/accessories-text-editor.png" title="Edit" /></a>' ) |
| #**##end |
| #**##if ( $shortTitle ) |
| <li class="active $cssClass">$shortTitle$!edit</li> |
| #**##else |
| <li class="active $cssClass">$title$!edit</li> |
| #**##end |
| #end |
| ## |
| #macro ( displayTree $display $item ) |
| #**##if ( $item && $item.items && $item.items.size() > 0 ) |
| #* *##foreach( $subitem in $item.items ) |
| #* *##set ( $subitemHref = $PathTool.calculateLink( $subitem.href, $relativePath ) ) |
| #* *##set ( $subitemHref = $subitemHref.replaceAll( '\\', '/' ) ) |
| ## |
| #* *##if ( $alignedFileName == $subitemHref ) |
| #* *##set ( $display = true ) |
| #* *##end |
| ## |
| #* *##displayTree( $display $subitem ) |
| #* *##end |
| #**##end |
| #end |
| ## |
| #macro ( menuItem $item $indent ) |
| #**##set ( $collapseClass = "none" ) |
| #**##set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) ) |
| #**##set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) ) |
| ## |
| #**##if ( $item && $item.items && $item.items.size() > 0 ) |
| #* *##if ( $item.collapse == false ) |
| #* *##set ( $collapseClass = "icon-chevron-down" ) |
| #* *##else |
| #* *### By default collapsed |
| #* *##set ( $collapseClass = "icon-chevron-right" ) |
| #* *##end |
| ## |
| #* *##set ( $display = false ) |
| #* *##displayTree( $display $item ) |
| ## |
| #* *##if ( $alignedFileName == $currentItemHref || $display ) |
| #* *##set ( $collapseClass = "icon-chevron-down" ) |
| #* *##end |
| #**##end |
| ## |
| #**##if ( $alignedFileName == $currentItemHref ) |
| $indent <li class="active">## |
| #**##else |
| $indent <li>## |
| #**##end |
| ## |
| #**##if ( $item.img ) |
| #* *##if ( $item.position == "left" ) |
| #* *##if ( $alignedFileName == $currentItemHref ) |
| #* *#<a>#image( $item.img $item.alt $item.border $item.width $item.height ) $item.name</a>## |
| #* *##else |
| #* *##link( $currentItemHref $item.name $item.target $item.img $item.position $item.alt $item.border $item.width $item.height false ) |
| #* *##end |
| #* *##else |
| #* *##if ( $alignedFileName == $currentItemHref ) |
| #* *#<a>$item.name #image( $item.img $item.alt $item.border $item.width $item.height )</a>## |
| #* *##else |
| #* *##link( $currentItemHref $item.name $item.target $item.img $item.position $item.alt $item.border $item.width $item.height false ) |
| #* *##end |
| #* *##end |
| #**##else |
| #* *##if ( $alignedFileName == $currentItemHref ) |
| #* *#<a><span class="$collapseClass"></span>$item.name</a>## |
| #* *##else |
| #* *##link( $currentItemHref $item.name $item.target $item.img $item.position $item.alt $item.border $item.width $item.height $collapseClass ) |
| #* *##end |
| #**##end |
| #**##if ( $item && $item.items && $item.items.size() > 0 ) |
| #* *##if ( $collapseClass == "icon-chevron-down" ) |
| |
| $indent <ul class="nav nav-list"> |
| #* *##foreach( $subitem in $item.items ) |
| #* *##menuItem( $subitem "$indent " ) |
| #* *##end |
| $indent </ul>## |
| #* *##end |
| #**##end |
| #**#</li> |
| #end |
| ## |
| #macro ( mainMenu $menus ) |
| <ul class="nav nav-list"> |
| #**##foreach( $menu in $menus ) |
| #**##if ( $menu.name ) |
| #* *##if ( $menu.img ) |
| #* *##if( $menu.position ) |
| #* *##set ( $position = $menu.position ) |
| #* *##else |
| #* *##set ( $position = "left" ) |
| #* *##end |
| ## |
| #* *##if ( !$decoration.isLink( $menu.img ) ) |
| #* *##set ( $src = $PathTool.calculateLink( $menu.img, $relativePath ) ) |
| #* *##set ( $src = $src.replaceAll( '\\', '/' ) ) |
| #* *##set ( $src = ' src="' + $src + '"' ) |
| #* *##else |
| #* *##set ( $src = ' src="' + $menu.img + '"' ) |
| #* *##end |
| ## |
| #* *##if( $menu.alt ) |
| #* *##set ( $alt = ' alt="' + $menu.alt + '"' ) |
| #* *##else |
| #* *##set ( $alt = ' alt="' + $menu.name + '"' ) |
| #* *##end |
| ## |
| #* *##if( $menu.border ) |
| #* *##set ( $border = 'border: ' + $menu.border + '; ' ) |
| #* *##else |
| #* *##set ( $border = 'border: 0;' ) |
| #* *##end |
| ## |
| #* *##if( $menu.width ) |
| #* *##set ( $width = 'width: ' + $menu.width + '; ' ) |
| #* *##else |
| #* *##set ( $width = "" ) |
| #* *##end |
| #* *##if( $menu.height ) |
| #* *##set ( $height = 'height: ' + $menu.height + ';' ) |
| #* *##else |
| #* *##set ( $height = "" ) |
| #* *##end |
| ## |
| #* *##set ( $img = '<img class="imageLink"' + $src + $alt + ' style="' + $border + $width + $height + '" />' ) |
| ## |
| #* *##if ( $position == "left" ) |
| <li class="nav-header">$img $menu.name</li> |
| #* *##else |
| <li class="nav-header">$menu.name $img</li> |
| #* *##end |
| #* *##else |
| <li class="nav-header">$menu.name</li> |
| #* *##end |
| #**##end |
| #**##if ( $menu.items && $menu.items.size() > 0 ) |
| #* *##foreach( $item in $menu.items ) |
| #* *##menuItem( $item '' ) |
| #* *##end |
| #**##end |
| #**##end |
| </ul> |
| #end |
| ## |
| #macro ( copyright ) |
| #**##if ( $project ) |
| #* *##set ( $currentYear = ${date.year} ) |
| ## |
| #* *##if ( ${project.inceptionYear} && ( ${project.inceptionYear} != ${currentYear.toString()} ) ) |
| ${project.inceptionYear}–${currentYear} |
| #* *##else |
| ${currentYear} |
| #* *##end |
| ## |
| #* *##if ( ${project.organization} ) |
| #* *##if ( ${project.organization.name} && ${project.organization.url} ) |
| #* *#<a href="$project.organization.url">${project.organization.name}</a> |
| #* *##elseif ( ${project.organization.name} ) |
| #* *#${project.organization.name} |
| #* *##end |
| #* *##end |
| #**##end |
| #end |
| ## |
| #macro ( publishDate $position $decorationPublishDate $version ) |
| #**##if ( $publishDate ) |
| #* *##set ( $dateValue = $date.format( $publishDate ) ) |
| #**##else |
| #* *##set ( $dateValue = $date ) |
| #**##end |
| ## |
| #**##set ( $datePosition = $decorationPublishDate.position ) |
| #**##set ( $versionPosition = $version.position ) |
| ## |
| #**##set ( $breadcrumbs = $decoration.body.breadcrumbs ) |
| #**##set ( $links = $decoration.body.links ) |
| ## |
| #**##if ( $datePosition.equalsIgnoreCase( "right" ) && ( $versionPosition.equalsIgnoreCase( "right" ) || !$topBarEnabled |
| && $decoration.body.links |
| && $decoration.body.links.size() > 0 ) ) |
| #* *##set ( $prefix = '<span class="divider">|</span> ' ) |
| #**##else |
| #* *##set ( $prefix = "" ) |
| #**##end |
| ## |
| #**##if ( $datePosition.equalsIgnoreCase( $position ) ) |
| #* *##if ( ( $datePosition.equalsIgnoreCase( "right" ) ) || ( $datePosition.equalsIgnoreCase( "bottom" ) ) ) |
| <li id="publishDate" class="pull-right">$prefix$text.get( "template.lastpublished" ): $dateValue</li> |
| #* *##if ( $versionPosition.equalsIgnoreCase( $position ) ) |
| <li id="projectVersion" class="pull-right">## |
| #* *##if ( !$topBarEnabled |
| && $decoration.body.links |
| && $decoration.body.links.size() > 0 ) |
| #* *#<span class="divider">|</span>## |
| #* *##end |
| #* *#$text.get( "template.version" ): ${project.version}## |
| #* *#</li> |
| #* *##end |
| #* *##elseif ( ( $datePosition.equalsIgnoreCase( "navigation-bottom" ) ) || ( $datePosition.equalsIgnoreCase( "navigation-top" ) ) ) |
| <div id="lastPublished"> |
| <span id="publishDate">$text.get( "template.lastpublished" ): $dateValue</span> |
| #* *##if ( $versionPosition.equalsIgnoreCase( $position ) ) |
| <span class="divider">|</span> <span id="projectVersion">$text.get( "template.version" ): ${project.version}</span> |
| #* *##end |
| </div> |
| #* *##elseif ( $datePosition.equalsIgnoreCase("left") ) |
| <li id="publishDate">$text.get( "template.lastpublished" ): $dateValue## |
| #* *##if ( $versionPosition.equalsIgnoreCase( $position ) || $breadcrumbs && $breadcrumbs.size() > 0 ) |
| #* *#<span class="divider">|</span> |
| #* *##end |
| #* *#</li> |
| #* *##if ( $versionPosition.equalsIgnoreCase( $position ) ) |
| <li id="projectVersion">$text.get( "template.version" ): ${project.version}## |
| #* *##if ( $breadcrumbs && $breadcrumbs.size() > 0 ) |
| #* *#<span class="divider">|</span>## |
| #* *##end |
| #* *#</li> |
| #* *##end |
| #* *##if ( $breadcrumbs && $breadcrumbs.size() > 0 ) |
| #* *##breadcrumbs( $breadcrumbs "" ) |
| #* *##end |
| #* *##end |
| #**##elseif ( $versionPosition.equalsIgnoreCase( $position ) ) |
| #* *##if ( $versionPosition.equalsIgnoreCase( "right" ) ) |
| <li id="projectVersion" class="pull-right">$prefix$text.get( "template.version" ): ${project.version}</li> |
| #* *##elseif ( $versionPosition.equalsIgnoreCase( "bottom" ) ) |
| <span id="projectVersion">$text.get( "template.version" ): ${project.version}</span> |
| #* *##elseif ( ( $versionPosition.equalsIgnoreCase( "navigation-bottom" ) ) || ( $versionPosition.equalsIgnoreCase( "navigation-top" ) ) ) |
| <div id="lastPublished"> |
| <span id="projectVersion">$text.get( "template.version" ): ${project.version}</span> |
| </div> |
| #* *##elseif ( $versionPosition.equalsIgnoreCase("left") ) |
| <li id="projectVersion">$text.get( "template.version" ): ${project.version}## |
| #* *##if ( $breadcrumbs && $breadcrumbs.size() > 0 ) |
| #* *#<span class="divider">|</span>## |
| #* *##end |
| #* *#</li> |
| #* *##if ( $breadcrumbs && $breadcrumbs.size() > 0 ) |
| #* *##breadcrumbs( $breadcrumbs "") |
| #* *##end |
| #* *##end |
| #**##elseif ( $position.equalsIgnoreCase( "left" ) ) |
| #* *##if ( $breadcrumbs && $breadcrumbs.size() > 0 ) |
| #* *##breadcrumbs( $breadcrumbs "" ) |
| #* *##end |
| #**##end |
| #end |
| ## |
| #macro ( builtByLogo $poweredBy ) |
| #**##if( $poweredBy ) |
| #**##foreach ( $item in $poweredBy ) |
| #* *##if( $item.href ) |
| #* *##set ( $href = $PathTool.calculateLink( $item.href, $relativePath ) ) |
| #* *##set ( $href = $href.replaceAll( '\\', '/' ) ) |
| #* *##else |
| #* *##set ( $href="https://maven.apache.org/" ) |
| #* *##end |
| ## |
| #* *##if( $item.name ) |
| #* *##set ( $name = $item.name ) |
| #* *##else |
| #* *##set ( $name = $text.get( "template.builtby" ) ) |
| #* *##set ( $name = "${name} Maven" ) |
| #* *##end |
| ## |
| #* *##if( $item.img ) |
| #* *##set ( $img = $item.img ) |
| #* *##else |
| #* *##set ( $img = "images/logos/maven-feather.png" ) |
| #* *##end |
| ## |
| #* *##if ( !$decoration.isLink( $img ) ) |
| #* *##set ( $img = $PathTool.calculateLink( $img, $relativePath ) ) |
| #* *##set ( $img = $img.replaceAll( '\\', '/' ) ) |
| #* *##end |
| ## |
| #* *##if( $item.alt ) |
| #* *##set ( $alt = ' alt="' + $item.alt + '"' ) |
| #* *##else |
| #* *##set ( $alt = ' alt="' + $name + '"' ) |
| #* *##end |
| ## |
| #* *##if( $item.border ) |
| #* *##set ( $border = 'border: ' + $item.border + '; ' ) |
| #* *##else |
| #* *##set ( $border = "" ) |
| #* *##end |
| ## |
| #* *##if( $item.width ) |
| #* *##set ( $width = 'width: ' + $item.width + '; ' ) |
| #* *##else |
| #* *##set ( $width = "" ) |
| #* *##end |
| #* *##if( $item.height ) |
| #* *##set ( $height = 'height: ' + $item.height + ';' ) |
| #* *##else |
| #* *##set ( $height = "" ) |
| #* *##end |
| ## |
| #* *#<a href="$href" title="$name" class="builtBy">## |
| #* *#<img class="builtBy" $alt src="$img" style="$border$width$height" />## |
| #* *#</a> |
| #**##end |
| #**##if( $poweredBy.isEmpty() ) |
| #* *#<a href="http://maven.apache.org/" title="$text.get( "template.builtby" ) Maven" class="poweredBy">## |
| #* *#<img class="builtBy" alt="$text.get( "template.builtby" ) Maven" src="$relativePath/images/logos/maven-feather.png" />## |
| #* *#</a> |
| #**##end |
| #**##else |
| #**#<a href="http://maven.apache.org/" title="$text.get( "template.builtby" ) Maven" class="poweredBy">## |
| #* *#<img class="builtBy" alt="$text.get( "template.builtby" ) Maven" src="$relativePath/images/logos/maven-feather.png" />## |
| #**#</a> |
| #**##end |
| #end |
| ## |
| #macro ( googleAnalytics ) |
| #set ( $accountId = $decoration.getCustomValue( 'fluidoSkin.googleAnalytics.accountId' ) ) |
| #**##if( $accountId && $accountId != "" ) |
| <!-- Google Analytics --> |
| <script> |
| (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
| (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
| m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
| })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); |
| ga('create', '$accountId', 'auto'); |
| ga('send', 'pageview'); |
| #**##if( $convert.toBoolean( $decoration.getCustomValue( 'fluidoSkin.googleAnalytics.anonymizeIp', 'true' ) ) ) |
| ga('set', 'anonymizeIp', true); |
| #**##end |
| #**##if( $convert.toBoolean( $decoration.getCustomValue( 'fluidoSkin.googleAnalytics.forceSSL', 'true' ) ) ) |
| ga('set', 'forceSSL', true); |
| #**##end |
| </script> |
| #**##end |
| #end |
| |
| #macro ( matomo ) |
| #**##if ( $decoration.getCustomValue( 'matomo.url' ) && $decoration.getCustomValue( 'matomo.url' ) != '' |
| && $decoration.getCustomValue( 'matomo.siteId' ) && $decoration.getCustomValue( 'matomo.siteId' ) != '') |
| |
| <!-- Matomo --> |
| <script> |
| var _paq = window._paq = window._paq || []; |
| #* *##foreach( $option in $decoration.getCustomChild( 'matomo.options' ).getChildren() ) |
| #* *##if( $option.value && $option.value != "" ) |
| _paq.push(['$option.name', '$option.value']); |
| #* *##else |
| _paq.push(['$option.name']); |
| #* *##end |
| #* *##end |
| |
| (function() { |
| var u="$decoration.getCustomValue( 'matomo.url' )"; |
| _paq.push(['setTrackerUrl', u+'/matomo.php']); |
| _paq.push(['setSiteId', '$decoration.getCustomValue( 'matomo.siteId' )']); |
| var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; |
| g.async=true; g.src=u+'/matomo.js'; s.parentNode.insertBefore(g,s); |
| })(); |
| </script> |
| <!-- End Matomo Code --> |
| #**##end |
| #end |
| |
| ## |
| #macro ( googleSearch $top ) |
| <form id="search-form" action="https://www.google.com/search" method="get" #if ( $top ) class="navbar-search pull-right" #end> |
| #**##if( $decoration.getCustomChild( 'fluidoSkin.googleSearch.sitesearch' ) ) |
| #* *##set( $sitesearchValue = $decoration.getCustomValue( 'fluidoSkin.googleSearch.sitesearch' ) ) |
| #**##else |
| #* *##set( $startIndex = $project.url.indexOf("://") + 3 ) |
| #* *##set( $sitesearchValue = $project.url.substring( $startIndex, $project.url.length() ) ) |
| #**##end |
| <input value="$sitesearchValue" name="sitesearch" type="hidden"/> |
| <input class="search-query" name="q" id="query" type="text" placeholder="Search with Google..." /> |
| </form> |
| #end |
| ## |
| #macro ( forkMeOnGitHubHead ) |
| ## |
| #* *##set ( $ribbonColor = 'red' ) |
| #* *##set ( $definedRibbonColor = $decoration.getCustomChild( 'fluidoSkin.gitHub.ribbonColor' ) ) |
| ## |
| #* *##if ( $definedRibbonColor |
| && ($definedRibbonColor.getValue().equalsIgnoreCase( "green" ) |
| || $definedRibbonColor.getValue().equalsIgnoreCase( "black" ) |
| || $definedRibbonColor.getValue().equalsIgnoreCase( "orange" ) |
| || $definedRibbonColor.getValue().equalsIgnoreCase( "gray" ) ) ) |
| #* *##set ( $ribbonColor = $definedRibbonColor.getValue().toLowerCase() ) |
| <style>.github-fork-ribbon:before { background-color: $ribbonColor; }</style> |
| #* *##end |
| #end |
| ## |
| #macro ( forkMeOnGitHub ) |
| #**##if ( $decoration.getCustomChild( 'fluidoSkin.gitHub.projectId' ) ) |
| ## |
| #* *##set ( $gitHubProjectId = $decoration.getCustomValue( 'fluidoSkin.gitHub.projectId' ) ) |
| ## |
| #* *##set ( $ribbonOrientation = 'left-top' ) |
| #* *##if ( $decoration.getCustomValue( 'fluidoSkin.gitHub.ribbonOrientation', '' ).equalsIgnoreCase( 'right' ) |
| || $decoration.getCustomValue( 'fluidoSkin.gitHub.ribbonOrientation', '' ).equalsIgnoreCase( 'right-top' ) ) |
| #* *##set ( $ribbonOrientation = 'right-top' ) |
| #* *##end |
| #* *##if ( $decoration.getCustomValue( 'fluidoSkin.gitHub.ribbonOrientation', '' ).equalsIgnoreCase( 'left' ) |
| || $decoration.getCustomValue( 'fluidoSkin.gitHub.ribbonOrientation', '' ).equalsIgnoreCase( 'left-top' ) ) |
| #* *##set ( $ribbonOrientation = 'left-top' ) |
| #* *##end |
| #* *##if ( $decoration.getCustomValue( 'fluidoSkin.gitHub.ribbonOrientation', '' ).equalsIgnoreCase( 'right-bottom' ) |
| || $decoration.getCustomValue( 'fluidoSkin.gitHub.ribbonOrientation', '' ).equalsIgnoreCase( 'left-bottom' ) ) |
| #* *##set ( $ribbonOrientation = "$decoration.getCustomValue( 'fluidoSkin.gitHub.ribbonOrientation' ) fixed" ) |
| #* *##end |
| ## |
| <a class="github-fork-ribbon $ribbonOrientation" href="https://github.com/$gitHubProjectId" data-ribbon="Fork me on GitHub" title="Fork me on GitHub">Fork me on GitHub</a> |
| #**##end |
| #end |
| ## |
| ## activate profile background image if custom.fluidoSkin.profile value set to "retired", "pre-release" or "sandbox" |
| #macro ( prjProfile ) |
| #**##set ( $profile = $decoration.getCustomValue( 'fluidoSkin.profile', '' ) ) |
| #**##if ( $profile.equalsIgnoreCase( "retired" ) |
| || $profile.equalsIgnoreCase( "pre-release" ) |
| || $profile.equalsIgnoreCase( "sandbox" ) ) |
| <style type="text/css">body{background-image: url('$relativePath/images/profiles/${profile}.png');}</style> |
| #**##end |
| #end |
| ## |
| #macro ( facebookLoadSDK ) |
| #**##if ( $decoration.getCustomChild( 'fluidoSkin.facebookLike' ) && $project.url ) |
| <!-- Load Facebook SDK for JavaScript --> |
| <div id="fb-root"></div> |
| <script async defer crossorigin="anonymous" src="https://connect.facebook.net/#if ( $locale.toString() )$locale#{else}en#end/sdk.js#xfbml=1&version=v6.0"></script> |
| #**##end |
| #end |
| ## |
| #macro ( facebookLike $sideBarEnabled ) |
| #**##if ( $decoration.getCustomChild( 'fluidoSkin.facebookLike' ) && $project.url ) |
| ## |
| #* *##set( $layout = 'box_count' ) |
| #* *##if( !$sideBarEnabled ) |
| #* *##set( $layout = 'button_count' ) |
| #* *##end |
| #* *##set( $layout = $decoration.getCustomValue( 'fluidoSkin.facebookLike.layout', $layout ) ) |
| ## |
| #* *##set( $action = 'like' ) |
| #* *##if ( $convert.toBoolean( $decoration.getCustomValue( 'fluidoSkin.facebookLike.recommend', 'false' ) ) ) |
| #* *##set( $action = 'recommend' ) |
| #* *##end |
| ## |
| #* *##set( $shareButton = $convert.toBoolean( $decoration.getCustomValue( 'fluidoSkin.facebookLike.shareButton', 'false' ) ) ) |
| ## |
| <div class="fb-like#if( !$sideBarEnabled ) pull-right#end" style="border:none; margin-top: 10px" data-href="$project.url" data-layout="$layout" data-show-faces="false" data-action="$action" data-share="$shareButton"></div> |
| #**##end |
| #end |
| ## |
| #macro ( followTwitter $sideBarEnabled ) |
| #**##if ( $decoration.getCustomChild( 'fluidoSkin.twitter.user' ) ) |
| #* *##set( $user = $decoration.getCustomValue( 'fluidoSkin.twitter.user' ) ) |
| #* *##set( $showUser = $convert.toBoolean( $decoration.getCustomValue( 'fluidoSkin.twitter.showUser', 'false' ) ) ) |
| #* *##set( $showFollowers = $convert.toBoolean( $decoration.getCustomValue( 'fluidoSkin.twitter.showFollowers', 'false' ) ) ) |
| ## |
| #* *##if ( $sideBarEnabled ) |
| #* *##set( $dataSize = "medium" ) |
| #* *##set( $dataAlign = "left" ) |
| <div id="twitter" style="border:none; margin-top: 10px"> |
| #* *##else |
| #* *##set( $dataSize = "large" ) |
| #* *##set( $dataAlign = "right" ) |
| <ul class="nav pull-right" style="border:none; margin-top: 7px"><li> |
| #* *##end |
| ## |
| <a href="https://twitter.com/${user}" class="twitter-follow-button" data-show-count="${showFollowers}" data-align="${dataAlign}" data-size="${dataSize}" data-show-screen-name="${showUser}" data-lang="#if ( $locale.toString() )$locale#{else}en#end">Follow ${user}</a> |
| <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> |
| ## |
| #* *##if ( $sideBarEnabled ) |
| </div> |
| #* *##else |
| </li></ul> |
| #* *##end |
| #**##end |
| #end |
| ## |
| #macro ( flattrHead ) |
| #**##if ( $decoration.getCustomChild( 'fluidoSkin.flattr.thing' ) |
| && ( $decoration.getCustomChild( 'fluidoSkin.flattr.url' ) || $project.url ) ) |
| <script> |
| /* <![CDATA[ */ |
| (function() { |
| var s = document.createElement('script'), t = document.getElementsByTagName('script')[0]; |
| s.async = true; |
| s.src = 'https://api.flattr.com/js/0.6/load.js?mode=auto'; |
| t.parentNode.insertBefore(s, t); |
| })(); |
| /* ]]> */</script> |
| #**##end |
| #end |
| ## |
| #macro ( flattrBody $sideBarEnabled ) |
| #**##if ( $decoration.getCustomChild( 'fluidoSkin.flattr.thing' ) |
| && ( $decoration.getCustomChild( 'fluidoSkin.flattr.url' ) || $project.url ) ) |
| #* *##set ( $flattrThing = $decoration.getCustomValue( 'fluidoSkin.flattr.thing' ) ) |
| #* *##set ( $flattrUrl = $decoration.getCustomValue( 'fluidoSkin.flattr.url', $project.url ) ) |
| ## |
| #* *##set ( $styleModifier = '' ) |
| #* *##if ( $decoration.getCustomValue( 'fluidoSkin.flattr.style', '' ).equalsIgnoreCase( 'compact' ) ) |
| #* *##set ( $styleModifier = 'rev="flattr;button:compact;"' ) |
| #* *##end |
| ## |
| #* *##if ( $sideBarEnabled ) |
| <div id="flattr"> |
| #* *##else |
| <ul class="nav pull-right"><li> |
| #* *##end |
| ## |
| <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" style="border: 0;" /></a></noscript> |
| ## |
| #* *##if ( $sideBarEnabled ) |
| </div> |
| #* *##else |
| </li></ul> |
| #* *##end |
| #**##end |
| #end |
| ## |
| #macro( generatedBy ) |
| Apache Maven Doxia Site Renderer#if( $doxiaSiteRendererVersion ) $doxiaSiteRendererVersion#end## |
| #end |
| ## |
| ## |
| #macro( anchorJS ) |
| <script> |
| if(anchors) { |
| anchors.add(); |
| } |
| </script> |
| #end |
| ## |