Mercurial > hg > nginx-site
view xsls/banner.xsls @ 2871:ca4adc1068f0
Linux packages: removed Ubuntu 21.10 'impish' due to EOL.
author | Konstantin Pavlov <thresh@nginx.com> |
---|---|
date | Tue, 19 Jul 2022 19:28:08 +0400 |
parents | fdf1464e1977 |
children |
line wrap: on
line source
<!-- Copyright (C) Nginx, Inc. --> X:stylesheet { X:var BANNER = "'/banner/banner.html'"; X:template banner_link () { X:if "substring-after($DIRNAME, '/')" { !{ concat($ROOT, $BANNER) } } else { !{ substring-after($BANNER, '/') } } } X:template banner () { <script> window.addEventListener("load", function(e) \{ fetch("!banner_link ()") .then((response) => response.text()) .then((resp) => \{ document.getElementById("banner").innerHTML = resp; \}) .catch((error) => \{ console.warn(error); \}); \}); </script> } }