[gimp-help-2] Add a link to gimp.org on the first manual page
- From: Ulf-D. Ehlert <ulfehlert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-help-2] Add a link to gimp.org on the first manual page
- Date: Wed, 15 Sep 2010 16:28:24 +0000 (UTC)
commit c2bbf3c801ec14f0838b69037c110a3d6d889cef
Author: Ulf-D. Ehlert <ulfehlert svn gnome org>
Date: Sat Sep 11 14:40:27 2010 +0200
Add a link to gimp.org on the first manual page
For this purpose,
* customize the docbook-xsl template which makes the navigation header;
* add an image similar to (actually: adapted from) www.gimp.org/docs
to represent the link.
images/common/gimp-org.png | Bin 0 -> 2400 bytes
stylesheets/plainhtml.xsl.in | 101 +++++++++++++++++++++++++++++++++++++++++-
2 files changed, 100 insertions(+), 1 deletions(-)
---
diff --git a/images/common/gimp-org.png b/images/common/gimp-org.png
new file mode 100644
index 0000000..c9ac05b
Binary files /dev/null and b/images/common/gimp-org.png differ
diff --git a/stylesheets/plainhtml.xsl.in b/stylesheets/plainhtml.xsl.in
index 79142a3..39e967d 100644
--- a/stylesheets/plainhtml.xsl.in
+++ b/stylesheets/plainhtml.xsl.in
@@ -76,7 +76,104 @@
-->
<xsl:template match="*[ role='tex']" />
- <!-- custom header and footer navigation -->
+ <!-- ==================================================================== -->
+
+ <!-- This is a customized version of the docbook-xsl-1.75.2 template -->
+ <xsl:template name="header.navigation">
+ <xsl:param name="prev" select="/foo"/>
+ <xsl:param name="next" select="/foo"/>
+ <xsl:param name="nav.context"/>
+
+ <xsl:variable name="home" select="/*[1]"/>
+ <xsl:variable name="up" select="parent::*"/>
+
+ <xsl:variable name="row1" select="$navig.showtitles != 0"/>
+ <xsl:variable name="row2" select="count($prev) > 0
+ or (count($up) > 0
+ and generate-id($up) != generate-id($home)
+ and $navig.showtitles != 0)
+ or count($next) > 0"/>
+
+ <xsl:if test="$suppress.navigation = '0' and $suppress.header.navigation = '0'">
+ <div class="navheader">
+ <xsl:if test="$row1 or $row2">
+ <table width="100%" summary="Navigation header">
+ <xsl:if test="$row1">
+ <tr>
+ <th colspan="3" align="center">
+ <xsl:apply-templates select="." mode="object.title.markup"/>
+ </th>
+ </tr>
+ </xsl:if>
+
+ <xsl:if test="$row2">
+ <tr>
+ <td width="20%" align="{$direction.align.start}">
+ <xsl:choose>
+ <xsl:when test="count($prev)>0">
+ <a accesskey="p">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$prev"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'prev'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+ <!-- PATCH: if prev is empty, add a link to www.gimp.org -->
+ <xsl:otherwise>
+ <a>
+ <xsl:attribute name="href">http://www.gimp.org</xsl:attribute>
+ <img>
+ <xsl:attribute name="src">
+ <xsl:value-of select="$navig.graphics.path"/>
+ <xsl:value-of select="'gimp-org'"/>
+ <xsl:value-of select="$navig.graphics.extension"/>
+ </xsl:attribute>
+ <xsl:attribute name="alt">gimp.org</xsl:attribute>
+ </img>
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ <th width="60%" align="center">
+ <xsl:choose>
+ <xsl:when test="count($up) > 0
+ and generate-id($up) != generate-id($home)
+ and $navig.showtitles != 0">
+ <xsl:apply-templates select="$up" mode="object.title.markup"/>
+ </xsl:when>
+ <xsl:otherwise> </xsl:otherwise>
+ </xsl:choose>
+ </th>
+ <td width="20%" align="{$direction.align.end}">
+ <xsl:text> </xsl:text>
+ <xsl:if test="count($next)>0">
+ <a accesskey="n">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$next"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'next'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:if>
+ </td>
+ </tr>
+ </xsl:if>
+ </table>
+ </xsl:if>
+ <xsl:if test="$header.rule != 0">
+ <hr/>
+ </xsl:if>
+ </div>
+ </xsl:if>
+ </xsl:template>
+
<xsl:template name="footer.navigation">
<xsl:param name="prev" select="/foo"/>
<xsl:param name="next" select="/foo"/>
@@ -224,6 +321,8 @@
</xsl:if>
</xsl:template>
+ <!-- ==================================================================== -->
+
<!-- For unknown reasons the original version of the template starting
from August 2004 would unwind the path of the sourcecode several
times into the processing of the fileref thus prepending the path
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]