summaryrefslogtreecommitdiffstats
path: root/archiva-docs/src/maven-site.vm
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2011-10-11 11:48:16 +0000
committerOlivier Lamy <olamy@apache.org>2011-10-11 11:48:16 +0000
commit47acd35fbfe70ff72c406b1dda29b0d7e46f61a0 (patch)
tree0142713866f6d797a23f7839dd13fe9025ea12e8 /archiva-docs/src/maven-site.vm
parent8daf53e0f0f8e1acdd76c4127cfdee33b3183493 (diff)
downloadarchiva-47acd35fbfe70ff72c406b1dda29b0d7e46f61a0.tar.gz
archiva-47acd35fbfe70ff72c406b1dda29b0d7e46f61a0.zip
redesign of docs using boostrap css
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1181732 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-docs/src/maven-site.vm')
-rw-r--r--archiva-docs/src/maven-site.vm559
1 files changed, 559 insertions, 0 deletions
diff --git a/archiva-docs/src/maven-site.vm b/archiva-docs/src/maven-site.vm
new file mode 100644
index 000000000..1faac7db7
--- /dev/null
+++ b/archiva-docs/src/maven-site.vm
@@ -0,0 +1,559 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!-- Generated by Apache Maven Doxia at $dateFormat.format( $currentDate ) -->
+#macro ( link $href $name $target $img $position $alt $border $width $height )
+ #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" )
+ <a href="$href"$linkClass$linkTarget$linkTitle>#image($img $alt $border $width $height)$name</a>
+ #else
+ <a href="$href"$linkClass$linkTarget$linkTitle>$name #image($img $alt $border $width $height)</a>
+ #end
+ #else
+ <a href="$href"$linkClass$linkTarget$linkTitle>$name</a>
+ #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
+ <img class="imageLink"$imgSrc$imgAlt$imgBorder$imgWidth$imgHeight/>
+ #end
+#end
+#macro ( banner $banner $id )
+ #if ( $banner )
+ #if( $banner.href )
+ #set ( $hrf = $banner.href )
+ #if ( ! ( $hrf.toLowerCase().startsWith("http:/") || $hrf.toLowerCase().startsWith("https:/") ||
+ $hrf.toLowerCase().startsWith("ftp:/") || $hrf.toLowerCase().startsWith("mailto:/") ||
+ $hrf.toLowerCase().startsWith("file:/") || ($hrf.toLowerCase().indexOf("://") != -1) ) )
+ #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 ( ! ( $src.toLowerCase().startsWith("http:/") || $src.toLowerCase().startsWith("https:/") ||
+ $src.toLowerCase().startsWith("ftp:/") || $src.toLowerCase().startsWith("mailto:/") ||
+ $src.toLowerCase().startsWith("file:/") || ($src.toLowerCase().indexOf("://") != -1) ) )
+ #set ( $src = $PathTool.calculateLink( $src, $relativePath ) )
+ #set ( $src = $src.replaceAll( '\\', '/' ) )
+ #end
+ #if ( $banner.alt )
+ #set ( $alt = $banner.alt )
+ #else
+ #set ( $alt = $banner.name )
+ #end
+ <img src="$src" alt="$alt" id="$id"/>
+ #else
+ $banner.name
+ #end
+##
+ #if( $banner.href )
+ </a>
+ #else
+ </div>
+ #end
+ #end
+#end
+##
+#macro ( links $links )
+ #set ( $counter = 0 )
+ #foreach( $item in $links )
+ #set ( $counter = $counter + 1 )
+ #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
+ #set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) )
+ <li>#link( $currentItemHref $item.name $item.target $item.img $item.position $item.alt $item.border $item.width $item.height )</li>
+ #end
+#end
+##
+#macro ( breadcrumbs $breadcrumbs )
+ #foreach( $item in $breadcrumbs )
+ #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
+ #set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) )
+ #if ( ( $currentItemHref == '' ) )
+ #set ( $currentItemHref = './' )
+ #end
+##
+ <li>
+ #link( $currentItemHref $item.name $item.target $item.img $item.position $item.alt $item.border $item.width $item.height )
+ <span class="divider">&gt;</span>
+ </li>
+ #end
+ $title
+#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 ( $collapse = "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 ( $collapse = "expanded" )
+ #else
+ ## By default collapsed
+ #set ( $collapse = "collapsed" )
+ #end
+##
+ #set ( $display = false )
+ #displayTree( $display $item )
+##
+ #if ( $alignedFileName == $currentItemHref || $display )
+ #set ( $collapse = "expanded" )
+ #end
+ #end
+ <li class="$collapse">
+ #if ( $item.img )
+ #if ( $item.position == "left" )
+ #if ( $alignedFileName == $currentItemHref )
+ <strong>#image($item.img $item.alt $item.border $item.width $item.height) $item.name</strong>
+ #else
+ #link($currentItemHref $item.name $item.target $item.img $item.position $item.alt $item.border $item.width $item.height)
+ #end
+ #else
+ #if ( $alignedFileName == $currentItemHref )
+ <strong>$item.name #image($item.img $item.alt $item.border $item.width $item.height)</strong>
+ #else
+ #link($currentItemHref $item.name $item.target $item.img $item.position $item.alt $item.border $item.width $item.height)
+ #end
+ #end
+ #else
+ #if ( $alignedFileName == $currentItemHref )
+ <strong>$item.name</strong>
+ #else
+ #link( $currentItemHref $item.name $item.target $item.img $item.position $item.alt $item.border $item.width $item.height )
+ #end
+ #end
+ #if ( $item && $item.items && $item.items.size() > 0 )
+ #if ( $collapse == "expanded" )
+ <ul>
+ #foreach( $subitem in $item.items )
+ #menuItem( $subitem )
+ #end
+ </ul>
+ #end
+ #end
+ </li>
+#end
+##
+#macro ( mainMenu $menus )
+ #foreach( $menu in $menus )
+ #if ( $menu.name )
+ #if ( $menu.img )
+ #if( $menu.position )
+ #set ( $position = $menu.position )
+ #else
+ #set ( $position = "left" )
+ #end
+##
+ #if ( ! ( $menu.img.toLowerCase().startsWith("http:/") || $menu.img.toLowerCase().startsWith("https:/") ||
+ $menu.img.toLowerCase().startsWith("ftp:/") || $menu.img.toLowerCase().startsWith("mailto:/") ||
+ $menu.img.toLowerCase().startsWith("file:/") || ($menu.img.toLowerCase().indexOf("://") != -1) ) )
+ #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 + $border + $width + $height + "/>" )
+##
+ #if ( $position == "left" )
+ <h5>$img $menu.name</h5>
+ #else
+ <h5>$menu.name $img</h5>
+ #end
+ #else
+ <h5>$menu.name</h5>
+ #end
+ #end
+ #if ( $menu.items && $menu.items.size() > 0 )
+ <ul>
+ #foreach( $item in $menu.items )
+ #menuItem( $item )
+ #end
+ </ul>
+ #end
+ #end
+#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} )
+ <a href="$project.organization.url">${project.organization.name}</a>.
+ #elseif ( ${project.organization.name} )
+ ${project.organization.name}.
+ #end
+ #end
+ #end
+#end
+##
+#macro ( publishDate $position $publishDate $version )
+ #if ( $publishDate && $publishDate.format )
+ #set ( $format = $publishDate.format )
+ #else
+ #set ( $format = "yyyy-MM-dd" )
+ #end
+##
+ $dateFormat.applyPattern( $format )
+##
+ #set ( $dateToday = $dateFormat.format( $currentDate ) )
+##
+ #if ( $publishDate && $publishDate.position )
+ #set ( $datePosition = $publishDate.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" ) && $links && $links.size() > 0 )
+ #set ( $prefix = "&nbsp;<span class=\"divider\">/</span>" )
+ #else
+ #set ( $prefix = "" )
+ #end
+##
+ #if ( $datePosition.equalsIgnoreCase( $position ) )
+ #if ( ( $datePosition.equalsIgnoreCase( "right" ) ) || ( $datePosition.equalsIgnoreCase( "bottom" ) ) )
+ <div class="pull-right">
+ $prefix <span id="publishDate">$i18n.getString( "site-renderer", $locale, "template.lastpublished" ): $dateToday</span>
+ </div>
+ #if ( $versionPosition.equalsIgnoreCase( $position ) )
+ &nbsp;<span class="divider">|</span> <span id="projectVersion">$i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version}</span>
+ #end
+ #elseif ( ( $datePosition.equalsIgnoreCase( "navigation-bottom" ) ) || ( $datePosition.equalsIgnoreCase( "navigation-top" ) ) )
+ <div id="lastPublished">
+ <span id="publishDate">$i18n.getString( "site-renderer", $locale, "template.lastpublished" ): $dateToday</span>
+ #if ( $versionPosition.equalsIgnoreCase( $position ) )
+ &nbsp;<span class="divider">|</span> <span id="projectVersion">$i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version}</span>
+ #end
+ </div>
+ #elseif ( $datePosition.equalsIgnoreCase("left") )
+ <div class="xleft">
+ <span id="publishDate">$i18n.getString( "site-renderer", $locale, "template.lastpublished" ): $dateToday</span>
+ #if ( $versionPosition.equalsIgnoreCase( $position ) )
+ &nbsp;<span class="divider">|</span> <span id="projectVersion">$i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version}</span>
+ #end
+ #if ( $breadcrumbs && $breadcrumbs.size() > 0 )
+ <span class="divider">|</span> #breadcrumbs( $breadcrumbs )
+ #end
+ </div>
+ #end
+ #elseif ( $versionPosition.equalsIgnoreCase( $position ) )
+ #if ( ( $versionPosition.equalsIgnoreCase( "right" ) ) || ( $versionPosition.equalsIgnoreCase( "bottom" ) ) )
+ $prefix <span id="projectVersion">$i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version}</span>
+ #elseif ( ( $versionPosition.equalsIgnoreCase( "navigation-bottom" ) ) || ( $versionPosition.equalsIgnoreCase( "navigation-top" ) ) )
+ <div id="lastPublished">
+ <span id="projectVersion">$i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version}</span>
+ </div>
+ #elseif ( $versionPosition.equalsIgnoreCase("left") )
+ <div class="xleft">
+ <span id="projectVersion">$i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version}</span>
+ #if ( $breadcrumbs && $breadcrumbs.size() > 0 )
+ | #breadcrumbs( $breadcrumbs )
+ #end
+ </div>
+ #end
+ #elseif ( $position.equalsIgnoreCase( "left" ) )
+ #if ( $breadcrumbs && $breadcrumbs.size() > 0 )
+ <div class="xleft">
+ #breadcrumbs( $breadcrumbs )
+ </div>
+ #end
+ #end
+#end
+##
+#macro ( poweredByLogo $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
+##
+ <a href="$href" title="$name" class="poweredBy">
+ <img class="poweredBy" $alt src="$img" $border $width $height />
+ </a>
+ #end
+ #if( $poweredBy.isEmpty() )
+ <a href="http://maven.apache.org/" title="$i18n.getString( "site-renderer", $locale, "template.builtby" ) Maven" class="poweredBy">
+ <img class="poweredBy" alt="$i18n.getString( "site-renderer", $locale, "template.builtby" ) Maven" src="$relativePath/images/logos/maven-feather.png" />
+ </a>
+ #end
+ #else
+ <a href="http://maven.apache.org/" title="$i18n.getString( "site-renderer", $locale, "template.builtby" ) Maven" class="poweredBy">
+ <img class="poweredBy" alt="$i18n.getString( "site-renderer", $locale, "template.builtby" ) Maven" src="$relativePath/images/logos/maven-feather.png" />
+ </a>
+ #end
+#end
+##
+#macro ( googleAnalytics $accountId )
+ #if( $accountId && $accountId != "" )
+ <!-- Google Analytics -->
+ <script type="text/javascript">
+
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', '$accountId']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+
+ </script>
+ #end
+#end
+##
+<html xmlns="http://www.w3.org/1999/xhtml"#if ( $locale ) xml:lang="$locale.language" lang="$locale.language"#end>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=${outputEncoding}" />
+ <title>$title</title>
+ <link rel="stylesheet" href="$relativePath/css/bootstrap-1.3.0.min.css">
+ <link rel="stylesheet" href="$relativePath/css/maven-base.css">
+ <link rel="stylesheet" href="$relativePath/css/boostrap-override.css"
+ <link rel="stylesheet" href="$relativePath/css/prettify.css" type="text/css" media="all" />
+ <script type="text/javascript" src="$relativePath/js/prettify.js"></script>
+ <script type="text/javascript">
+ window.onload=function() {
+ prettyPrint();
+ }
+ </script>
+#foreach( $author in $authors )
+ <meta name="author" content="$author" />
+#end
+#if ( $dateCreation )
+ <meta name="Date-Creation-yyyymmdd" content="$dateCreation" />
+#end
+#if ( $dateRevision )
+ <meta name="Date-Revision-yyyymmdd" content="$dateRevision" />
+#end
+#if ( $locale )
+ <meta http-equiv="Content-Language" content="$locale.language" />
+#end
+ #if ( $decoration.body.head )
+ #foreach( $item in $decoration.body.head.getChildren() )
+ ## Workaround for DOXIA-150 due to a non-desired behaviour in p-u
+ ## @see org.codehaus.plexus.util.xml.Xpp3Dom#toString()
+ ## @see org.codehaus.plexus.util.xml.Xpp3Dom#toUnescapedString()
+ #set ( $documentHeader = '<?xml version="1.0" encoding="UTF-8"?>' )
+ #if ( $item.name == "script" )
+ $StringUtils.replace( $item.toUnescapedString(), $documentHeader, "" )
+ #else
+ $StringUtils.replace( $item.toString(), $documentHeader, "" )
+ #end
+ #end
+ #end
+ $headContent
+ #googleAnalytics( $decoration.googleAnalyticsAccountId )
+ </head>
+ <body>
+ <div class="topbar">
+ <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 )#publishDate( "right" $decoration.publishDate $decoration.version )
+ </ul>
+ </div>
+ </div>
+ </div>
+
+ <div id="banner">
+ <ul class="media-grid">
+ <li class="xleftbanner">#banner( $decoration.bannerLeft "bannerLeft" )</li>
+ <li class="xrightbanner">#banner( $decoration.bannerRight "bannerRight" )</li>
+ </ul>
+ </div>
+
+ <div id="breadcrumbs">
+ <ul class="breadcrumb">
+ #publishDate( "left" $decoration.publishDate $decoration.version )
+ #publishDate( "right" $decoration.publishDate $decoration.version )
+ </ul>
+ </div>
+
+ <div class="container-fluid">
+ <div id="leftColumn" class="sidebar">
+ <div class="well">
+ #publishDate( "navigation-top" $decoration.publishDate $decoration.version )
+ #mainMenu( $decoration.body.menus )
+ #poweredByLogo( $decoration.poweredBy )
+ #publishDate( "navigation-bottom" $decoration.publishDate $decoration.version )
+ </div>
+ </div>
+
+ <div id="bodyColumn" class="content">
+ <div id="contentBox">
+ $bodyContent
+ </div>
+ </div>
+ </div>
+
+ <footer>
+ #if($decoration.body.footer)
+ $decoration.body.footer
+ #else
+ Copyright &copy;#copyright()All Rights Reserved.#publishDate( "bottom" $decoration.publishDate $decoration.version )
+ #end
+ </footer>
+ </body>
+</html>