change logo in pdf
[librarian.git] / librarian / epub / xsltTitle.xsl
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="1.0"
3     xmlns="http://www.w3.org/1999/xhtml"
4     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5     xmlns:dc="http://purl.org/dc/elements/1.1/"
6     xmlns:wl="http://wolnelektury.pl/functions">
7   <xsl:output method="html" version="1.0" encoding="utf-8" />
8   <xsl:output doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" />
9   <xsl:output doctype-public="-//W3C//DTD XHTML 1.1//EN" />
10
11   <xsl:template match="/">
12     <html>
13       <head>
14         <link rel="stylesheet" href="style.css" type="text/css" />
15         <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
16         <title>
17           <xsl:text>Strona tytułowa</xsl:text>
18         </title>
19       </head>
20       <body>
21         <div id="book-text" >
22           <div class='title-page'>
23             <xsl:choose>
24               <xsl:when test="//autor_utworu | //nazwa_utworu">
25                 <xsl:apply-templates select="//autor_utworu" mode="poczatek"/>
26                 <xsl:apply-templates select="//nazwa_utworu | //podtytul | //dzielo_nadrzedne" mode="poczatek"/>
27               </xsl:when>
28               <xsl:otherwise>
29                 <xsl:apply-templates select="//dc:creator" mode="poczatek"/>
30                 <xsl:apply-templates select="//dc:title | //podtytul | //dzielo_nadrzedne" mode="poczatek"/>
31               </xsl:otherwise>
32             </xsl:choose>
33           </div>
34
35           <p class="info">&#160;</p>
36
37           <xsl:call-template name="translators" />
38
39           <xsl:if test="utwor/@working-copy">
40             <p class="info">[Kopia robocza]</p>
41           </xsl:if>
42
43           <!--xsl:if test="not(utwor/@less-advertising)">
44             <p class="info">
45               <a>
46                   <xsl:attribute name="href">
47                       <xsl:value-of select="//dc:identifier.url" />
48                   </xsl:attribute>
49                   Ta lektura</a>,
50               podobnie jak tysiące innych, jest dostępna on-line na stronie
51               <a href="http://www.wolnelektury.pl/">wolnelektury.pl</a>.
52             </p>
53           </xsl:if>
54
55           <p class="info">
56             Utwór opracowany został w&#160;ramach projektu<a href="http://www.wolnelektury.pl/"> Wolne Lektury</a> przez<a href="http://www.nowoczesnapolska.org.pl/"> fundację Nowoczesna Polska</a>.
57           </p-->
58
59           <p class="footer info">
60             <!--a href="http://www.wolnelektury.pl/"><img src="logo_wolnelektury.png" alt="WolneLektury.pl" /></a-->
61             <a href="http://koed.org.pl"><img src="logo_koed.png" alt="Koalicja Otwartej Edukacji" /></a>
62           </p>
63         </div>
64       </body>
65     </html>
66   </xsl:template>
67
68   <xsl:template match="text()" >
69     <xsl:value-of select="." />
70   </xsl:template>
71
72   <xsl:template match="node()" mode="poczatek">
73     <xsl:value-of select="." />
74   </xsl:template>
75
76   <xsl:template match="dc:creator" mode="poczatek">
77     <h2 class="author">
78       <xsl:apply-templates mode='person' />
79     </h2>
80   </xsl:template>
81
82   <xsl:template match="dc:creator/text()">
83     <h2 class="author" >
84       <xsl:apply-templates mode='person' />
85     </h2>
86   </xsl:template>
87
88   <xsl:template name="translators">
89     <xsl:if test="//dc:contributor.translator">
90         <p class="info">
91             <xsl:text>tłum. </xsl:text>
92             <xsl:for-each select="//dc:contributor.translator">
93                 <xsl:if test="position() != 1">, </xsl:if>
94                 <xsl:apply-templates mode="person" />
95             </xsl:for-each>
96         </p>
97     </xsl:if>
98   </xsl:template>
99
100   <xsl:template match="text()" mode="person">
101     <xsl:value-of select="wl:person_name(.)" />
102   </xsl:template>
103
104   <xsl:template match="autor_utworu" mode="poczatek">
105     <h2 class="author" >
106       <xsl:apply-templates />
107     </h2>
108   </xsl:template>
109
110   <xsl:template match="dzielo_nadrzedne" mode="poczatek">
111     <h2 class="collection" >
112       <xsl:apply-templates />
113     </h2>
114   </xsl:template>
115
116   <xsl:template match="nazwa_utworu" mode="poczatek" >
117     <h1 class="title" >
118       <xsl:apply-templates />
119     </h1>
120   </xsl:template>
121
122   <xsl:template match="dc:title" mode="poczatek" >
123     <h1 class="title" >
124       <xsl:apply-templates />
125     </h1>
126   </xsl:template>
127
128   <xsl:template match="podtytul" mode="poczatek">
129     <h2 class="subtitle" >
130       <xsl:apply-templates />
131     </h2>
132   </xsl:template>
133
134   <xsl:template match="pe|pa|pr|pt" />
135
136   <xsl:template match="extra" />
137
138   <xsl:template match="motyw" />
139
140 </xsl:stylesheet>