Mercurial > hg > nginx-site
annotate xslt/body.xslt @ 2670:e53592a1d979
Improved descriptions of s.done, s.allow, s.decline, s.deny.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Fri, 05 Mar 2021 18:22:39 +0000 |
parents | 8dbca6383ec3 |
children | 3a5fcc2248b1 |
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> | |
2659 | 23 Get sample configurations for the most popular NGINX deployments |
24 in the | |
25 <a href="https://www.nginx.com/resources/library/complete-nginx-cookbook/?utm_medium=nginxorg&utm_source=homepagehero&utm_campaign=ww-nx_mad&utm_content=eb">new NGINX Cookbook, updated for 2021.</a> | |
1313 | 26 </div> |
27 | |
28 <div id="main"> | |
29 <div id="menu"> | |
30 <h1> | |
1085 | 31 <xsl:if test="@lang = 'he'"> <xsl:attribute name="align"> <xsl:text>left</xsl:text> </xsl:attribute> </xsl:if> |
1313 | 32 <a href="/"> |
33 <img src="/nginx.png" alt="nginx"/> | |
1085 | 34 </a> |
1313 | 35 </h1> |
36 <div> | |
37 <xsl:apply-templates select="document(concat($XML, '/menu.xml')) | |
38 /menus/menu[@lang = $lang]/item"/> | |
39 </div> | |
40 </div> | |
694 | 41 |
1313 | 42 <div id="content"> |
43 <h2> | |
44 <xsl:value-of select="@name"/> <xsl:if test="$YEAR"> <xsl:text>: </xsl:text> <xsl:value-of select="$YEAR"/> </xsl:if> | |
45 </h2> | |
170 | 46 |
1085 | 47 <xsl:if test="$ORIGIN and document(concat($XML, '/', $ORIGIN))/*/@rev and |
48 (not(@rev) or | |
49 @rev != document(concat($XML, '/', $ORIGIN))/*/@rev)"> | |
50 <span> | |
170 | 51 |
1085 | 52 <xsl:if test="@lang = 'he'"> <xsl:attribute name="class"> <xsl:text>ltr</xsl:text> </xsl:attribute> </xsl:if> |
170 | 53 |
1085 | 54 <blockquote class="note"> |
601 | 55 |
1085 | 56 <xsl:choose><xsl:when test="document(concat($XML, '/i18n.xml')) |
57 /i18n/text[@lang = $lang]/item[@id='outdated']"> | |
58 <xsl:apply-templates select="document(concat($XML, '/i18n.xml')) | |
59 /i18n/text[@lang = $lang]/item[@id='outdated']"/> | |
60 </xsl:when><xsl:otherwise> | |
61 <xsl:apply-templates select="document(concat($XML, '/i18n.xml')) | |
62 /i18n/text[@lang = 'en']/item[@id='outdated']"/> | |
63 </xsl:otherwise></xsl:choose> | |
601 | 64 |
1085 | 65 </blockquote> |
66 </span> | |
67 </xsl:if> | |
601 | 68 |
1085 | 69 <xsl:if test="@toc = 'yes' and section[@id and @name]"> |
70 <table width="100%"><tr><td align="{$INDEX_ALIGN}"> | |
71 <xsl:for-each select="section[@id and @name]"> | |
72 <a href="#{@id}"> <xsl:value-of select="@name"/> </a><br/> | |
73 <xsl:for-each select="section[@id and @name]"> | |
74 <xsl:text>     </xsl:text> | |
75 <a href="#{@id}"> <xsl:value-of select="@name"/> </a><br/> | |
76 </xsl:for-each> | |
77 <xsl:if test="@id = 'directives'"> | |
78 <xsl:for-each select="directive[@name]"> | |
79 <xsl:text>     </xsl:text> | |
80 <a href="#{@name}"> <xsl:value-of select="@name"/> </a><br/> | |
81 </xsl:for-each> | |
82 </xsl:if> | |
2028
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2020
diff
changeset
|
83 <xsl:if test="@id = 'endpoints'"> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2020
diff
changeset
|
84 <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
|
85 <xsl:text>     </xsl:text> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2020
diff
changeset
|
86 <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
|
87 </xsl:for-each> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2020
diff
changeset
|
88 </xsl:if> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2020
diff
changeset
|
89 |
1085 | 90 </xsl:for-each> |
91 </td></tr></table> | |
92 </xsl:if> | |
170 | 93 |
1085 | 94 <xsl:apply-templates/> |
170 | 95 |
1085 | 96 <xsl:if test="@author or @editor or @translator"> |
97 <table width="100%"><tr><td align="right"> | |
170 | 98 |
1085 | 99 <xsl:if test="@author"> |
100 <xsl:value-of select="document(concat($XML, '/i18n.xml')) | |
101 /i18n/text[@lang = $lang]/item[@id='author']"/> | |
102 <xsl:text> </xsl:text> <xsl:value-of select="@author"/> <br/> | |
103 </xsl:if> | |
170 | 104 |
1085 | 105 <xsl:if test="@editor"> |
106 <xsl:value-of select="document(concat($XML, '/i18n.xml')) | |
107 /i18n/text[@lang = $lang]/item[@id='editor']"/> | |
108 <xsl:text> </xsl:text> <xsl:value-of select="@editor"/> <br/> | |
109 </xsl:if> | |
170 | 110 |
1085 | 111 <xsl:if test="@translator"> |
112 <xsl:value-of select="document(concat($XML, '/i18n.xml')) | |
113 /i18n/text[@lang = $lang]/item[@id='translator']"/> | |
114 <xsl:text> </xsl:text> <xsl:value-of select="@translator"/> <br/> | |
115 </xsl:if> | |
170 | 116 |
1085 | 117 </td></tr></table> |
118 </xsl:if> | |
1313 | 119 </div> |
120 </div> | |
1085 | 121 </body> |
170 | 122 |
1085 | 123 </xsl:template> |
170 | 124 |
722 | 125 </xsl:stylesheet> |