~ubuntu-branches/ubuntu/precise/ubuntu-docs/precise-proposed

« back to all changes in this revision

Viewing changes to html/ubuntu.xsl

  • Committer: Bazaar Package Importer
  • Author(s): Matthew East
  • Date: 2011-04-29 14:49:35 UTC
  • Revision ID: james.westby@ubuntu.com-20110429144935-yjbprud1efvmcbtt
Tags: 11.10.1
* Use Gnome and gnome-doc-utils for packaging - update debian/control 
  for new build-deps accordingly
* Add Unity+Unity documentation here rather than gnome-user-docs; give it
  its own document id and install in ubuntu-help directory
* Remove browser homepage update-alternative system
* Update translations from gnome-user-docs natty package

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
                xmlns:html="http://www.w3.org/1999/xhtml"
 
3
                xmlns:exsl="http://exslt.org/common"
 
4
                xmlns:set="http://exslt.org/sets"
 
5
                xmlns="http://www.w3.org/1999/xhtml"
 
6
                exclude-result-prefixes="html set"
 
7
                extension-element-prefixes="exsl"
 
8
                version="1.0">
 
9
 
 
10
<xsl:param name="color.gray_background" select="'#f7f6f5'"/>
 
11
<xsl:param name="color.gray_border" select="'#ccc1c1'"/>
 
12
<xsl:param name="color.blue_background" select="'#f7f6f5'"/>
 
13
<xsl:param name="color.blue_border" select="'#ccc1c1'"/>
 
14
<xsl:param name="color.yellow_background" select="'#f7f6f5'"/>
 
15
<xsl:param name="color.yellow_border" select="'#ccc1c1'"/>
 
16
<xsl:param name="color.red_background" select="'#f7f6f5'"/>
 
17
<xsl:param name="color.red_border" select="'#ccc1c1'"/>
 
18
 
 
19
<xsl:param name="color.text" select="'#333333'"/>
 
20
<xsl:param name="color.text_light" select="'#aea79f'"/>
 
21
<xsl:param name="color.link" select="'#dd4814'"/>
 
22
<xsl:param name="color.link_visited" select="'#dd4814'"/>
 
23
 
 
24
<xsl:template name="html.css.custom">
 
25
  <xsl:param name="node" select="."/>
 
26
  <xsl:param name="direction">
 
27
    <xsl:call-template name="l10n.direction"/>
 
28
  </xsl:param>
 
29
  <xsl:param name="left">
 
30
    <xsl:call-template name="l10n.align.start">
 
31
      <xsl:with-param name="direction" select="$direction"/>
 
32
    </xsl:call-template>
 
33
  </xsl:param>
 
34
  <xsl:param name="right">
 
35
    <xsl:call-template name="l10n.align.end">
 
36
      <xsl:with-param name="direction" select="$direction"/>
 
37
    </xsl:call-template>
 
38
  </xsl:param>
 
39
  <xsl:text>
 
40
 
 
41
body {
 
42
 background: #d3caaa url(img/bg-page.png) repeat-x top;
 
43
 margin: 20px;
 
44
 padding: 0;
 
45
 font-size: 90%;
 
46
 font-family:"Helvetica Neue", "Lucida Grande", Helvetica, Arial, Verdana, sans-serif;
 
47
 color:#000;
 
48
 max-width: 100%;
 
49
 position: relative;
 
50
}
 
51
#round {
 
52
        background: #fff url(img/bg-content.png) repeat-y top;
 
53
        width: 876px;
 
54
        margin: auto;
 
55
        margin-bottom: 50px;
 
56
        position: relative;
 
57
}
 
58
#round .sb-inner {
 
59
        background-color: #fff;
 
60
}
 
61
#page {
 
62
        clear: both;
 
63
        margin: 0;
 
64
        padding: 10px 30px;
 
65
}
 
66
#content {
 
67
        padding: 12px;
 
68
}
 
69
img.ubuntulogo {
 
70
        margin: 20px;
 
71
}
 
72
#topcap {
 
73
        position: absolute;
 
74
        top: 0;
 
75
        left: 0;
 
76
}
 
77
#bottomcap {
 
78
        position: absolute;
 
79
        bottom: 0;
 
