Mercurial > hg > nginx-site
annotate xslt/body.xslt @ 2816:ae1d713a06e2
nginx-1.21.5
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 28 Dec 2021 18:38:35 +0300 |
parents | ca9b4ffc67ee |
children | 75716f1863bb |
rev | line source |
---|---|
170 | 1 <?xml version="1.0" encoding="utf-8"?> |
1085 | 2 <!-- |
3 Copyright (C) Igor Sysoev | |
4 Copyright (C) Nginx, Inc. | |
5 --> | |
6 | |
170 | 7 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> |
8 | |
1085 | 9 <xsl:template name="body"><xsl:param name="lang"/> |
170 | 10 |
1085 | 11 <xsl:variable name="MENU_ALIGN"> |
12 <xsl:choose><xsl:when test="$lang = 'he'"> <xsl:text>left</xsl:text> </xsl:when><xsl:otherwise> <xsl:text>right</xsl:text> </xsl:otherwise></xsl:choose> | |
13 </xsl:variable> | |
694 | 14 |
1085 | 15 <xsl:variable name="INDEX_ALIGN"> |
16 <xsl:choose><xsl:when test="$lang = 'he'"> <xsl:text>right</xsl:text> </xsl:when><xsl:otherwise> <xsl:text>left</xsl:text> </xsl:otherwise></xsl:choose> | |
17 </xsl:variable> | |
694 | 18 |
1085 | 19 <body> |
1313 | 20 |
21 <div id="banner"> | |
22 <xsl:if test="@lang = 'he'"> <xsl:attribute name="class"> <xsl:text>ltr</xsl:text> </xsl:attribute> </xsl:if> | |
2812 | 23 Got a few minutes to help shape the future of |
24 <a href="https://www.nginx.org/">www.nginx.org</a>?<br/> | |
25 Answer <a href="https://forms.office.com/r/6nVQvzwVTZ">these | |
26 five questions</a>! | |
1313 | 27 </div> |
28 | |
29 <div id="main"> | |
30 <div id="menu"> | |
31 <h1> | |
1085 | 32 <xsl:if test="@lang = 'he'"> <xsl:attribute name="align"> <xsl:text>left</xsl:text> </xsl:attribute> </xsl:if> |
1313 | 33 <a href="/"> |
34 <img src="/nginx.png" alt="nginx"/> | |
1085 | 35 </a> |
1313 | 36 </h1> |
37 <div> | |
38 <xsl:apply-templates select="document(concat($XML, '/menu.xml')) | |
39 /menus/menu[@lang = $lang]/item"/> | |
40 </div> | |
41 </div> | |
694 | 42 |
1313 | 43 <div id="content"> |
44 <h2> | |
45 <xsl:value-of select="@name"/> <xsl:if test="$YEAR"> <xsl:text>: </xsl:text> <xsl:value-of select="$YEAR"/> </xsl:if> | |
46 </h2> | |
170 | 47 |
1085 | 48 <xsl:if test="$ORIGIN and document(concat($XML, '/', $ORIGIN))/*/@rev and |
49 (not(@rev) or | |
50 @rev != document(concat($XML, '/', $ORIGIN))/*/@rev)"> | |
51 <span> | |
170 | 52 |
1085 | 53 <xsl:if test="@lang = 'he'"> <xsl:attribute name="class"> <xsl:text>ltr</xsl:text> </xsl:attribute> </xsl:if> |
170 | 54 |
1085 | 55 <blockquote class="note"> |
601 | 56 |
1085 | 57 <xsl:choose><xsl:when test="document(concat($XML, '/i18n.xml')) |
58 /i18n/text[@lang = $lang]/item[@id='outdated']"> | |
59 <xsl:apply-templates select="document(concat($XML, '/i18n.xml')) | |
60 /i18n/text[@lang = $lang]/item[@id='outdated']"/> | |
61 </xsl:when><xsl:otherwise> | |
62 <xsl:apply-templates select="document(concat($XML, '/i18n.xml')) | |
63 /i18n/text[@lang = 'en']/item[@id='outdated']"/> | |
64 </xsl:otherwise></xsl:choose> | |
601 | 65 |
1085 | 66 </blockquote> |
67 </span> | |
68 </xsl:if> | |
601 | 69 |
1085 | 70 <xsl:if test="@toc = 'yes' and section[@id and @name]"> |
71 <table width="100%"><tr><td align="{$INDEX_ALIGN}"> | |
72 <xsl:for-each select="section[@id and @name]"> | |
73 <a href="#{@id}"> <xsl:value-of select="@name"/> </a><br/> | |
74 <xsl:for-each select="section[@id and @name]"> | |
75 <xsl:text>     </xsl:text> | |
76 <a href="#{@id}"> <xsl:value-of select="@name"/> </a><br/> | |
77 </xsl:for-each> | |
78 <xsl:if test="@id = 'directives'"> | |
79 <xsl:for-each select="directive[@name]"> | |
80 <xsl:text>     </xsl:text> | |
81 <a href="#{@name}"> <xsl:value-of select="@name"/> </a><br/> | |
82 </xsl:for-each> | |
83 </xsl:if> | |
2028
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2020
diff
changeset
|
84 <xsl:if test="@id = 'endpoints'"> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2020
diff
changeset
|
85 <xsl:for-each select="para/list/tag-name[@name]"> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2020
diff
changeset
|
86 <xsl:text>     </xsl:text> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2020
diff
changeset
|
87 <a href="#{@id}"> <xsl:value-of select="@name"/> </a><br/> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2020
diff
changeset
|
88 </xsl:for-each> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2020
diff
changeset
|
89 </xsl:if> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2020
diff
changeset
|
90 |
1085 | 91 </xsl:for-each> |
92 </td></tr></table> | |
93 </xsl:if> | |
170 | 94 |
1085 | 95 <xsl:apply-templates/> |
170 | 96 |
1085 | 97 <xsl:if test="@author or @editor or @translator"> |
98 <table width="100%"><tr><td align="right"> | |
170 | 99 |
1085 | 100 <xsl:if test="@author"> |
101 <xsl:value-of select="document(concat($XML, '/i18n.xml')) | |
102 /i18n/text[@lang = $lang]/item[@id='author']"/> | |
103 <xsl:text> </xsl:text> <xsl:value-of select="@author"/> <br/> | |
104 </xsl:if> | |
170 | 105 |
1085 | 106 <xsl:if test="@editor"> |
107 <xsl:value-of select="document(concat($XML, '/i18n.xml')) | |
108 /i18n/text[@lang = $lang]/item[@id='editor']"/> | |
109 <xsl:text> </xsl:text> <xsl:value-of select="@editor"/> <br/> | |
110 </xsl:if> | |
170 | 111 |
1085 | 112 <xsl:if test="@translator"> |
113 <xsl:value-of select="document(concat($XML, '/i18n.xml')) | |
114 /i18n/text[@lang = $lang]/item[@id='translator']"/> | |
115 <xsl:text> </xsl:text> <xsl:value-of select="@translator"/> <br/> | |
116 </xsl:if> | |
170 | 117 |
1085 | 118 </td></tr></table> |
119 </xsl:if> | |
1313 | 120 </div> |
121 </div> | |
1085 | 122 </body> |
170 | 123 |
1085 | 124 </xsl:template> |
170 | 125 |
722 | 126 </xsl:stylesheet> |