summaryrefslogtreecommitdiff
path: root/xslt/common/theme.xsl
blob: 0965920ca4801502a8647e8e74671381c88c7988 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
<?xml version='1.0' encoding='UTF-8'?><!-- -*- indent-tabs-mode: nil -*- -->
<!--
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option) any
later version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.

You should have received a copy of the GNU Lesser General Public License
along with this program; see the file COPYING.LGPL.  If not, see <http://www.gnu.org/licenses/>.
-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.0">

<!--!!==========================================================================
Themes
:Requires: gettext

This module provides a common interface to specify custom colors and icons
for transformations to presentation-oreinted formats.  This allows similar
output for different types of input documents.  Theme information may either
be passed in as XSLT parameters or specified in a theme file.

REMARK: Describe the format of theme files.
-->


<!-- == Colors ============================================================= -->

<!--@@==========================================================================
theme.color.background
The background color

This parameter specifies the default background color.
-->
<xsl:param name="theme.color.background" select="'#ffffff'"/>

<!--@@==========================================================================
theme.color.link
The color of links

If set, this parameter specifies the color for unvisited links.
-->
<xsl:param name="theme.color.link" select="'#1f609f'"/>

<!--@@==========================================================================
theme.color.link_visited
The color of visited links

This parameter specifies the color for visited links.
-->
<xsl:param name="theme.color.link_visited" select="'#9f1f6f'"/>

<!--@@==========================================================================
theme.color.text
The normal text color

This parameter specifies the default color for normal text.
-->
<xsl:param name="theme.color.text" select="'#000000'"/>

<!--@@==========================================================================
theme.color.text_light
The light text color

This parameter specifies the color for light text.  The light text
color is used to make bold headings and certain parenthetical text less intense.
-->
<xsl:param name="theme.color.text_light" select="'#3f3f3f'"/>

<!--@@==========================================================================
theme.color.blue_background
The blue background color

This parameter specifies the blue background color.  The blue
background color may be used by certain types of block elements.
-->
<xsl:param name="theme.color.blue_background" select="'#f0f9ff'"/>

<!--@@==========================================================================
theme.color.blue_border
The blue border color

This parameter specifies the blue border color.  The blue
border color may be used by certain types of block elements.
-->
<xsl:param name="theme.color.blue_border" select="'#c0c9ff'"/>

<!--@@==========================================================================
theme.color.gray_background
The gray background color

This parameter specifies the gray background color.  The gray
background color may be used by certain types of block elements.
-->
<xsl:param name="theme.color.gray_background" select="'#f9f9f6'"/>

<!--@@==========================================================================
theme.color.gray_border
The gray border color

This parameter specifies the gray border color.  The gray
border color may be used by certain types of block elements.
-->
<xsl:param name="theme.color.gray_border" select="'#e0e0df'"/>

<!--@@==========================================================================
theme.color.red_background
The red background color

This parameter specifies the red background color.  The red
background color may be used by certain types of block elements.
-->
<xsl:param name="theme.color.red_background" select="'#fff0f0'"/>

<!--@@==========================================================================
theme.color.red_border
The red border color

This parameter specifies the red border color.  The red
border color may be used by certain types of block elements.
-->
<xsl:param name="theme.color.red_border" select="'#ffc0c0'"/>

<!--@@==========================================================================
theme.color.yellow_background
The yellow background color

This parameter specifies the yellow background color.  The yellow
background color may be used by certain types of block elements.
-->
<xsl:param name="theme.color.yellow_background" select="'#fffff0'"/>

<!--@@==========================================================================
theme.color.yellow_border
The yellow border color

This parameter specifies the yellow border color.  The yellow
border color may be used by certain types of block elements.
-->
<xsl:param name="theme.color.yellow_border" select="'#ffffc0'"/>


<!-- == Admonition Icons =================================================== -->

<!--@@==========================================================================
theme.icon.admon.path
The default path to the admonition icons

This parameter specifies a default path where admonition icons can be found.
This is only a default path.  It has no effect on admonition icons for which
the corresponding parameter has been specified explicitly.
-->
<xsl:param name="theme.icon.admon.path" select="''"/>

<!--@@==========================================================================
theme.icon.admon.size
The size of the admonition icons

This parameter specifies the size of the icons given in @{theme.icon.admon.bug},
@{theme.icon.admon.caution}, @{theme.icon.admon.important}, @{theme.icon.admon.note},
@{theme.icon.admon.tip}, and @{theme.icon.admon.warning}.  The value of this parameter
should be a single integer specifying both the width and the height in pixels.  Icon
sizes are assumed to be square.
-->
<xsl:param name="theme.icon.admon.size" select="48"/>

<!--@@==========================================================================
theme.icon.admon.bug
The path for the bug admonition icon

This parameter specifies the icon used for bug admonitions.
-->
<xsl:param name="theme.icon.admon.bug"
           select="concat($theme.icon.admon.path, 'admon-bug.png')"/>

<!--@@==========================================================================
theme.icon.admon.caution
The path for the caution admonition icon

This parameter specifies the icon used for caution admonitions.
-->
<xsl:param name="theme.icon.admon.caution"
           select="concat($theme.icon.admon.path, 'admon-caution.png')"/>

<!--@@==========================================================================
theme.icon.admon.important
The path for the important admonition icon

This parameter specifies the icon used for important admonitions.
-->
<xsl:param name="theme.icon.admon.important"
           select="concat($theme.icon.admon.path, 'admon-important.png')"/>

<!--@@==========================================================================
theme.icon.admon.note
The path for the note admonition icon

This parameter specifies the icon used for note admonitions.
-->
<xsl:param name="theme.icon.admon.note"
           select="concat($theme.icon.admon.path, 'admon-note.png')"/>

<!--@@==========================================================================
theme.icon.admon.tip
The path for the tip admonition icon

This parameter specifies the icon used for tip admonitions.
-->
<xsl:param name="theme.icon.admon.tip"
           select="concat($theme.icon.admon.path, 'admon-tip.png')"/>

<!--@@==========================================================================
theme.icon.admon.warning
The path for the warning admonition icon

This parameter specifies the icon used for warning admonitions.
-->
<xsl:param name="theme.icon.admon.warning"
           select="concat($theme.icon.admon.path, 'admon-warning.png')"/>


<!-- == Watermarks ========================================================= -->

<!--@@==========================================================================
theme.watermark.path
The default path to the watermark graphics

This parameter specifies a default path where watermark graphics can be found.
This is only a default path.  It has no effect on watermark graphics for which
the corresponding parameter has been specified explicitly.
-->
<xsl:param name="theme.watermark.path" select="''"/>

<!--@@==========================================================================
theme.watermark.blockquote
The path for the blockquote watermark graphic

This parameter specifies the graphic file used for blockquote watermarks.  Note
that the default graphic is translatable.  If you set this parameter, you should
ensure that your graphic uses a suitable quote character for the language your
document is written in.
-->
<xsl:param name="theme.watermark.blockquote">
  <xsl:value-of select="$theme.watermark.path"/>
  <xsl:call-template name="l10n.gettext">
    <xsl:with-param name="msgid" select="'watermark-blockquote-201C.png'"/>
  </xsl:call-template>
</xsl:param>

<!--@@==========================================================================
theme.watermark.code
The path for the code block watermark graphic

This parameter specifies the graphic file used for code block watermarks.
-->
<xsl:param name="theme.watermark.code">
  <xsl:value-of select="$theme.watermark.path"/>
  <xsl:text>watermark-code.png</xsl:text>
</xsl:param>

</xsl:stylesheet>