]> git.parisson.com Git - teleforma.git/commitdiff
JS to footer feature/performance
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Fri, 16 Jul 2021 04:17:08 +0000 (06:17 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Fri, 16 Jul 2021 04:17:08 +0000 (06:17 +0200)
teleforma/templates/teleforma/base.html

index 3d9d3903e066c4f81e307067575a02aba83125ae..e015dce5ef332ea37246260e5d9cccb70d9f7a30 100644 (file)
   {% endblock %}
 
   {% block extra_stylesheets %}{% endblock %}
-
-  {% block javascript %}
-  <script src="{% url 'js_catalog' %}" type="text/javascript"></script>
-  <script src="/static/teleforma/js/jquery-1.6.min.js" type="text/javascript"></script>
-  <script src="/static/teleforma/js/jquery-ui.js" type="text/javascript"></script>
-  <script src="/static/teleforma/js/jquery.expander.min.js" type="text/javascript"></script>
-  <script src="/static/teleforma/js/messi.min.js" type="text/javascript"></script>
-  <script src="/static/teleforma/js/rainbowvis.js" type="text/javascript"></script>
-  <script src="/static/teleforma/js/locale.js" type="text/javascript"></script>
-  <script src="/static/teleforma/js/application.js?v=2.1" type="text/javascript"></script>
-
-  {% if user.is_authenticated %}
-  <script type='text/javascript'>
-    var CURRENT_USER_NAME = "{{ user.username }}";
-  </script>
-  {% else %}
-  <script type='text/javascript'>
-    var CURRENT_USER_NAME = undefined;
-  </script>
-  {% endif %}
-
-
-  <script type="text/javascript" src="{% static 'teleforma/tarteaucitron/tarteaucitron.js' %}"></script>
-
-  <script type="text/javascript">
-    tarteaucitron.init({
-      "privacyUrl": "/pages/legal_notices",
-      /* Privacy policy url */
-
-      "hashtag": "#tarteaucitron",
-      /* Open the panel with this hashtag */
-      "cookieName": "tarteaucitron",
-      /* Cookie name */
-
-      "orientation": "bottom",
-      /* Banner position (top - bottom) */
-
-      "groupServices": false,
-      /* Group services by category */
-
-      "showAlertSmall": false,
-      /* Show the small banner on bottom right */
-      "cookieslist": false,
-      /* Show the cookie list */
-
-      "closePopup": false,
-      /* Show a close X on the banner */
-
-      "showIcon": false,
-      /* Show cookie icon to manage cookies */
-      //"iconSrc": "", /* Optionnal: URL or base64 encoded image */
-      "iconPosition": "BottomRight",
-      /* BottomRight, BottomLeft, TopRight and TopLeft */
-
-      "adblocker": false,
-      /* Show a Warning if an adblocker is detected */
-
-      "DenyAllCta": true,
-      /* Show the deny all button */
-      "AcceptAllCta": true,
-      /* Show the accept all button when highPrivacy on */
-      "highPrivacy": true,
-      /* HIGHLY RECOMMANDED Disable auto consent */
-
-      "handleBrowserDNTRequest": false,
-      /* If Do Not Track == 1, disallow all */
-
-      "removeCredit": false,
-      /* Remove credit link */
-      "moreInfoLink": true,
-      /* Show more info link */
-
-      "useExternalCss": false,
-      /* If false, the tarteaucitron.css file will be loaded */
-      "useExternalJs": false,
-      /* If false, the tarteaucitron.js file will be loaded */
-
-      //"cookieDomain": ".my-multisite-domaine.fr", /* Shared cookie for multisite */
-
-      "readmoreLink": "",
-      /* Change the default readmore link */
-
-      "mandatory": true,
-      /* Show a message about mandatory cookies */
-    });
-  </script>
-
-  {% block js-status %}
-  {% get_telecaster as telecaster %}
-  {%  if telecaster %}
-  <script src="/static/telecaster/js/application.js" type="text/javascript"></script>
-  {% endif %}
-  {% endblock js-status %}
-
-  {% endblock %}
-
-  {% block extra_javascript %}{% endblock %}
 </head>
 
 <body>
   </div>
   {% endblock layout %}
 
+
+  {% block javascript %}
+  <script src="{% url 'js_catalog' %}" type="text/javascript"></script>
+  <script src="/static/teleforma/js/jquery-1.6.min.js" type="text/javascript"></script>
+  <script src="/static/teleforma/js/jquery-ui.js" type="text/javascript"></script>
+  <script src="/static/teleforma/js/jquery.expander.min.js" type="text/javascript"></script>
+  <script src="/static/teleforma/js/messi.min.js" type="text/javascript"></script>
+  <script src="/static/teleforma/js/rainbowvis.js" type="text/javascript"></script>
+  <script src="/static/teleforma/js/locale.js" type="text/javascript"></script>
+  <script src="/static/teleforma/js/application.js?v=2.1" type="text/javascript"></script>
+
+  {% if user.is_authenticated %}
+  <script type='text/javascript'>
+    var CURRENT_USER_NAME = "{{ user.username }}";
+  </script>
+  {% else %}
+  <script type='text/javascript'>
+    var CURRENT_USER_NAME = undefined;
+  </script>
+  {% endif %}
+
+
+  <script type="text/javascript" src="{% static 'teleforma/tarteaucitron/tarteaucitron.js' %}"></script>
+
+  <script type="text/javascript">
+    tarteaucitron.init({
+      "privacyUrl": "/pages/legal_notices",
+      /* Privacy policy url */
+
+      "hashtag": "#tarteaucitron",
+      /* Open the panel with this hashtag */
+      "cookieName": "tarteaucitron",
+      /* Cookie name */
+
+      "orientation": "bottom",
+      /* Banner position (top - bottom) */
+
+      "groupServices": false,
+      /* Group services by category */
+
+      "showAlertSmall": false,
+      /* Show the small banner on bottom right */
+      "cookieslist": false,
+      /* Show the cookie list */
+
+      "closePopup": false,
+      /* Show a close X on the banner */
+
+      "showIcon": false,
+      /* Show cookie icon to manage cookies */
+      //"iconSrc": "", /* Optionnal: URL or base64 encoded image */
+      "iconPosition": "BottomRight",
+      /* BottomRight, BottomLeft, TopRight and TopLeft */
+
+      "adblocker": false,
+      /* Show a Warning if an adblocker is detected */
+
+      "DenyAllCta": true,
+      /* Show the deny all button */
+      "AcceptAllCta": true,
+      /* Show the accept all button when highPrivacy on */
+      "highPrivacy": true,
+      /* HIGHLY RECOMMANDED Disable auto consent */
+
+      "handleBrowserDNTRequest": false,
+      /* If Do Not Track == 1, disallow all */
+
+      "removeCredit": false,
+      /* Remove credit link */
+      "moreInfoLink": true,
+      /* Show more info link */
+
+      "useExternalCss": false,
+      /* If false, the tarteaucitron.css file will be loaded */
+      "useExternalJs": false,
+      /* If false, the tarteaucitron.js file will be loaded */
+
+      //"cookieDomain": ".my-multisite-domaine.fr", /* Shared cookie for multisite */
+
+      "readmoreLink": "",
+      /* Change the default readmore link */
+
+      "mandatory": true,
+      /* Show a message about mandatory cookies */
+    });
+  </script>
+
+  {% block js-status %}
+  {% get_telecaster as telecaster %}
+  {%  if telecaster %}
+  <script src="/static/telecaster/js/application.js" type="text/javascript"></script>
+  {% endif %}
+  {% endblock js-status %}
+
+  {% endblock %}
+
+  {% block extra_javascript %}{% endblock %}
+
   <script type='text/javascript'>
     window.scrollTo(0, 1);