Mercurial > hg > nginx-site
annotate xsls/banner.xsls @ 3017:f55e18559df9
Updated OpenSSL and zlib versions.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 03 Oct 2023 09:57:16 +0100 |
parents | fdf1464e1977 |
children |
rev | line source |
---|---|
2846
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
1 <!-- |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
2 Copyright (C) Nginx, Inc. |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
3 --> |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
4 |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
5 X:stylesheet { |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
6 |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
7 X:var BANNER = "'/banner/banner.html'"; |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
8 |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
9 X:template banner_link () { |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
10 X:if "substring-after($DIRNAME, '/')" { |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
11 !{ concat($ROOT, $BANNER) } |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
12 } else { |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
13 !{ substring-after($BANNER, '/') } |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
14 } |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
15 } |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
16 |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
17 X:template banner () { |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
18 |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
19 <script> |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
20 window.addEventListener("load", function(e) \{ |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
21 fetch("!banner_link ()") |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
22 .then((response) => response.text()) |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
23 .then((resp) => \{ |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
24 document.getElementById("banner").innerHTML = resp; |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
25 \}) |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
26 .catch((error) => \{ |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
27 console.warn(error); |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
28 \}); |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
29 \}); |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
30 </script> |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
31 |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
32 } |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
33 |
fdf1464e1977
Moved banner to the external file to make partial rollout possible.
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
34 } |