80
        left: 0;
 
81
}
 
82
#header {
 
83
        padding-top: 12px;
 
84
}
 
85
#header h1 {
 
86
        display: inline;
 
87
}
 
88
#header h1 span {
 
89
        display: none;
 
90
}
 
91
#logo-floater {
 
92
        width: 225px;
 
93
        float: left;
 
94
        padding: 10px;
 
95
}
 
96
#logo-floater h1 {
 
97
        border: none;
 
98
}
 
99
#sitename a {
 
100
        position: relative;
 
101
        top: 35px;
 
102
        float: right;
 
103
        font-size: 1.5em;
 
104
        padding-right: 20px;
 
105
        text-decoration: none;
 
106
        color: black;
 
107
}
 
108
#sitename span {
 
109
        padding-left: 5px;
 
110
}
 
111
#cse-search-box {
 
112
        position: absolute;
 
113
        right: 3px;
 
114
        top: 3px;
 
115
        /* float: right; */
 
116
        margin: 5px 10px;
 
117
        padding: 0;
 
118
        white-space: nowrap;
 
119
        font-size: 13px;
 
120
}
 
121
#cse-search-box form div {
 
122
    display: inline;
 
123
}
 
124
/* Links */
 
125
a, a:visited {
 
126
        color: #D90D19;
 
127
}
 
128
a:hover {
 
129
        color: #800000;
 
130
}
 
131
/* Headings */
 
132
h1, h2, h3, h4, h5, h6
 
133
{
 
134
        margin: 0;
 
135
        padding: 2px 0;
 
136
        font-weight: normal; 
 
137
        color: #5A3320;
 
138
        line-height: 1.2em;
 
139
}       
 
140
h1
 
141
{
 
142
        border-bottom: 2px solid #6d4c07; /* ubuntu dark brown */
 
143
        font-size: 1.6em;
 
144
}
 
145
h2
 
146
{
 
147
        border-bottom: 1px solid #6d4c07; /* ubuntu dark brown */
 
148
        font-size: 1.4em;
 
149
}
 
150
h3 {font-size: 1.3em;}
 
151
h4 {font-size: 1.1em;}
 
152
h4, h5, h6 {font-size: 1em;}
 
153
#footer {
 
154
        margin: 0;
 
155
        font-size: 90%;
 
156
        color: #444;
 
157
}
 
158
#ubuntulinks {
 
159
        text-align: center;
 
160
}
 
161
li {
 
162
  margin: 16px 0 0 0;
 
163
  margin-</xsl:text><xsl:value-of select="$left"/><xsl:text>: 16px;
 
164
  -webkit-margin-start: 16px; -webkit-margin-end: 0;
 
165
  -moz-margin-start: 16px; -moz-margin-end: 0;
 
166
}
 
167
dt { margin-top: 16px; }
 
168
dt:first-child { margin-top: 0; }
 
169
dt + dt { margin-top: 0; }
 
170
dd {
 
171
  margin: 8px 0 0 0;
 
172
  margin-</xsl:text><xsl:value-of select="$left"/><xsl:text>: 16px;
 
173
  -webkit-margin-start: 16px; -webkit-margin-end: 0;
 
174
  -moz-margin-start: 16px; -moz-margin-end: 0;
 
175
}
 
176
ol.compact li { margin-top: 8px; }
 
177
ul.compact li { margin-top: 8px; }
 
178
ol.compact li:first-child { margin-top: 0; }
 
179
ul.compact li:first-child { margin-top: 0; }
 
180
dl.compact dt { margin-top: 8px; }
 
181
dl.compact dt:first-child { margin-top: 0; }
 
182
dl.compact dt + dt { margin-top: 0; }
 
183
 
 
184
div.title { margin: 0 0 8px 0; }
 
185
div.desc { margin: 0 0 8px 0; }
 
186
div.contents + div.desc { margin: 8px 0 0 0; }
 
187
pre.contents { padding: 8px; }
 
188
li.links {
 
189
  margin: 8px 0 8px 0;
 
190
  padding-</xsl:text><xsl:value-of select="$left"/><xsl:text>: 16px;
 
191
}
 
192
div.sectionlinks { padding: 0 16px 0 16px; }
 
