#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 ( $href.toLowerCase().startsWith("http:/") || $href.toLowerCase().startsWith("https:/") || $href.toLowerCase().startsWith("ftp:/") || $href.toLowerCase().startsWith("mailto:") || $href.toLowerCase().startsWith("file:/") || ($href.toLowerCase().indexOf("://") != -1) ) #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 ( ! ( $img.toLowerCase().startsWith("http:/") || $img.toLowerCase().startsWith("https:/") || $img.toLowerCase().startsWith("ftp:/") || $img.toLowerCase().startsWith("mailto:") || $img.toLowerCase().startsWith("file:/") || ($img.toLowerCase().indexOf("://") != -1) ) ) #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 ( 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( '\\', '/' ) )
  • #link( $currentItemHref $item.name $item.target $item.img $item.position $item.alt $item.border $item.width $item.height false)
  • #if ( $counter > 0 && $counter < $links.size() )
  • |
  • #end #end #end ## #macro ( breadcrumbs $breadcrumbs $cssClass ) #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 )
  • /
  • #end #if ( $shortTitle )
  • $shortTitle
  • #else
  • $title
  • #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 ( $decorationPublishDate && $decorationPublishDate.format ) #set ( $format = $decorationPublishDate.format ) #else #set ( $format = "yyyy-MM-dd" ) #end ## $dateFormat.applyPattern( $format ) ## #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 ## #if ( $decorationPublishDate && $decorationPublishDate.position ) #set ( $datePosition = $decorationPublishDate.position ) #else #set ( $datePosition = "left" ) #end ## #if ( $version ) #if ( $version.position ) #set ( $versionPosition = $version.position ) #else #set ( $versionPosition = "left" ) #end #else #set ( $version = "" ) #set ( $versionPosition = "left" ) #end ## #set ( $breadcrumbs = $decoration.body.breadcrumbs ) #set ( $links = $decoration.body.links ) #if ( $datePosition.equalsIgnoreCase( "right" ) && $versionPosition.equalsIgnoreCase( "right" ) ) #set ( $prefix = '
  • |
  • ' ) #else #set ( $prefix = "" ) #end ## #if ( $datePosition.equalsIgnoreCase( $position ) ) #if ( ( $datePosition.equalsIgnoreCase( "right" ) ) || ( $datePosition.equalsIgnoreCase( "bottom" ) ) )
  • $i18n.getString( "site-renderer", $locale, "template.lastpublished" ): $dateValue
  • $prefix ## #if ( $versionPosition.equalsIgnoreCase( $position ) ) ##
  • $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 ) ) ##
  • |
  • $i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version}
  • ## #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 ) | #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="http://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 ( ! ( $img.toLowerCase().startsWith("http:/") || $img.toLowerCase().startsWith("https:/") || $img.toLowerCase().startsWith("ftp:/") || $img.toLowerCase().startsWith("mailto:") || $img.toLowerCase().startsWith("file:/") || ($img.toLowerCase().indexOf("://") != -1) ) ) #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 ( googleAnalytics $accountId ) #if( $accountId && $accountId != "" ) #end #end ## #macro ( googleSearch $top ) #end ## #macro ( forkMeOnGitHub ) #if ( $decoration.custom.getChild( 'hippoSkin' ).getChild( 'gitHub' ) && $decoration.custom.getChild( 'hippoSkin' ).getChild( 'gitHub' ).getChild( 'projectId' ) ) #set ( $gitHubProjectId = $decoration.custom.getChild( 'hippoSkin' ).getChild( 'gitHub' ).getChild( 'projectId' ).getValue() ) #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' ) #set ( $definedRibbonOrientation = $decoration.custom.getChild( 'hippoSkin' ).getChild( 'gitHub' ).getChild( 'ribbonOrientation' ) ) #if ( $definedRibbonOrientation && $definedRibbonOrientation.getValue().equalsIgnoreCase( "right" ) ) #set ( $ribbonOrientation = 'right' ) #set ( $ribbon = $rightRibbon ) #end #set ( $ribbonColor = 'red' ) #set ( $definedRibbonColor = $decoration.custom.getChild( 'hippoSkin' ).getChild( 'gitHub' ).getChild( '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 ## #macro ( prjProfile ) #if ( $decoration.custom.getChild( 'hippoSkin' ).getChild( 'profile' ) ) #set ( $profile = $decoration.custom.getChild( 'hippoSkin' ).getChild( 'profile' ).getValue() ) #if ( $profile.equalsIgnoreCase( "retired" ) || $profile.equalsIgnoreCase( "pre-release" ) || $profile.equalsIgnoreCase( "sandbox" ) ) #end #end #end ## #macro ( googlePlusOne $sideBarEnabled ) #if ( $decoration.custom.getChild( 'hippoSkin' ).getChild( 'googlePlusOne' ) && $project.url ) #set( $dataSize = 'tall' ) #if( !$sideBarEnabled ) #set( $dataSize = 'medium' ) #end #if( !$sideBarEnabled ) #end #end #end ## #macro ( facebookLike $sideBarEnabled ) #if ( $decoration.custom.getChild( 'hippoSkin' ).getChild( 'facebookLike' ) && $project.url ) #set( $facebookLike = $decoration.custom.getChild( 'facebookLike' ) ) ## 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:80px; height:20px' ) #end #end #end ## #macro ( followTwitter $sideBarEnabled ) #if ( $decoration.custom.getChild( 'hippoSkin' ).getChild( 'twitter' ) && $decoration.custom.getChild( 'hippoSkin' ).getChild( 'twitter' ).getChild( 'user' ) ) #set ( $user = $decoration.custom.getChild( 'hippoSkin' ).getChild( 'twitter' ).getChild( 'user' ).getValue() ) #if ( $decoration.custom.getChild( 'hippoSkin' ).getChild( 'twitter' ).getChild( 'showUser' ) && $decoration.custom.getChild( 'hippoSkin' ).getChild( 'twitter' ).getChild( 'showUser' ).getValue().equalsIgnoreCase( "true" ) ) #set( $showUser = true ) #else #set( $showUser = false ) #end #if ( $decoration.custom.getChild( 'hippoSkin' ).getChild( 'twitter' ).getChild( 'showFollowers' ) && $decoration.custom.getChild( 'hippoSkin' ).getChild( 'twitter' ).getChild( 'showFollowers' ).getValue().equalsIgnoreCase( "true" ) ) #set( $showFollowers = true ) #else #set( $showFollowers = false ) #end #if ( $sideBarEnabled ) #set( $dataSize = "medium" ) #set( $dataAlign = "left" )
    #else #set( $dataSize = "large" ) #set( $dataAlign = "right" )
    #else #end #end #end ## #macro ( ohloh ) #if ( $decoration.custom.getChild( 'hippoSkin' ).getChild( 'ohloh' ) && $decoration.custom.getChild( 'hippoSkin' ).getChild( 'ohloh' ).getChild( 'projectId' ) ) #set ( $projectId = $decoration.custom.getChild( 'hippoSkin' ).getChild( 'ohloh' ).getChild( 'projectId' ).getValue() ) #set( $widget = "users_logo.js" ) #if ( $decoration.custom.getChild( 'hippoSkin' ).getChild( 'ohloh' ).getChild( 'widget' ) ) #set( $definedWidget = $decoration.custom.getChild( 'hippoSkin' ).getChild( 'ohloh' ).getChild( 'widget' ).getValue() ) #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 ## ## put meta together #foreach( $author in $authors ) #end #if ( $dateCreation ) #end #if ( $dateRevision ) #end #if ( $locale ) #end $title #prjProfile() #if ( $decoration.body.head ) #foreach( $item in $decoration.body.head.getChildren() ) #set ( $head = $item.toString().trim() ) #set ( $documentHeader = '' ) #if ( $item.name == "script" ) #set ( $head = $StringUtils.replace( $item.toUnescapedString(), $documentHeader, "" ) ) #else #set ( $head = $StringUtils.replace( $item.toString(), $documentHeader, "" ) ) #end $StringUtils.replace( $head, '@relativePath@', ${relativePath} ) #end #end #if( $headContent )$headContent#end #googleAnalytics( $decoration.googleAnalyticsAccountId ) #forkMeOnGitHub() #set ( $sideBarEnabled = true ) #if ( $decoration.custom.getChild('hippoSkin') ) #if ( $decoration.custom.getChild( 'hippoSkin' ).getChild( 'googleSearch' ) && ( $decoration.custom.getChild( 'hippoSkin' ).getChild( 'googleSearch' ).getChild( 'sitesearch' ) || $project.url ) ) #set ( $searchEnabled = true ) #else #set ( $searchEnabled = false ) #end #end
    #if ( $sideBarEnabled ) #set ($leftColumnClass="span3") #if ( $decoration.custom && $decoration.custom.getChild('hippoSkin') && $decoration.custom.getChild( 'hippoSkin' ).getChild( 'leftColumnClass' ) ) #set ( $leftColumnClass = $decoration.custom.getChild( 'hippoSkin' ).getChild( 'leftColumnClass' ).getValue() ) #end
    #end #set ($bodyColumnClass="span9") #if ( $decoration.custom && $decoration.custom.getChild('hippoSkin') && $decoration.custom.getChild( 'hippoSkin' ).getChild( 'bodyColumnClass' ) ) #set ( $bodyColumnClass = $decoration.custom.getChild( 'hippoSkin' ).getChild( 'bodyColumnClass' ).getValue() ) #end
    #if ( $title && $title.endsWith( "Project License" ) ) $bodyContent #else #if ( $decoration.custom.getChild('hippoSkin') && $decoration.custom.getChild( 'hippoSkin' ).getChild( 'sourceLineNumbersEnabled' ) && 'true' == $decoration.custom.getChild( 'hippoSkin' ).getChild( 'sourceLineNumbersEnabled' ).getValue() ) #set ( $sourceStyle = "prettyprint linenums" ) #else #set ( $sourceStyle = "prettyprint" ) #end $bodyContent.replaceAll( "
    ", "
    " ).replaceAll( "class=\"bodyTable\"", "class=\"table table-striped\"" )
            #end
        
    #if ( $sideBarEnabled )
    #end