add a legend to the left nav

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@115807 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
brett
2004-07-13 12:18:59 +00:00
parent c13bc9aa51
commit 7a8bc995fe
8 changed files with 133 additions and 97 deletions

View File

@@ -27,6 +27,8 @@ maven.xdoc.crumb.separator=|
maven.xdoc.theme.url=
maven.xdoc.theme=theme
maven.xdoc.legend=true
# Location where the artifacts are distributed. This property is optional.
# If it is not defined, then the Download report will not be added to the
# navigation menu.

View File

@@ -23,7 +23,7 @@
<pomVersion>3</pomVersion>
<id>maven-xdoc-plugin</id>
<name>Maven XDoc Plug-in</name>
<currentVersion>1.8</currentVersion>
<currentVersion>1.9-SNAPSHOT</currentVersion>
<description>Convert xdocs into HTML. Requires Maven 1.0 RC2.</description>
<shortDescription>Convert xdocs into HTML</shortDescription>
<url>http://maven.apache.org/reference/plugins/xdoc/</url>

View File

@@ -62,6 +62,9 @@ div.clear hr{
#bodyColumn {
margin-left: 20%;
}
#legend {
padding: 8px 0 8px 0;
}
#navcolumn {
padding: 8px 4px 0 8px;
}

View File

@@ -96,11 +96,19 @@ a:link.selfref, a:visited.selfref {
color: @UI_HREF_LINK_SELFREF@ !important;
}
#legend li.externalLink {
background: url(../images/external-classic.png) left top no-repeat;
padding-left: 18px;
}
a.externalLink, a.externalLink:link, a.externalLink:visited, a.externalLink:active, a.externalLink:hover {
background: url(../images/external-classic.png) right center no-repeat;
padding-right: 15px;
padding-right: 18px;
}
#legend li.newWindow {
background: url(../images/newwindow-classic.png) left top no-repeat;
padding-left: 18px;
}
a.newWindow, a.newWindow:link, a.newWindow:visited, a.newWindow:active, a.newWindow:hover {
background: url(../images/newwindow-classic.png) right center no-repeat;
padding-right: 18px;
@@ -124,7 +132,7 @@ img.handle {
#navcolumn div div {
padding-left: 10px;
}
/* $Id: maven-classic.css,v 1.3 2004/05/18 09:23:28 aheritier Exp $
/* $Id: maven-classic.css,v 1.4 2004/07/13 12:18:59 brett Exp $
This file defines basic default formatting for HTML conforming to Tigris application style. To extend or override these rules for your instance, edit inst.css instead of this file. */

View File

@@ -14,9 +14,17 @@ a:visited {
a:active, a:hover {
color:#69c;
}
#legend li.externalLink {
background: url(../images/external.png) left top no-repeat;
padding-left: 18px;
}
a.externalLink, a.externalLink:link, a.externalLink:visited, a.externalLink:active, a.externalLink:hover {
background: url(../images/external.png) right center no-repeat;
padding-right: 15px;
padding-right: 18px;
}
#legend li.newWindow {
background: url(../images/newwindow.png) left top no-repeat;
padding-left: 18px;
}
a.newWindow, a.newWindow:link, a.newWindow:visited, a.newWindow:active, a.newWindow:hover {
background: url(../images/newwindow.png) right center no-repeat;

View File

@@ -33,12 +33,12 @@
trim="true">
<jsl:template match="document" trim="true">
<j:useBean var="navbean" class="org.apache.maven.NavBean"/>
<j:set var="location" value="${outFile.substring(destdir.length())}"/>
<util:replace var="location" oldChar="\" newChar="/" value="${location}"/>
<j:set var="location" value="${outFile.substring(destdir.length())}"/>
<util:replace var="location" oldChar="\" newChar="/" value="${location}"/>
<!-- Stores location for publish date / version -->
<j:set var="date">${maven.xdoc.date}</j:set>
<j:setProperties object="${navbean}" document="${doc}" location="${location}"/>
<j:setProperties object="${navbean}" document="${doc}" location="${location}"/>
<x:doctype name="html" publicId="-//W3C//DTD XHTML 1.0 Transitional//EN" systemId="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
<html>
<head>
@@ -56,15 +56,15 @@
<style type="text/css" media="all"><![CDATA[
@import url("${relativePath}/style/maven-base.css");
]]>
<j:if test="${!empty(themeUrl)}"><![CDATA[
@import url("${maven.xdoc.theme.url}");
]]></j:if>
<j:if test="${empty(themeUrl)}"><![CDATA[
@import url("${relativePath}/style/maven-${maven.xdoc.theme}.css");
]]></j:if>
<j:if test="${projectCssFile.exists()}"><![CDATA[
@import url("${relativePath}/style/project.css");
]]></j:if>
<j:if test="${!empty(themeUrl)}"><![CDATA[
@import url("${maven.xdoc.theme.url}");
]]></j:if>
<j:if test="${empty(themeUrl)}"><![CDATA[
@import url("${relativePath}/style/maven-${maven.xdoc.theme}.css");
]]></j:if>
<j:if test="${projectCssFile.exists()}"><![CDATA[
@import url("${relativePath}/style/project.css");
]]></j:if>
</style>
<link rel="stylesheet" type="text/css" href="${relativePath}/style/print.css" media="print"/>
@@ -86,67 +86,67 @@
</j:whitespace>
<div id="banner">
<!-- organization logo -->
<j:set var="logo" value="${pom.organization.logo}"/>
<j:if test="${!empty(logo)}">
<!-- set url to org or project url -->
<j:set var="url" value="${pom.organization.url}"/>
<j:if test="${!empty(url)}">
<j:set var="home" value="${pom.organization.url}"/>
</j:if>
<j:if test="${empty(url)}">
<j:set var="home" value="${pom.url}"/>
</j:if>
<!-- set image to relative or complete -->
<j:set var="image" value="${pom.organization.logo}"/>
<j:if test="${!image.startsWith('http://') and !image.startsWith('https://')}">
<j:set var="image" value="${relativePath}${image}"/>
</j:if>
<a href="${home}" id="organizationLogo">
<img src="${image}" alt="${pom.organization.name}" />
</a>
</j:if>
<!-- organization logo -->
<j:set var="logo" value="${pom.organization.logo}"/>
<j:if test="${!empty(logo)}">
<!-- set url to org or project url -->
<j:set var="url" value="${pom.organization.url}"/>
<j:if test="${!empty(url)}">
<j:set var="home" value="${pom.organization.url}"/>
</j:if>
<j:if test="${empty(url)}">
<j:set var="home" value="${pom.url}"/>
</j:if>
<!-- set image to relative or complete -->
<j:set var="image" value="${pom.organization.logo}"/>
<j:if test="${!image.startsWith('http://') and !image.startsWith('https://')}">
<j:set var="image" value="${relativePath}${image}"/>
</j:if>
<a href="${home}" id="organizationLogo">
<img src="${image}" alt="${pom.organization.name}" />
</a>
</j:if>
<!-- project logo and link -->
<j:set var="logo" value="${pom.logo}"/>
<j:if test="${logo != null and logo != ''}">
<!-- set image to relative or complete -->
<j:set var="image" value="${pom.logo}"/>
<j:if test="${!image.startsWith('http://') and !image.startsWith('https://')}">
<j:set var="image" value="${relativePath}${image}"/>
</j:if>
<!-- project logo and link -->
<j:set var="logo" value="${pom.logo}"/>
<j:if test="${logo != null and logo != ''}">
<!-- set image to relative or complete -->
<j:set var="image" value="${pom.logo}"/>
<j:if test="${!image.startsWith('http://') and !image.startsWith('https://')}">
<j:set var="image" value="${relativePath}${image}"/>
</j:if>
<a href="${pom.url}" id="projectLogo">
<img src="${image}" alt="${pom.name}"/>
</a>
</j:if>
<j:if test="${logo == null or logo == ''}">
<a href="${pom.url}" id="projectLogo">
<span>${pom.name}</span>
</a>
</j:if>
<div class="clear"><hr /></div>
<a href="${pom.url}" id="projectLogo">
<img src="${image}" alt="${pom.name}"/>
</a>
</j:if>
<j:if test="${logo == null or logo == ''}">
<a href="${pom.url}" id="projectLogo">
<span>${pom.name}</span>
</a>
</j:if>
<div class="clear"><hr /></div>
</div>
<div id="breadcrumbs">
<j:if test="${date == 'left'}">
<maven:property var="version" name="maven.xdoc.version" defaultValue="${pom.currentVersion}"/>
<div class="xleft">
Last published: ${build.date}
<j:if test="${!empty(version)}">| Doc for ${version}</j:if>
</div>
</j:if>
<div class="xright">
<j:if test="${date == 'right'}">
Last published: ${build.date}
<x:if select="$nav/body/links">|</x:if>
</j:if>
<!-- render links -->
<x:if select="$nav/body/links">
<jsl:applyTemplates select="$nav/body/links"/>
</x:if>
</div>
<div class="clear"><hr /></div>
<j:if test="${date == 'left'}">
<maven:property var="version" name="maven.xdoc.version" defaultValue="${pom.currentVersion}"/>
<div class="xleft">
Last published: ${build.date}
<j:if test="${!empty(version)}">| Doc for ${version}</j:if>
</div>
</j:if>
<div class="xright">
<j:if test="${date == 'right'}">
Last published: ${build.date}
<x:if select="$nav/body/links">|</x:if>
</j:if>
<!-- render links -->
<x:if select="$nav/body/links">
<jsl:applyTemplates select="$nav/body/links"/>
</x:if>
</div>
<div class="clear"><hr /></div>
</div>
<!-- left column start -->
@@ -163,6 +163,15 @@
<x:if select="$nav">
<jsl:applyTemplates select="$nav/body/menu[@type='footer']"/>
</x:if>
<j:if test="${context.getVariable('maven.xdoc.legend') == 'true'}">
<div id="legend">
<h5>Legend</h5>
<ul>
<li class="externalLink">External Link</li>
<li class="newWindow">Opens in a new window</li>
</ul>
</div>
</j:if>
<!-- Standard Maven Navigation -->
<j:set var="fileName">${file}</j:set>
<j:set var="poweredbyimage">${maven.xdoc.poweredby.image}</j:set>
@@ -177,24 +186,23 @@
<div id="lastPublished">Last published: ${build.date}</div>
</j:if>
</div>
</div>
<!-- left column end -->
</div>
<!-- left column end -->
<!-- body start -->
<div id="bodyColumn">
<div class="contentBox">
<!-- FIXME really shouldn't use $doc, but jelly loses it's context again -->
<jsl:applyTemplates select="$doc/document/body/section"/>
<jsl:applyTemplates select="$doc/document/body/release" />
<jsl:applyTemplates select="$doc/document/body/goals" />
</div>
</div>
<div class="clear"><hr /></div>
<!-- body end -->
<!-- body start -->
<div id="bodyColumn">
<div class="contentBox">
<!-- FIXME really shouldn't use $doc, but jelly loses it's context again -->
<jsl:applyTemplates select="$doc/document/body/section"/>
<jsl:applyTemplates select="$doc/document/body/release" />
<jsl:applyTemplates select="$doc/document/body/goals" />
</div>
</div>
<div class="clear"><hr /></div>
<!-- body end -->
<!-- footer start -->
<div id="footer">
<!-- footer start -->
<div id="footer">
<jsl:applyTemplates select="$nav/body/footer"/>
<div class="xright">
<j:if test="${!empty(pom.organization.name)}">
@@ -217,8 +225,6 @@
<div class="clear"><hr /></div>
</div>
<!-- footer end -->
</x:element>
</html>
</jsl:template>
@@ -245,7 +251,6 @@
</div>
</j:otherwise>
</j:choose>
</jsl:template>
<jsl:template match="item" trim="true">
@@ -456,14 +461,14 @@
<j:set var="href" value="${attr.value}" />
<j:choose>
<j:when test="${href.startsWith('#')}">
<x:attribute name="href">
<doc:escapeNameToken value="${href}"/>
</x:attribute>
<x:attribute name="href">
<doc:escapeNameToken value="${href}"/>
</x:attribute>
</j:when>
<j:when test="${href.startsWith('http://')}">
<x:attribute name="href">${href}</x:attribute>
<x:attribute name="class">externalLink</x:attribute>
<x:attribute name="title">External Link</x:attribute>
<x:attribute name="class">externalLink</x:attribute>
<x:attribute name="title">External Link</x:attribute>
</j:when>
<j:otherwise>
<x:attribute name="href">${href}</x:attribute>

View File

@@ -25,6 +25,9 @@
<author email="vmassol@apache.org">Vincent Massol</author>
</properties>
<body>
<release version="1.9-SNAPSHOT" date="in CVS">
<action dev="brett" type="add">Add a legend for the symbols in the xdoc, disabled by setting <code>maven.xdoc.legend=false</code></action>
</release>
<release version="1.8" date="2004-07-10">
<action dev="brett" type="add">Add an externalLink attribute to a report to use if link is not present</action>
<action dev="vmassol" type="add">Added a link to the release notes in the download report. Note that this link is only created if the project has a

View File

@@ -153,6 +153,13 @@
http://maven.apache.org/development-process.html</a>.
</td>
</tr>
<tr>
<td>maven.xdoc.legend</td>
<td>Yes</td>
<td>
Whether to display the legend in the left navigation. Default is <code>true</code>.
</td>
</tr>
<tr>
<td>maven.xdoc.poweredby.image</td>
<td>Yes</td>