193
div.sectionlinks div.title { margin: 8px 0 8px 0; }
 
194
div.sectionlinks div.sectionlinks { margin: 8px 0 0 0; }
 
195
div.sectionlinks div.sectionlinks li {
 
196
  padding-</xsl:text><xsl:value-of select="$left"/><xsl:text>: 16px;
 
197
}
 
198
div.nextlinks {
 
199
  margin-</xsl:text><xsl:value-of select="$left"/><xsl:text>: 16px;
 
200
}
 
201
div.serieslinks { padding: 0 16px 0 16px; }
 
202
div.serieslinks div.title { margin: 8xp 0 8px 0; }
 
203
pre.numbered {
 
204
  padding: 8px;
 
205
  margin-</xsl:text><xsl:value-of select="$right"/><xsl:text>: 8px;
 
206
}
 
207
div.figure {
 
208
  margin-</xsl:text><xsl:value-of select="$left"/><xsl:text>: 16px;
 
209
  -webkit-margin-start: 16px;
 
210
  -moz-margin-start: 16px;
 
211
  padding: 4px;
 
212
}
 
213
div.figure > div.inner > div.contents {
 
214
  padding: 8px 16px 8px 16px;
 
215
}
 
216
div.list > div.title { margin-bottom: 8px; }
 
217
div.note { padding: 8px; }
 
218
div.note > div.inner > div.title {
 
219
  margin-</xsl:text><xsl:value-of select="$left"/><xsl:text>: </xsl:text>
 
220
    <xsl:value-of select="$icons.size.note + 8"/><xsl:text>px;
 
221
}
 
222
div.note > div.inner > div.contents {
 
223
  margin-</xsl:text><xsl:value-of select="$left"/><xsl:text>: </xsl:text>
 
224
    <xsl:value-of select="$icons.size.note + 8"/><xsl:text>px;
 
225
}
 
226
div.note-sidebar {
 
227
  margin-</xsl:text><xsl:value-of select="$left"/><xsl:text>: 8px;
 
228
  padding: 8px;
 
229
}
 
230
div.quote > div.inner > div.title { margin: 0 0 8px 0; }
 
231
div.quote > div.inner > div.cite { margin-top: 8px; }
 
232
ol.steps, ul.steps {
 
233
  padding: 8px 16px 8px 16px;
 
234
}
 
235
li.steps {
 
236
  margin-</xsl:text><xsl:value-of select="$left"/><xsl:text>: 16px;
 
237
  -webkit-margin-start: 16px;
 
238
  -moz-margin-start: 16px;
 
239
}
 
240
li.steps li.steps {
 
241
  margin-</xsl:text><xsl:value-of select="$left"/><xsl:text>: 32px;
 
242
  -webkit-margin-start: 32px;
 
243
  -moz-margin-start: 32px;
 
244
}
 
245
div.synopsis > div.inner > div.contents, div.synopsis > pre.contents {
 
246
  padding: 8px 16px 8px 16px;
 
247
}
 
248
span.cmd { padding: 0 4px 0 4px; }
 
249
span.key { padding: 0 4px 0 4px; }
 
250
div.media-ttml-p {
 
251
  margin: 8px 0 0 0;
 
252
  padding: 8px;
 
253
}
 
254
div.floatleft { margin-right: 16px; }
 
255
div.floatright { margin-left: 16px; }
 
256
div.floatstart {
 
257
  margin-</xsl:text><xsl:value-of select="$right"/><xsl:text>: 16px;
 
258
}
 
259
div.floatend {
 
260
  margin-</xsl:text><xsl:value-of select="$left"/><xsl:text>: 16px;
 
261
}
 
262
ul.mouseovers a { padding: 6px; }
 
263
table.toronto td {
 
264
  padding-top: 16px;
 
265
  padding-</xsl:text><xsl:value-of select="$right"/><xsl:text>: 16px;
 
266
}
 
267
td.twocolumnright {
 
268
  padding-</xsl:text><xsl:value-of select="$left"/><xsl:text>: 16px;
 
269
  -webkit-padding-start: 16px;
 
270
  -moz-padding-start: 16px;
 
271
}
 
272
div.linkdiv div.title { font-size: 12px; }
 
