All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.maven.site-macros.vm Maven / Gradle / Ivy

Go to download

The Apache Maven Fluido Skin is an Apache Maven site skin built on top of Twitter's bootstrap.

There is a newer version: 2.0.1
Show newest version
## 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 )
      
#**##end
#**##end
#end
##
##
##
#macro ( topLink $href $name $target )
#**##set ( $linkTitle = ' title="' + $name + '"' )
#**##if( $target )
#*  *##set ( $linkTarget = ' target="' + $target + '"' )
#**##else
#*  *##set ( $linkTarget = "" )
#**##end
#**#$name##
#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( '\\', '/' ) )
    
  • #topLink( $currentItemHref $item.name $item.target )
  • #**##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 ( $img ) #* *##if ( $position == "left" ) #* *##image($img $alt $border $width $height)$name## #* *##else #* *#$name #image($img $alt $border $width $height)## #* *##end #**##else #* *### #* *##if($icon) #* *### #* *##end #* *#$name## #**##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 ## #**##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 #* *### #* *##else #* *# #* *##end #**##end #end ## ## ## #macro ( links $links ) #**##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( '\\', '/' ) ) ##
  • ## #* *##if ( $counter > 0 && $counter < $links.size() ) #* *#| #* *##end #* *##link( $currentItemHref $item.name $item.target $item.img $item.position $item.alt $item.border $item.width $item.height false) #* *#
  • #**##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 ##
  • ## #* *##link( $currentItemHref $item.name $item.target $item.img $item.position $item.alt $item.border $item.width $item.height false ) #* *#$breadcrumbDivider## #* *#
  • #**##end #**### add Edit button if content is editable #**##if( $decoration.edit && $docRenderingContext.editable ) #* *##set ( $edit = ' ' ) #**##end #**##if ( $shortTitle )
  • $shortTitle$!edit
  • #**##else
  • $title$!edit
  • #**##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 ) #**##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 )
  • ## #**##else
  • ## #**##end ## #**##if ( $item.img ) #* *##if ( $item.position == "left" ) #* *##if ( $alignedFileName == $currentItemHref ) #* *##image($item.img $item.alt $item.border $item.width $item.height) $item.name## #* *##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 ) #* *#$item.name #image($item.img $item.alt $item.border $item.width $item.height)## #* *##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 ) #* *#$item.name## #* *##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" ) #* *##end #**##end #**#
  • #end ## ## ## #macro ( mainMenu $menus ) #end ## ## ## #macro ( copyright ) #**##if ( $project ) #* *##if ( ${project.organization} && ${project.organization.name} ) #* *##set ( $period = "" ) #* *##else #* *##set ( $period = "." ) #* *##end ## #* *##set ( $currentYear = ${currentDate.year} + 1900 ) ## #* *##if ( ${project.inceptionYear} && ( ${project.inceptionYear} != ${currentYear.toString()} ) ) #* *#${project.inceptionYear}–${currentYear}${period} #* *##else #* *#${currentYear}${period} #* *##end ## #* *##if ( ${project.organization} ) #* *##if ( ${project.organization.name} && ${project.organization.url} ) #* *#${project.organization.name}. #* *##elseif ( ${project.organization.name} ) #* *#${project.organization.name}. #* *##end #* *##end #**##end #end ## ## ## #macro ( publishDate $position $decorationPublishDate $version ) #**##if ( $publishDate ) #* *##set ( $dateValue = $dateFormat.format( $publishDate ) ) #**##elseif ( $decoration.custom.getChild( 'publishDate' ) ) #* *##set ( $dateValue = $decoration.custom.getChild( 'publishDate' ).getValue() ) #**##else #* *##set ( $dateValue = $dateFormat.format( $currentDate ) ) #**##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 = '| ' ) #**##else #* *##set ( $prefix = "" ) #**##end ## #**##if ( $datePosition.equalsIgnoreCase( $position ) ) #* *##if ( ( $datePosition.equalsIgnoreCase( "right" ) ) || ( $datePosition.equalsIgnoreCase( "bottom" ) ) )
  • $prefix$i18n.getString( "site-renderer", $locale, "template.lastpublished" ): $dateValue
  • #* *##if ( $versionPosition.equalsIgnoreCase( $position ) )
  • ## #* *##if ( !$topBarEnabled && $decoration.body.links && $decoration.body.links.size() > 0 ) #* *#|## #* *##end #* *#$i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version}## #* *#
  • #* *##end #* *##elseif ( ( $datePosition.equalsIgnoreCase( "navigation-bottom" ) ) || ( $datePosition.equalsIgnoreCase( "navigation-top" ) ) )
    $i18n.getString( "site-renderer", $locale, "template.lastpublished" ): $dateValue #* *##if ( $versionPosition.equalsIgnoreCase( $position ) ) | $i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version} #* *##end
    #* *##elseif ( $datePosition.equalsIgnoreCase("left") )
  • $i18n.getString( "site-renderer", $locale, "template.lastpublished" ): $dateValue## #* *##if ( $versionPosition.equalsIgnoreCase( $position ) || $breadcrumbs && $breadcrumbs.size() > 0) #* *#| #* *##end #* *#
  • #* *##if ( $versionPosition.equalsIgnoreCase( $position ) )
  • $i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version}## #* *##if ( $breadcrumbs && $breadcrumbs.size() > 0 ) #* *#|## #* *##end #* *#
  • #* *##end #* *##if ( $breadcrumbs && $breadcrumbs.size() > 0 ) #* *##breadcrumbs( $breadcrumbs "" ) #* *##end #* *##end #**##elseif ( $versionPosition.equalsIgnoreCase( $position ) ) #* *##if ( $versionPosition.equalsIgnoreCase( "right" ) )
  • $prefix$i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version}
  • #* *##elseif ( $versionPosition.equalsIgnoreCase( "bottom" ) ) $i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version} #* *##elseif ( ( $versionPosition.equalsIgnoreCase( "navigation-bottom" ) ) || ( $versionPosition.equalsIgnoreCase( "navigation-top" ) ) )
    $i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version}
    #* *##elseif ( $versionPosition.equalsIgnoreCase("left") )
  • $i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version}## #* *##if ( $breadcrumbs && $breadcrumbs.size() > 0 ) #* *#|## #* *##end #* *#
  • #* *##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 = $i18n.getString( "site-renderer", $locale, "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 ## #* *### #* *### #* *# #**##end #**##if( $poweredBy.isEmpty() ) #* *### #* *#$i18n.getString( ## #* *# #**##end #**##else #**### #* *#$i18n.getString( ## #**# #**##end #end ## ## ## #macro ( piwik ) #**##if ( $decoration.getCustomChild( 'fluidoSkin.piwik.piwikUrl' ) && $decoration.getCustomChild( 'fluidoSkin.piwik.idsite' ) ) #* *##set ( $piwikUrl = $decoration.getCustomValue( 'fluidoSkin.piwik.piwikUrl' ) ) #* *##set ( $idsite = $decoration.getCustomValue( 'fluidoSkin.piwik.idsite' ) ) ## #**##end #end ## ## ## #macro ( googleAnalytics $accountId ) #**##if( $accountId && $accountId != "" ) #**##end #end ## ## ## #macro ( googleSearch $top ) #end ## ## ## #macro ( forkMeOnGitHub ) #**##if ( $decoration.getCustomChild( 'fluidoSkin.gitHub.projectId' ) ) ## #* *##set ( $gitHubProjectId = $decoration.getCustomValue( 'fluidoSkin.gitHub.projectId' ) ) ## #* *##set ( $leftRibbon = { "red" : "forkme_left_red_aa0000.png", "green" : "forkme_left_green_007200.png", "black" : "forkme_left_darkblue_121621.png", "darkblue" : "forkme_left_darkblue_121621.png", "orange" : "forkme_left_orange_ff7600.png", "gray" : "forkme_left_gray_6d6d6d.png" } ) #* *##set ( $rightRibbon = { "red" : "forkme_right_red_aa0000.png", "green" : "forkme_right_green_007200.png", "black" : "forkme_right_darkblue_121621.png", "darkblue" : "forkme_right_darkblue_121621.png", "orange" : "forkme_right_orange_ff7600.png", "gray" : "forkme_right_gray_6d6d6d.png" } ) ## #* *##set ( $ribbon = $leftRibbon ) #* *##set ( $ribbonOrientation = 'left' ) #* *##if ( $decoration.getCustomValue( 'fluidoSkin.gitHub.ribbonOrientation', '' ).equalsIgnoreCase( 'right' ) ) #* *##set ( $ribbonOrientation = 'right' ) #* *##set ( $ribbon = $rightRibbon ) #* *##end ## #* *##set ( $ribbonColor = 'red' ) #* *##set ( $definedRibbonColor = $decoration.getCustomChild( 'fluidoSkin.gitHub.ribbonColor' ) ) ## #* *##if ( $definedRibbonColor && ( $definedRibbonColor.getValue().equalsIgnoreCase( "red" ) || $definedRibbonColor.getValue().equalsIgnoreCase( "green" ) || $definedRibbonColor.getValue().equalsIgnoreCase( "black" ) || $definedRibbonColor.getValue().equalsIgnoreCase( "orange" ) || $definedRibbonColor.getValue().equalsIgnoreCase( "gray" ) ) ) #* *##set ( $ribbonColor = $definedRibbonColor.getValue().toLowerCase() ) #* *##end ## Fork me on GitHub #**##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" ) ) #**##end #end ## ## ## #macro ( googlePlusOne $sideBarEnabled ) #**##if ( $decoration.getCustomChild( 'fluidoSkin.googlePlusOne' ) && $project.url ) #* *##set( $dataSize = 'tall' ) #* *##if( !$sideBarEnabled ) #* *##set( $dataSize = 'medium' ) #* *##end #* *##if( !$sideBarEnabled ) #* *##end #**##end #end ## ## ## #macro ( facebookLike $sideBarEnabled ) #**##if ( $decoration.getCustomChild( 'fluidoSkin.facebookLike' ) && $project.url ) ## ## kindly hardcoded ## #* *##set( $layout = 'box_count' ) #* *##if( !$sideBarEnabled ) #* *##set( $layout = 'button_count' ) #* *##end ## #* *##set( $colorscheme = 'light' ) #* *##if( !$sideBarEnabled ) #* *##set( $colorscheme = 'dark' ) #* *##end ## #* *##set( $frameWidth = 'width:48px; height:63px' ) #* *##if( !$sideBarEnabled ) #* *##set( $frameWidth = 'width:100px; height:20px' ) #* *##end ## #**##end #end ## ## ## #macro ( followTwitter $sideBarEnabled ) #**##if ( $decoration.getCustomChild( 'fluidoSkin.twitter.user' ) ) #* *##set( $user = $decoration.getCustomValue( 'fluidoSkin.twitter.user' ) ) #* *##set( $showUser = $decoration.getCustomValue( 'fluidoSkin.twitter.showUser', '' ).equalsIgnoreCase( 'true' ) ) #* *##set( $showFollowers = $decoration.getCustomValue( 'fluidoSkin.twitter.showFollowers', '' ).equalsIgnoreCase( 'true' ) ) ## #* *##if ( $sideBarEnabled ) #* *##set( $dataSize = "medium" ) #* *##set( $dataAlign = "left" )
    #* *##else #* *##set( $dataSize = "large" ) #* *##set( $dataAlign = "right" )
    #* *##else #* *##end #**##end #end ## ## ## #macro ( ohloh ) #**##if ( $decoration.getCustomChild( 'fluidoSkin.ohloh.projectId' ) ) #* *##set ( $projectId = $decoration.getCustomValue( 'fluidoSkin.ohloh.projectId' ) ) ## #* *##set( $widget = "users_logo.js" ) ## #* *##if ( $decoration.getCustomChild( 'fluidoSkin.ohloh.widget' ) ) #* *##set( $definedWidget = $decoration.getCustomValue( 'fluidoSkin.ohloh.widget' ) ) ## #* *##if ( $definedWidget.equalsIgnoreCase( "users-logo" ) ) #* *##set( $widget = "users_logo.js" ) #* *##elseif ( $definedWidget.equalsIgnoreCase( "users-green" ) ) #* *##set( $widget = "users.js?style=green" ) #* *##elseif ( $definedWidget.equalsIgnoreCase( "users-red" ) ) #* *##set( $widget = "users.js?style=red" ) #* *##elseif ( $definedWidget.equalsIgnoreCase( "users-blue" ) ) #* *##set( $widget = "users.js?style=blue" ) #* *##elseif ( $definedWidget.equalsIgnoreCase( "users-gray" ) ) #* *##set( $widget = "users.js?style=gray" ) #* *##elseif ( $definedWidget.equalsIgnoreCase( "users-rainbow" ) ) #* *##set( $widget = "users.js?style=rainbow" ) #* *##elseif ( $definedWidget.equalsIgnoreCase( "users" ) ) #* *##set( $widget = "users.js" ) #* *##elseif ( $definedWidget.equalsIgnoreCase( "thin-badge" ) ) #* *##set( $widget = "thin_badge.js" ) #* *##elseif ( $definedWidget.equalsIgnoreCase( "partner-badge" ) ) #* *##set( $widget = "partner_badge.js" ) #* *##elseif ( $definedWidget.equalsIgnoreCase( "languages" ) ) #* *##set( $widget = "languages.js" ) #* *##elseif ( $definedWidget.equalsIgnoreCase( "factoids" ) ) #* *##set( $widget = "factoids.js" ) #* *##elseif ( $definedWidget.equalsIgnoreCase( "cocomo" ) ) #* *##set( $widget = "cocomo.js" ) #* *##elseif ( $definedWidget.equalsIgnoreCase( "stats" ) ) #* *##set( $widget = "basic_stats.js" ) #* *##end #**##end ##
    #end #end ## ## ## #macro ( flattrHead ) #**##if ( $decoration.getCustomChild( 'fluidoSkin.flattr.thing' ) && ( $decoration.getCustomChild( 'fluidoSkin.flattr.url' ) || $project.url ) ) #**##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 )
    #* *##else
    #* *##else #* *##end #**##end #end




    © 2015 - 2024 Weber Informatics LLC | Privacy Policy