templates/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <meta charset="UTF-8">
  5.         <title>{% block title %}Welcome!{% endblock %}</title>
  6.         {# Run `composer require symfony/webpack-encore-bundle`
  7.            and uncomment the following Encore helpers to start using Symfony UX #}
  8.         {% block stylesheets %}
  9.             <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
  10.             <link rel="stylesheet" href="{{ asset('css/styles.css') }}">
  11.             {#{{ encore_entry_link_tags('app') }}#}
  12.             <style>
  13.                 /* Start by setting display:none to make this hidden.
  14.    Then we position it in relation to the viewport window
  15.    with position:fixed. Width, height, top and left speak
  16.    for themselves. Background we set to 80% white with
  17.    our animation centered, and no-repeating */
  18.                 .modal {
  19.                     display:    none;
  20.                     position:   fixed;
  21.                     z-index:    1000;
  22.                     top:        0;
  23.                     left:       0;
  24.                     height:     100%;
  25.                     width:      100%;
  26.                     background: rgba( 255, 255, 255, .8 ) 
  27.                         url('http://i.stack.imgur.com/FhHRx.gif') 
  28.                         50% 50% 
  29.                         no-repeat;
  30.                 }
  31.                 /* When the body has the loading class, we turn
  32.                    the scrollbar off with overflow:hidden */
  33.                 body.loading .modal {
  34.                     overflow: hidden;   
  35.                 }
  36.                 /* Anytime the body has the loading class, our
  37.                    modal element will be visible */
  38.                 body.loading .modal {
  39.                     display: block;
  40.                 }
  41.             </style>
  42.         {% endblock %}
  43.         {% block javascripts %}
  44.             <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
  45.             <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
  46.             <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
  47.             {#{{ encore_entry_script_tags('app') }}#}
  48.             <script>
  49.                 $body = $("body");
  50.                 $(document).on({
  51.                     ajaxStart: function () {
  52.                         $body.addClass("loading");
  53.                     },
  54.                     ajaxStop: function () {
  55.                         $body.removeClass("loading");
  56.                     }
  57.                 });
  58.             </script>
  59.         {% endblock %}
  60.     </head>
  61.     <body>
  62.         {% block body %}{% endblock %}
  63.         <div class="modal"><!-- Place at bottom of page --></div>
  64.     </body>
  65. </html>