273
div.linkdiv {
 
274
  padding: 8px;
 
275
  -moz-border-radius: 0px;
 
276
  border: solid 1px </xsl:text>
 
277
    <xsl:value-of select="$color.background"/><xsl:text>;
 
278
}
 
279
div.example {
 
280
  padding-</xsl:text><xsl:value-of select="$left"/><xsl:text>: 16px;
 
281
}
 
282
div.comment { padding: 8px; }
 
283
div.comment div.comment { margin: 16px 16px 0 16px; }
 
284
div.comment div.cite { margin: 0 0 8px 0; }
 
285
ul.tree ul.tree {
 
286
  margin-</xsl:text><xsl:value-of select="$left"/><xsl:text>: 16px;
 
287
  -webkit-margin-start: 16px;
 
288
  -moz-margin-start: 16px;
 
289
}
 
290
div.facets { padding: 8px; } 
 
291
div.facet {
 
292
  margin-bottom: 16px;
 
293
  margin-</xsl:text><xsl:value-of select="$right"/><xsl:text>: 16px;
 
294
}
 
295
 
 
296
</xsl:text>
 
297
</xsl:template>
 
298
 
 
299
<xsl:template name="html.page">
 
300
  <xsl:param name="node" select="."/>
 
301
  <html>
 
302
    <head>
 
303
      <title>
 
304
        <xsl:apply-templates mode="html.title.mode" select="$node"/>
 
305
      </title>
 
306
      <xsl:call-template name="html.css"/>
 
307
      <xsl:call-template name="html.js"/>
 
308
      <xsl:call-template name="html.head.custom"/>
 
309
    </head>
 
310
    <body>
 
311
     <div id="round">
 
312
     <img id="topcap" alt="" src="https://help.ubuntu.com/htdocs/ubuntunew/img/cap-top.png" />
 
313
     <div id="layout" class="container clear-block">
 
314
      <xsl:apply-templates mode="html.body.attr.mode" select="$node"/>
 
315
      <script src="https://ssl.google-analytics.com/urchin.js"
 
316
      type="text/javascript"></script>
 
317
      <script type="text/javascript">
 
318
      _uacct = "UA-1018242-8";
 
319
      urchinTracker();
 
320
      </script>
 
321
      <div id="header">
 
322
      <div id="logo-floater">
 
323
       <h1><a href="https://help.ubuntu.com" title="Ubuntu Documentation"><img alt="Ubuntu" id="logo" src="https://help.ubuntu.com/htdocs/ubuntunew/img/logo.png" /></a>
 
324
       </h1>
 
325
      </div> <!-- logo-floater -->
 
326
 
 
327
      <!-- Provide a search box for clients with and without javascript -->
 
328
      <noscript>
 
329
       <form action="http://www.google.com/cse" id="cse-search-box">
 
330
        <div>
 
331
         <input type="hidden" name="cx" value="004599128559784038176:vj_p0xo-nng" />
 
332
         <input type="hidden" name="ie" value="UTF-8" />
 
333
         <input type="text" name="q" size="27" />
 
334
         <input type="submit" name="sa" value="Search" />
 
335
        </div>
 
336
       </form>
 
337
      </noscript>
 
338
 
 
339
      <!-- Search box -->
 
340
      <script>
 
341
       document.write('<form action="https://help.ubuntu.com/search.html" id="cse-search-box">');
 
342
       document.write('  <div>');
 
343
       document.write('    <input type="hidden" name="cof" value="FORID:9" />');
 
344
       document.write('    <input type="hidden" name="cx" value="004599128559784038176:vj_p0xo-nng" />');
 
345
       document.write('    <input type="hidden" name="ie" value="UTF-8" />');
 
346
       document.write('    <input type="text" name="q" size="27" />');
 
347
       document.write('    <input type="submit" name="sa" value="Search" />');
 
348
       document.write('  </div>');
 
349
       document.write('</form>');
 
350
      </script>
 
351
      <div id="sitename"><a href="https://help.ubuntu.com/"><img alt="Official Documentation" src="https://help.ubuntu.com/htdocs/ubuntunew/img/help-about.png" /><span>Official Documentation</span></a>
 
352
      </div> <!-- sitename -->
 
353
      </div> <!-- header -->
 
