view xsls/banner.xsls @ 3003:4e25281328fa

Updated with Netcraft August 2023 Web Server Survey stats.
author Yaroslav Zhuravlev <yar@nginx.com>
date Tue, 29 Aug 2023 09:11:57 +0100
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>

}

}