~ubuntu-branches/debian/lenny/kipi-plugins/lenny

« back to all changes in this revision

Viewing changes to kipi-plugins/htmlexport/themes/s0/template.xsl

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2008-10-16 08:26:01 UTC
  • mfrom: (2.1.15 hardy)
  • Revision ID: james.westby@ubuntu.com-20081016082601-3f8ozqd96zwuuuki
Tags: 0.1.5-4
* Revert unsuccessful PicasaWebExport.patch 
  - this version suitable for inclusion in lenny
  - kipi plugins - picasa bug (Closes: #501771)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="UTF-8" ?>
 
2
<!DOCTYPE stylesheet [<!ENTITY raquo "&#187;">]>
 
3
 
 
4
<xsl:transform version="1.0"
 
5
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 
6
    xmlns:exsl="http://exslt.org/common"
 
7
    extension-element-prefixes="exsl">
 
8
 
 
9
<xsl:template name="imagePage">
 
10
    <html>
 
11
    <head>
 
12
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 
13
        <title><xsl:value-of select="title"/></title>
 
14
        <link rel="stylesheet" type="text/css" href="../s0/style.css"/>
 
15
    </head>
 
16
    <body id="imagePage">
 
17
 
 
18
        <h1>
 
19
            <xsl:choose>
 
20
                <xsl:when test="count(/collections/collection) &gt; 1">
 
21
                    <a href="../index.html"><xsl:value-of select="$i18nCollectionList"/></a>
 
22
                    &raquo;
 
23
                    <a href="../{../fileName}.html"><xsl:value-of select="../name"/></a>
 
24
                </xsl:when>
 
25
                <xsl:otherwise>
 
26
                    <a href="../index.html"><xsl:value-of select="../name"/></a>
 
27
                </xsl:otherwise>
 
28
            </xsl:choose>
 
29
 
 
30
            &raquo; <xsl:value-of select="title"/>
 
31
            (<xsl:value-of select="position()"/>/<xsl:value-of select="last()"/>)
 
32
        </h1>
 
33
    <div id="navigation">
 
34
        <div id="previous">
 
35
            <xsl:choose>
 
36
                <xsl:when test="position() &gt; 1">
 
37
                    <a href="{preceding-sibling::image[position()=1]/full/@fileName}.html">
 
38
                        <img src="../s0/previous.png" alt="{$i18nPrevious}" title="{$i18nPrevious}" />
 
39
                    </a>
 
40
                </xsl:when>
 
41
                <xsl:otherwise>
 
42
                    <img src="../s0/previous_disabled.png" alt="{$i18nPrevious}" title="{$i18nPrevious}" />
 
43
                </xsl:otherwise>
 
44
            </xsl:choose>
 
45
        </div>
 
46
        <div id="up">
 
47
                <a href="../index.html">
 
48
                        <img src="../s0/up.png" alt="{$i18nUp}" title="{$i18nUp}" />
 
49
                </a>
 
50
        </div>
 
51
        <div id="next">
 
52
            <xsl:choose>
 
53
                <xsl:when test="position() &lt; last()">
 
54
                    <a href="{following-sibling::image[position()=1]/full/@fileName}.html">
 
55
                        <img src="../s0/next.png" alt="{$i18nNext}" title="{$i18nNext}" />
 
56
                    </a>
 
57
                </xsl:when>
 
58
                <xsl:otherwise>
 
59
                    <img src="../s0/next_disabled.png" alt="{$i18nNext}" title="{$i18nNext}" />
 
60
                </xsl:otherwise>
 
61
            </xsl:choose>
 
62
        </div>
 
63
    </div>
 
64
 
 
65
    <div id="content">
 
66
        <img src="{full/@fileName}" width="{full/@width}" height="{full/@height}" />
 
67
        <p>
 
68
        <xsl:value-of select="description"/>
 
69
        </p>
 
70
        <xsl:if test="original/@fileName != ''">
 
71
            <p>
 
72
            <a href="{original/@fileName}"><xsl:value-of select="$i18nOriginalImage"/></a>
 
73
            (<xsl:value-of select="original/@width"/>x<xsl:value-of select="original/@height"/>)
 
74
            </p>
 
75
        </xsl:if>
 
76
    </div>
 
77
    </body>
 
78
    </html>
 
79
</xsl:template>
 
80
 
 
81
 
 
82
<xsl:template name="collectionPage">
 
83
    <html>
 
84
    <head>
 
85
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 
86
        <title><xsl:value-of select="name"/></title>
 
87
        <link rel="stylesheet" type="text/css" href="s0/style.css"/>
 
88
    </head>
 
89
    <body id="collectionPage">
 
90
    <h1>
 
91
        <xsl:if test="count(/collections/collection) &gt; 1">
 
92
            <a href="index.html"><xsl:value-of select="$i18nCollectionList"/></a>
 
93
            &raquo;
 
94
        </xsl:if>
 
95
        <xsl:value-of select="name"/>
 
96
    </h1>
 
97
    <div id="content">
 
98
            <xsl:variable name="folder" select='fileName'/>
 
99
            <xsl:for-each select="image">
 
100
                <span class="thumbnail">
 
101
                    <a href='{$folder}/{full/@fileName}.html'>
 
102
                        <img src="{$folder}/{thumbnail/@fileName}" width="{thumbnail/@width}" height="{thumbnail/@height}" />
 
103
                    </a>
 
104
                    <a href='{$folder}/{full/@fileName}.html'>
 
105
                        <xsl:value-of select="title"/>
 
106
                    </a>
 
107
                </span>
 
108
                <exsl:document href='{$folder}/{full/@fileName}.html'>
 
109
                    <xsl:call-template name="imagePage"/>
 
110
                </exsl:document>
 
111
            </xsl:for-each>
 
112
    </div> <!-- /content -->
 
113
    </body>
 
114
    </html>
 
115
</xsl:template>
 
116
 
 
117
 
 
118
<xsl:template name="collectionListPage">
 
119
    <html>
 
120
    <head>
 
121
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 
122
        <title><xsl:value-of select="$i18nCollectionList"/></title>
 
123
        <link rel="stylesheet" type="text/css" href="s0/style.css"/>
 
124
    </head>
 
125
    <body>
 
126
    <h1><xsl:value-of select="$i18nCollectionList"/></h1>
 
127
    <div id="content">
 
128
            <xsl:for-each select="collections/collection">
 
129
                <span class="thumbnail">
 
130
                    <a href="{fileName}.html">
 
131
                        <!-- Use first image as collection image -->
 
132
                        <img src="{fileName}/{image[1]/thumbnail/@fileName}"
 
133
                                width="{image[1]/thumbnail/@width}"
 
134
                                height="{image[1]/thumbnail/@height}" />
 
135
                        <xsl:value-of select="name"/>
 
136
                    </a>
 
137
                </span>
 
138
                <exsl:document href="{fileName}.html">
 
139
                    <xsl:call-template name="collectionPage"/>
 
140
                </exsl:document>
 
141
            </xsl:for-each>
 
142
    </div> <!-- /content -->
 
143
    </body>
 
144
    </html>
 
145
</xsl:template>
 
146
 
 
147
 
 
148
<xsl:template match="/">
 
149
    <xsl:choose>
 
150
        <xsl:when test="count(collections/collection) &gt; 1">
 
151
            <xsl:call-template name="collectionListPage"/>
 
152
        </xsl:when>
 
153
        <xsl:otherwise>
 
154
            <xsl:for-each select="collections/collection">
 
155
                <xsl:call-template name="collectionPage"/>
 
156
            </xsl:for-each>
 
157
        </xsl:otherwise>
 
158
    </xsl:choose>
 
159
</xsl:template>
 
160
 
 
161
</xsl:transform>