changeset 19ce5852ad10 in www.tryton.org:default
details: https://hg.tryton.org/www.tryton.org?cmd=changeset&node=19ce5852ad10
description:
        Load synchronously CSS when already visited
diffstat:

 templates/layout.html |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r ebb05d8d8947 -r 19ce5852ad10 templates/layout.html
--- a/templates/layout.html     Sat May 14 10:18:58 2022 +0200
+++ b/templates/layout.html     Sat May 14 12:05:22 2022 +0200
@@ -41,10 +41,14 @@
         <style type="text/css">
             {{ css|safe }}
         </style>
-        {% endif %}
         <link rel="preload" href="{{ url_for('static', 
filename='css/main.css') }}" as="style" 
onload="this.onload=null;this.rel='stylesheet'">
         <noscript>
             <link rel="stylesheet" href="{{ url_for('static', 
filename='css/main.css') }}"/>
+        </noscript>
+        {% else %}
+        <link rel="stylesheet" href="{{ url_for('static', 
filename='css/main.css') }}"/>
+        {% endif %}
+        <noscript>
             <link rel="stylesheet" href="{{ url_for('static', 
filename='css/noscript.css') }}"/>
         </noscript>
         {% endblock style %}

Reply via email to