templates/layout/partials/debug-mode.html.twig line 1

Open in your IDE?
  1. {% if elements_debug_mode() and app.request.get('liveCss') is empty %}
  2.     {% set message = elements_debug_message('/entrypoints.json') %}
  3.     {% if message is not empty %}
  4.         <script type="text/javascript">
  5.             (function () {
  6.                 var debugError = window.setInterval(function () {
  7.                     if (document.body) {
  8.                         clearInterval(debugError);
  9.                         var div = '<div id="warning-static-release">{{ message | raw }}</div>';
  10.                         document.body.insertAdjacentHTML('beforeend', div);
  11.                     }
  12.                 }, 100);
  13.             })();
  14.         </script>
  15.         <style type="text/css">
  16.             #warning-static-release{
  17.                 position: fixed;
  18.                 bottom: calc(10rem/16);
  19.                 right: calc(10rem/16);
  20.                 padding: calc(5rem/16) calc(20rem/16);
  21.                 background: #cd231c;
  22.                 color: #ffffff;
  23.                 z-index: 1000;
  24.                 border-radius: calc(4rem/16);
  25.                 opacity: .5;
  26.                 pointer-events: none;
  27.             }
  28.             #warning-static-release:hover{
  29.                 opacity: .1;
  30.             }
  31.             #warning-static-release div{
  32.                 text-align: right;
  33.                 font-size: calc(12rem/16);
  34.             }
  35.         </style>
  36.     {% endif %}
  37. {% endif %}