~ubuntu-branches/ubuntu/raring/xubuntu-docs/raring

« back to all changes in this revision

Viewing changes to desktop-guide/libs/draft-watermark-customisation.xsl

  • Committer: Package Import Robot
  • Author(s): Matthew East, Matthew East, Jeremy Bicha
  • Date: 2012-09-19 20:38:04 UTC
  • Revision ID: package-import@ubuntu.com-20120919203804-1t50gcb1xi8xbyzo
Tags: 12.10.1
[ Matthew East ]
* Complete rewrite of desktop-guide by Pasi Lallinaho
* Change to folder structure of desktop-guide to allow translations

[ Jeremy Bicha ]
* debian/control:
  - Bump Standards-Version to 3.9.3 and debhelper to 8
  - Don't build-depend on ubuntu-docs
* debian/preinst: Dropped, not needed after 12.04 LTS

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
2
 
  version="1.0">
3
 
 
4
 
<!-- This modification looks a bit large but is a couple of lines change to make the draft watermark appear in the #content div wrapper rather than the body background -->
5
 
 
6
 
<xsl:template name="head.content">
7
 
  <xsl:param name="node" select="."/>
8
 
  <xsl:param name="title">
9
 
    <xsl:apply-templates select="$node" mode="object.title.markup.textonly"/>
10
 
  </xsl:param>
11
 
 
12
 
  <title>
13
 
    <xsl:copy-of select="$title"/>
14
 
  </title>
15
 
 
16
 
  <xsl:if test="$html.stylesheet != ''">
17
 
    <xsl:call-template name="output.html.stylesheets">
18
 
      <xsl:with-param name="stylesheets" select="normalize-space($html.stylesheet)"/>
19
 
    </xsl:call-template>
20
 
  </xsl:if>
21
 
 
22
 
  <xsl:if test="$link.mailto.url != ''">
23
 
    <link rev="made" href="{$link.mailto.url}"/>
24
 
  </xsl:if>
25
 
 
26
 
  <xsl:if test="$html.base != ''">
27
 
    <base href="{$html.base}"/>
28
 
  </xsl:if>
29
 
 
30
 
<!--  <meta name="generator" content="DocBook {$DistroTitle} V{$VERSION}"/> -->
31
 
 
32
 
  <xsl:if test="$generate.meta.abstract != 0">
33
 
    <xsl:variable name="info" select="(articleinfo                                       |bookinfo                                       |prefaceinfo                                       |chapterinfo                                       |appendixinfo                                       |sectioninfo                                       |sect1info                                       |sect2info                                       |sect3info                                       |sect4info                                       |sect5info                                       |referenceinfo                                       |refentryinfo                                       |partinfo                                       |info                                       |docinfo)[1]"/>
34
 
    <xsl:if test="$info and $info/abstract">
35
 
      <meta name="description">
36
 
        <xsl:attribute name="content">
37
 
          <xsl:for-each select="$info/abstract[1]/*">
38
 
            <xsl:value-of select="normalize-space(.)"/>
39
 
            <xsl:if test="position() &lt; last()">
40
 
              <xsl:text> </xsl:text>
41
 
            </xsl:if>
42
 
          </xsl:for-each>
43
 
        </xsl:attribute>
44
 
      </meta>
45
 
    </xsl:if>
46
 
  </xsl:if>
47
 
 
48
 
  <xsl:if test="($draft.mode = 'yes' or                 ($draft.mode = 'maybe' and                 ancestor-or-self::*[@status][1]/@status = 'draft'))                 and $draft.watermark.image != ''">
49
 
    <style type="text/css"><xsl:text>
50
 
#content { background-image: url('</xsl:text>
51
 
<xsl:value-of select="$draft.watermark.image"/><xsl:text>');
52
 
       background-repeat: repeat-y;
53
 
       background-position: top center;
54
 
       /* The following properties make the watermark "fixed" on the page. */
55
 
       /* I think that's just a bit too distracting for the reader... */
56
 
       /* background-attachment: fixed; */
57
 
       /* background-position: center center; */
58
 
     }</xsl:text>
59
 
    </style>
60
 
  </xsl:if>
61
 
  <xsl:apply-templates select="." mode="head.keywords.content"/>
62
 
</xsl:template>
63
 
 
64
 
 
65
 
</xsl:stylesheet>