354
      <div id="page">
 
355
        <xsl:apply-templates mode="html.header.mode" select="$node"/>
 
356
      <div id="content">
 
357
        <xsl:apply-templates mode="html.body.mode" select="$node"/>
 
358
      </div> <!-- content -->
 
359
      <hr />
 
360
      <div id="footer">
 
361
       <div id="ubuntulinks">
 
362
        <p>The material in this document is available under a free license, see <a href="/legal.html">Legal</a> for details<br />
 
363
        For information on contributing see the <a href="https://wiki.ubuntu.com/DocumentationTeam">Ubuntu Documentation Team wiki page</a>. To report a problem, visit the <a href="https://bugs.launchpad.net/ubuntu/+source/ubuntu-docs">bug page for Ubuntu Documentation</a></p>
 
364
       </div> <!-- ubuntulinks -->
 
365
      <br />
 
366
      </div> <!-- footer -->
 
367
      <div id="bottomcap">
 
368
        <img src="https://help.ubuntu.com/htdocs/ubuntunew/img/cap-bottom.png" alt=""/>
 
369
      </div> <!-- bottomcap -->
 
370
      </div> <!-- page -->
 
371
      </div> <!-- layout -->
 
372
      </div> <!-- round -->
 
373
    </body>
 
374
  </html>
 
375
</xsl:template>
 
376
 
 
377
<xsl:template name="mal2html.page.linktrails.trail">
 
378
  <xsl:param name="node" select="."/>
 
379
  <div class="trail">
 
380
    <a href="https://help.ubuntu.com" class="trail">Ubuntu Documentation</a>
 
381
  <xsl:variable name="direction">
 
382
    <xsl:call-template name="l10n.direction"/>
 
383
  </xsl:variable>
 
384
  <xsl:choose>
 
385
    <xsl:when test="$direction = 'rtl'">
 
386
      <xsl:choose>
 
387
        <xsl:when test="$node/@child = 'section'">
 
388
          <xsl:text>&#x00A0;‹ </xsl:text>
 
389
        </xsl:when>
 
390
        <xsl:otherwise>
 
391
          <xsl:text>&#x00A0;« </xsl:text>
 
392
        </xsl:otherwise>
 
393
      </xsl:choose>
 
394
    </xsl:when>
 
395
    <xsl:otherwise>
 
396
      <xsl:choose>
 
397
        <xsl:when test="$node/@child = 'section'">
 
398
          <xsl:text>&#x00A0;› </xsl:text>
 
399
        </xsl:when>
 
400
        <xsl:otherwise>
 
401
          <xsl:text>&#x00A0;» </xsl:text>
 
402
        </xsl:otherwise>
 
403
      </xsl:choose>
 
404
    </xsl:otherwise>
 
405
  </xsl:choose>
 
406
    <a href="https://help.ubuntu.com/11.04" class="trail">Ubuntu 11.04</a>
 
407
  <xsl:choose>
 
408
    <xsl:when test="$direction = 'rtl'">
 
409
      <xsl:choose>
 
410
        <xsl:when test="$node/@child = 'section'">
 
411
          <xsl:text>&#x00A0;‹ </xsl:text>
 
412
        </xsl:when>
 
413
        <xsl:otherwise>
 
414
          <xsl:text>&#x00A0;« </xsl:text>
 
415
        </xsl:otherwise>
 
416
      </xsl:choose>
 
417
    </xsl:when>
 
418
    <xsl:otherwise>
 
419
      <xsl:choose>
 
420
        <xsl:when test="$node/@child = 'section'">
 
421
          <xsl:text>&#x00A0;› </xsl:text>
 
422
        </xsl:when>
 
423
        <xsl:otherwise>
 
424
          <xsl:text>&#x00A0;» </xsl:text>
 
425
        </xsl:otherwise>
 
426
      </xsl:choose>
 
427
    </xsl:otherwise>
 
428
  </xsl:choose>
 
429
 
 
430
    <xsl:call-template name="mal2html.page.linktrails.link">
 
431
      <xsl:with-param name="node" select="$node"/>
 
432
    </xsl:call-template>
 
433
  </div>
 
434
</xsl:template>
 
435
 
 
436
</xsl:stylesheet>