Mercurial > hg > nginx-site
annotate xsls/body.xsls @ 110:40eec261c2a6
Added proper support for anonymous sections, notably for the summary.
Changed DTD to always require section IDs.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Thu, 20 Oct 2011 09:19:41 +0000 |
parents | 36f1994d7fa1 |
children | 49443032011c |
rev | line source |
---|---|
0
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1 X:stylesheet { |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
3 X:template body (lang) { |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
4 |
91
36f1994d7fa1
Made index alignment more natural.
Ruslan Ermilov <ru@nginx.com>
parents:
81
diff
changeset
|
5 X:variable MENU_ALIGN = { |
0
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
6 X:if "$lang = 'he'" { X:text {left} } else { X:text {right} } |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
7 } |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
8 |
91
36f1994d7fa1
Made index alignment more natural.
Ruslan Ermilov <ru@nginx.com>
parents:
81
diff
changeset
|
9 X:variable INDEX_ALIGN = { |
36f1994d7fa1
Made index alignment more natural.
Ruslan Ermilov <ru@nginx.com>
parents:
81
diff
changeset
|
10 X:if "$lang = 'he'" { X:text {right} } else { X:text {left} } |
36f1994d7fa1
Made index alignment more natural.
Ruslan Ermilov <ru@nginx.com>
parents:
81
diff
changeset
|
11 } |
36f1994d7fa1
Made index alignment more natural.
Ruslan Ermilov <ru@nginx.com>
parents:
81
diff
changeset
|
12 |
0
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
13 <body> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
14 <table width="100%"> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
15 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
16 <tr> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
17 <td width="70%"><center><h3> |
32
2bcfb5f75e06
Supporting new format of <module> and <section>:
Igor Sysoev <igor@sysoev.ru>
parents:
0
diff
changeset
|
18 !{@name | @title} X:if "$YEAR" { X:text{: } !{$YEAR} } |
0
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
19 </h3></center></td> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
20 |
91
36f1994d7fa1
Made index alignment more natural.
Ruslan Ermilov <ru@nginx.com>
parents:
81
diff
changeset
|
21 <td rowspan="2" align="{$MENU_ALIGN}" valign="top"> |
41
425f0b4acecc
Eliminating border around logo.
Igor Sysoev <igor@sysoev.ru>
parents:
39
diff
changeset
|
22 <a href="http://nginx.org"> |
425f0b4acecc
Eliminating border around logo.
Igor Sysoev <igor@sysoev.ru>
parents:
39
diff
changeset
|
23 <img src="/nginx.gif" alt="nginx" border="0"/> |
425f0b4acecc
Eliminating border around logo.
Igor Sysoev <igor@sysoev.ru>
parents:
39
diff
changeset
|
24 </a><br/> |
0
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
25 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
26 <br/> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
27 <br/> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
28 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
29 !! "document(concat($XML, '/menu.xml')) |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
30 /menus/menu[@lang = $lang]/item"; |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
31 </td> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
32 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
33 </tr> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
34 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
35 <tr><td valign="top"> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
36 |
91
36f1994d7fa1
Made index alignment more natural.
Ruslan Ermilov <ru@nginx.com>
parents:
81
diff
changeset
|
37 <table width="100%"><tr><td align="{$INDEX_ALIGN}"> |
32
2bcfb5f75e06
Supporting new format of <module> and <section>:
Igor Sysoev <igor@sysoev.ru>
parents:
0
diff
changeset
|
38 X:if "section[@id]" { |
110
40eec261c2a6
Added proper support for anonymous sections, notably for the summary.
Ruslan Ermilov <ru@nginx.com>
parents:
91
diff
changeset
|
39 X:for-each "section[@id and @name]" { |
32
2bcfb5f75e06
Supporting new format of <module> and <section>:
Igor Sysoev <igor@sysoev.ru>
parents:
0
diff
changeset
|
40 <a href="#{@id}"> !{@name} </a><br/> |
81
5a2dcd623666
In the modules documents, the list of directives is now additionally
Ruslan Ermilov <ru@nginx.com>
parents:
41
diff
changeset
|
41 X:if "@id = 'directives'" { |
5a2dcd623666
In the modules documents, the list of directives is now additionally
Ruslan Ermilov <ru@nginx.com>
parents:
41
diff
changeset
|
42 X:for-each "directive[@name]" { |
91
36f1994d7fa1
Made index alignment more natural.
Ruslan Ermilov <ru@nginx.com>
parents:
81
diff
changeset
|
43 X:text{     } |
36f1994d7fa1
Made index alignment more natural.
Ruslan Ermilov <ru@nginx.com>
parents:
81
diff
changeset
|
44 <a href="#{@name}"> !{@name} </a><br/> |
81
5a2dcd623666
In the modules documents, the list of directives is now additionally
Ruslan Ermilov <ru@nginx.com>
parents:
41
diff
changeset
|
45 } |
5a2dcd623666
In the modules documents, the list of directives is now additionally
Ruslan Ermilov <ru@nginx.com>
parents:
41
diff
changeset
|
46 } |
32
2bcfb5f75e06
Supporting new format of <module> and <section>:
Igor Sysoev <igor@sysoev.ru>
parents:
0
diff
changeset
|
47 } |
2bcfb5f75e06
Supporting new format of <module> and <section>:
Igor Sysoev <igor@sysoev.ru>
parents:
0
diff
changeset
|
48 } else { |
2bcfb5f75e06
Supporting new format of <module> and <section>:
Igor Sysoev <igor@sysoev.ru>
parents:
0
diff
changeset
|
49 X:for-each "section[@name]" { |
2bcfb5f75e06
Supporting new format of <module> and <section>:
Igor Sysoev <igor@sysoev.ru>
parents:
0
diff
changeset
|
50 <a href="#{@name}"> !{@title} </a><br/> |
2bcfb5f75e06
Supporting new format of <module> and <section>:
Igor Sysoev <igor@sysoev.ru>
parents:
0
diff
changeset
|
51 } |
0
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
52 } |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
53 </td></tr></table> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
54 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
55 !!; |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
56 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
57 X:if "@author" { |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
58 <table width="100%"><tr><td align="right"> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
59 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
60 !{document(concat($XML, '/i18n.xml')) |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
61 /i18n/text[@lang = $lang]/item[@id='author']} |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
62 X:text { } !{@author} <br/> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
63 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
64 X:if "@editor" { |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
65 !{document(concat($XML, '/i18n.xml')) |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
66 /i18n/text[@lang = $lang]/item[@id='editor']} |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
67 X:text { } !{@editor} <br/> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
68 } |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
69 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
70 X:if "@translator" { |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
71 !{document(concat($XML, '/i18n.xml')) |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
72 /i18n/text[@lang = $lang]/item[@id='translator']} |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
73 X:text { } !{@translator} <br/> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
74 } |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
75 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
76 </td></tr></table> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
77 } |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
78 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
79 </td></tr> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
80 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
81 </table> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
82 </body> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
83 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
84 } |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
85 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
86 } |