MPXDOC-80 : Support global theme

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@280417 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
ltheussl
2005-09-12 20:49:15 +00:00
parent b55787de94
commit 4de54a1135
4 changed files with 45 additions and 4 deletions

View File

@@ -917,8 +917,16 @@
</util:available>
</j:if>
<j:set var="theme" value="${maven.xdoc.theme.file}" />
<j:if test="${!empty(theme)}">
<util:file var="themefile" name="${basedir}/${maven.xdoc.theme.file}"/>
</j:if>
<j:if test="${themefile.exists()}">
<copy file="${themefile}" todir="${maven.docs.dest}/style/" overwrite="true" />
</j:if>
<maven:pluginVar var="maven_xdoc_xml_copy_pattern"
plugin='maven-xdoc-plugin' property='maven.xdoc.xml.copy' />
plugin="maven-xdoc-plugin" property="maven.xdoc.xml.copy" />
<j:if test="${maven_xdoc_xml_copy_pattern!=null and !maven_xdoc_xml_copy_pattern.equals('')}">
<util:tokenize var="xmlPatterns" delim=",">${maven_xdoc_xml_copy_pattern}</util:tokenize>

View File

@@ -124,7 +124,22 @@
<j:set var="themeUrl" value="${maven.xdoc.theme.url}"/>
<util:file var="projectCssFile" name="${maven.docs.src}/style/project.css"/>
<j:set var="themefile" value="${maven.xdoc.theme.file}"/>
<util:replace var="themeFile" oldChar="\" newChar="/" value="${themefile}"/>
<j:if test="${!empty(themefile)}">
<j:new className="java.lang.String" var="cssFile">
<j:arg value="${themefile}" type="java.lang.String"/>
</j:new>
<j:invoke var="index" on="${cssFile}" method="lastIndexOf">
<j:arg value="/" type="java.lang.String"/>
</j:invoke>
<j:invoke var="cssFileName" on="${cssFile}" method="substring">
<j:arg value="${index}"/>
</j:invoke>
<util:file var="customCssFile" name="${maven.docs.dest}/style${cssFileName}"/>
</j:if>
<style type="text/css" media="all"><![CDATA[
@import url("${relativePathForLocale}style/maven-base.css");
]]>
@@ -137,6 +152,9 @@
<j:if test="${projectCssFile.exists()}"><![CDATA[
@import url("${relativePathForLocale}style/project.css");
]]></j:if>
<j:if test="${customCssFile.exists()}"><![CDATA[
@import url("${relativePathForLocale}style${cssFileName}");
]]></j:if>
</style>
<link rel="stylesheet" type="text/css" href="${relativePathForLocale}style/print.css" media="print"/>

View File

@@ -27,6 +27,7 @@
</properties>
<body>
<release version="1.10" date="in SVN">
<action dev="ltheussl" type="add" issue="MPXDOC-80" due-to="Joerg Schaible">Support global theme.</action>
<action dev="ltheussl" type="add" issue="MPXDOC-24" due-to="Gilles Dodinet">Add a navigation bar.</action>
<action dev="ltheussl" type="add" issue="MPXDOC-158">Add an optional id tag to sub/sections, so they can be referenced.</action>
<action dev="ltheussl" type="add" issue="MPXDOC-144">Add a property to override <code>navigation.xml</code>.</action>

View File

@@ -215,8 +215,22 @@
<td>Yes</td>
<td>
The documentation theme to use. The default is <code>theme</code>,
and valid values are <code>theme</code> (RC2+) or <code>classic</code>
(used in Maven RC1 and below).
and valid values are <code>theme</code> (Maven 1.0RC2+) or
<code>classic</code> (used in Maven 1.0RC1 and below).
You can override this property
if you provide a file <code>maven-&lt;theme_name&gt;.css</code>
in the <code>${maven.docs.src}/stylesheets</code> directory.
</td>
</tr>
<tr>
<td>maven.xdoc.theme.file</td>
<td>Yes</td>
<td>
Define the location of a local theme file.
This should be relative to the current <code>${basedir}</code>.
The file will be copied into the
<code>${maven.docs.dest}/style</code> directory.
This is useful for providing a global theme in a multiproject setup.
</td>
</tr>
<tr>