annotate xsls/news.xsls @ 2846:fdf1464e1977

Moved banner to the external file to make partial rollout possible. An idea is to have several banners and show them with different probability specified by split directive in the nginx.conf
author Sergey Budnevitch <sb@waeme.net>
date Tue, 10 May 2022 18:07:27 +0400
parents cd0d1f0130db
children c704a743f269
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
580
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 543
diff changeset
1 <!--
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 543
diff changeset
2 Copyright (C) Igor Sysoev
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 543
diff changeset
3 Copyright (C) Nginx, Inc.
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 543
diff changeset
4 -->
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 543
diff changeset
5
0
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
6 X:stylesheet {
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
7
111
f31230984540 Fixed DOCTYPE generation to include the public system identifier.
Ruslan Ermilov <ru@nginx.com>
parents: 107
diff changeset
8 X:output method="html" version="4.0" indent="no" encoding="utf-8";
0
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
9
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
10 X:strip-space elements = "*";
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
11
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
12 <!--
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
13 -- a current directory of a XSLT script is where the script is stored,
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
14 -- but not where XSLT processor has been started to run the script
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 X:param XML = "'../xml'";
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
17 X:param YEAR;
706
cd0d1f0130db Fixed language switcher.
Ruslan Ermilov <ru@nginx.com>
parents: 580
diff changeset
18 X:param ORIGIN;
cd0d1f0130db Fixed language switcher.
Ruslan Ermilov <ru@nginx.com>
parents: 580
diff changeset
19 X:param TRANS;
0
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
20
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
21 X:var SITE = "'http://nginx.org'";
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
22 X:var LINK = "/news/@link";
706
cd0d1f0130db Fixed language switcher.
Ruslan Ermilov <ru@nginx.com>
parents: 580
diff changeset
23 X:var LANG = "/news/@lang";
0
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
24
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
25 X:include href = "dirname.xslt";
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
26 X:include href = "link.xslt";
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
27 X:include href = "style.xslt";
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
28 X:include href = "body.xslt";
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
29 X:include href = "menu.xslt";
2846
fdf1464e1977 Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents: 706
diff changeset
30 X:include href = "banner.xslt";
543
9085f0c59dc6 Google Analytics tracking script added to all pages
Sergey Budnevitch <sb@waeme.net>
parents: 134
diff changeset
31 X:include href = "ga.xslt";
0
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
32 X:include href = "content.xslt";
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
33
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 X:template = "/news" {
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
36 <html><head>
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
37
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
38 <link rel="alternate" type="application/rss+xml"
123
7db449e89e92 Unified the use of the "name" attribute instead of "title".
Ruslan Ermilov <ru@nginx.com>
parents: 111
diff changeset
39 title="{@name}" href="{$SITE}/index.rss" />
0
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
40
123
7db449e89e92 Unified the use of the "name" attribute instead of "title".
Ruslan Ermilov <ru@nginx.com>
parents: 111
diff changeset
41 <title> !{@name} X:if "$YEAR" { X:text{: } !{$YEAR} } </title>
0
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
42
125
c7d2ce96298b Made sure to always pass "@lang" to the parameterized "style" template.
Ruslan Ermilov <ru@nginx.com>
parents: 123
diff changeset
43 !style (lang="@lang")
0
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
44
2846
fdf1464e1977 Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents: 706
diff changeset
45 !banner ()
fdf1464e1977 Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents: 706
diff changeset
46
543
9085f0c59dc6 Google Analytics tracking script added to all pages
Sergey Budnevitch <sb@waeme.net>
parents: 134
diff changeset
47 !ga ()
9085f0c59dc6 Google Analytics tracking script added to all pages
Sergey Budnevitch <sb@waeme.net>
parents: 134
diff changeset
48
0
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
49 </head>
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
50
123
7db449e89e92 Unified the use of the "name" attribute instead of "title".
Ruslan Ermilov <ru@nginx.com>
parents: 111
diff changeset
51 !body (lang="@lang")
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 </html>
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:template = "event" {
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
58
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
59 X:var year = { !{substring(../event[position()=1]/@date, 1, 4)} }
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
60 X:var y = { !{substring(@date, 1, 4)} }
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
61
129
523a80fc32b4 Fixed a fallout from switching to standard HTML.
Ruslan Ermilov <ru@nginx.com>
parents: 125
diff changeset
62 X:if "position() = 1" {
523a80fc32b4 Fixed a fallout from switching to standard HTML.
Ruslan Ermilov <ru@nginx.com>
parents: 125
diff changeset
63 X:text disable-output-escaping="yes" {
523a80fc32b4 Fixed a fallout from switching to standard HTML.
Ruslan Ermilov <ru@nginx.com>
parents: 125
diff changeset
64 &lt;table class="news"&gt;
523a80fc32b4 Fixed a fallout from switching to standard HTML.
Ruslan Ermilov <ru@nginx.com>
parents: 125
diff changeset
65 }
523a80fc32b4 Fixed a fallout from switching to standard HTML.
Ruslan Ermilov <ru@nginx.com>
parents: 125
diff changeset
66 }
0
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
67
129
523a80fc32b4 Fixed a fallout from switching to standard HTML.
Ruslan Ermilov <ru@nginx.com>
parents: 125
diff changeset
68 X:if "(not($YEAR) and ($year = $y or position() &lt; 11)) or $YEAR=$y" {
0
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
69 <tr>
134
0991bf45cbb8 Added "white-space: nowrap" to prevent date wrapping.
Maxim Dounin <mdounin@mdounin.ru>
parents: 133
diff changeset
70 <td class="date">
0991bf45cbb8 Added "white-space: nowrap" to prevent date wrapping.
Maxim Dounin <mdounin@mdounin.ru>
parents: 133
diff changeset
71 <a name="{@date}" /> !{@date}
0
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
72 </td>
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
73 <td> !! "para"; </td>
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
74 </tr>
129
523a80fc32b4 Fixed a fallout from switching to standard HTML.
Ruslan Ermilov <ru@nginx.com>
parents: 125
diff changeset
75 }
0
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
76
129
523a80fc32b4 Fixed a fallout from switching to standard HTML.
Ruslan Ermilov <ru@nginx.com>
parents: 125
diff changeset
77 X:if "position() = last()" {
523a80fc32b4 Fixed a fallout from switching to standard HTML.
Ruslan Ermilov <ru@nginx.com>
parents: 125
diff changeset
78 X:text disable-output-escaping="yes" {
523a80fc32b4 Fixed a fallout from switching to standard HTML.
Ruslan Ermilov <ru@nginx.com>
parents: 125
diff changeset
79 &lt;/table&gt;
523a80fc32b4 Fixed a fallout from switching to standard HTML.
Ruslan Ermilov <ru@nginx.com>
parents: 125
diff changeset
80 }
0
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
81 }
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
82 }
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 }