templates/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html lang="{{ app.request.locale }}" class="{% if platform.hasSocialNetworkPage == false %}small-footer {% endif %}{% if is_granted('ROLE_ADMIN') and ('admin_' in app.request.attributes.get('_route')) %}pagetype-admin{% elseif is_granted('IS_AUTHENTICATED_FULLY') and ('authenticated_' in app.request.attributes.get('_route')) %}pagetype-authenticated{% else %}pagetype-front{% endif %} page-{{ app.request.attributes.get('_route') }}">
  3.     <head>
  4.         {% block beginningHead %}{% endblock %}
  5.         {% include '_headTag.html.twig' %}
  6.         {% include '_customCss.html.twig' %}
  7.         <meta charset="UTF-8" />
  8.         <title>{% if app.environment == 'dev' %}[dev] {% endif %}{% block title %}{{ platform.name }}{% endblock %}</title>
  9.         <meta name="description" content="{% block description %}{% endblock %}" />
  10.         <meta name="keywords"  content="{% block keywords %}{% endblock %}" />
  11.         <meta property="og:title" content="{% if app.environment == 'dev' %}[dev] {% endif %}{% block og_title %}{{ 'meta.default.title'|trans({}, 'meta') }}{% endblock %}" />
  12.         <meta property="og:type" content="website" />
  13.         <meta property="og:description" content="{% block og_description %}{% endblock %}">
  14.         <meta property="og:site_name" content="{{ 'meta.default.title'|trans({}, 'meta') }}" />
  15.         <meta property="og:url" content="{{ app.request.schemeAndHttpHost ~ app.request.requestUri }}" />
  16.         <meta property="og:local" content="{{ app.request.locale }}_{{ app.request.locale|upper }}" />
  17.         <meta property="og:image" content="{{ asset('build/img/logo.png') }}" />
  18.         <link rel="alternate" href="{{ url(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')|merge({'_locale' : 'fr'})) }}" hreflang="fr" />
  19.         <link rel="alternate" href="{{ url(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')|merge({'_locale' : 'en'})) }}" hreflang="en" />
  20.         {# à enlever lors de la mise en prod #}
  21.         {% if app.environment == 'dev' %}<meta name="robots" content="noindex" />{% endif %}
  22.         {% if platform.favicon %}<link rel="icon" type="image/png" sizes="any"  href="{{ platform.favicon.path }}">{% endif %}
  23.         <meta name="viewport" content="width=device-width, initial-scale=1" />
  24.         <meta name="theme-color" content="#cc9933">
  25.         {% block meta %}
  26.         {% endblock %}
  27.         {% block stylesheets %}
  28.             {{ encore_entry_link_tags('app') }}
  29.             <!-- Renders a link tag (if your module requires any CSS)
  30.                  <link rel="stylesheet" src="/build/app.css"> -->
  31.         {% endblock %}
  32.         <link rel="manifest" href="{{ asset('build/manifest.json') }}">
  33.         <link rel="manifest" href="{{ asset('manifest.json') }}">
  34.         {% block htmlhead %}
  35.         {% endblock %}
  36.         <script>
  37.         _locale = '{{ app.request.locale }}';
  38.         fromRoute = '{{ app.request.attributes.get('_route') }}';
  39.         {% if app.environment != 'dev' %}
  40.         {#
  41.         // This is the "Offline page" service worker
  42.         // Add this below content to your HTML page, or add the js file to your page at the very top to register service worker
  43.         // Check compatibility for the browser we're running this in
  44.         if ("serviceWorker" in navigator) {
  45.           if (navigator.serviceWorker.controller) {
  46.             console.log("[PWA Builder] active service worker found, no need to register");
  47.           } else {
  48.             // Register the service worker
  49.             navigator.serviceWorker
  50.               .register("{{ asset('pwabuilder-sw.js') }}", {
  51.                 scope: "/"
  52.               })
  53.               .then(function (reg) {
  54.                 console.log("[PWA Builder] Service worker has been registered for scope: " + reg.scope);
  55.               });
  56.           }
  57.         }
  58.         #}
  59.         {% endif %}
  60.         </script>
  61.     </head>
  62.     <body class="authenticated-menu-on-sm">
  63.         {% include '_bodyTag.html.twig' %}
  64.         <div class="front-bg"><div class="kenburn"></div><div class="kenburn2"></div></div>
  65.         <div class="popup-zone popup-zone1" style="display: none">
  66.             <div class="grey-background"></div>
  67.             <img class="loading popup-loading" src="{{ asset('build/img/loading.gif') }}" />
  68.             <div class="popup-content-zone">
  69.                 <div class="close clickable"><i title="{{ 'close'|trans }}" class="fa fa-times fa-sm" aria-hidden="true"></i></div>
  70.                 <div class="popup-content"></div>
  71.             </div>
  72.         </div>
  73.         <div class="popup-zone popup-zone2" style="display: none">
  74.             <div class="grey-background"></div>
  75.             <img class="loading popup-loading" src="{{ asset('build/img/loading.gif') }}" />
  76.             <div class="popup-content-zone">
  77.                 <div class="close clickable"><i title="{{ 'close'|trans }}" class="fa fa-times fa-sm" aria-hidden="true"></i></div>
  78.                 <div class="popup-content"></div>
  79.             </div>
  80.         </div>
  81.         <div class="popup-zone popup-zone3" style="display: none">
  82.             <div class="grey-background"></div>
  83.             <img class="loading popup-loading" src="{{ asset('build/img/loading.gif') }}" />
  84.             <div class="popup-content-zone">
  85.                 <div class="close clickable"><i title="{{ 'close'|trans }}" class="fa fa-times fa-sm" aria-hidden="true"></i></div>
  86.                 <div class="popup-content"></div>
  87.             </div>
  88.         </div>
  89.         {% block body %}
  90.         {% if app.user and ('admin_' in app.request.attributes.get('_route')) %}
  91.             <a href="{{ path('authenticated_offers') }}" title="{{ 'home'|trans }}" class="wl-color-primary admin-link"><i class="fas fa-home"></i></a>
  92.         {% elseif is_granted('ROLE_ADMIN') %}
  93.             <a href="{{ path('admin_offer_offers') }}" title="{{ 'admin'|trans }}" class="wl-color-primary admin-link"><i class="fas fa-tools"></i></a>
  94.         {% endif %}
  95.         <div class="cover-container d-flex h-100 mx-auto flex-column">
  96.         {% if is_granted('ROLE_ADMIN') and ('admin_' in app.request.attributes.get('_route')) %}
  97.             {% include 'admin/_header.html.twig' %}
  98.         {% elseif is_granted('IS_AUTHENTICATED_FULLY') and ('authenticated_' in app.request.attributes.get('_route')) %}
  99.             <div class="authenticated-menu wl-inversed-text-primary wl-gradient-bg-primary">{% include 'authenticated/_verticalMenu.html.twig' %}</div>
  100.             <div class="authenticated-content">
  101.             {% include 'authenticated/_header.html.twig' %}
  102.         {% else %}
  103.             {% include '_header.html.twig' %}
  104.         {% endif %}
  105.         <div id="mainContent" class="page-">
  106.         {% block content %}{% endblock %}
  107.         </div>
  108.         {% if app.user and ('admin_' in app.request.attributes.get('_route')) %}
  109.             {% include 'admin/_footer.html.twig' %}
  110.         {% else %}
  111.             {% include '_footer.html.twig' %}
  112.         {% endif %}
  113.         {% block javascripts %}
  114.             {{ encore_entry_script_tags('app') }}
  115.             {% if is_granted('ROLE_ADMIN') and ('admin_' in app.request.attributes.get('_route')) %}
  116.             <script>
  117.             {% include 'admin/parameters.js.twig' %}
  118.             </script>
  119.             {% endif %}
  120.             <script>
  121.                 refreshJsDatePicker = function() {
  122.                     $('.js-date-picker').each(function() {
  123.                         new Picker(this, {
  124.                             controls: false,
  125.                             format: '{{ 'date_format_jspicker_day'|trans }}',
  126.                             language: '{{ app.request.locale }}',
  127.                             headers: true,
  128.                             text: {
  129.                                 title: '{{ 'pick_date'|trans }}',
  130.                                 cancel: '{{ 'cancel'|trans }}',
  131.                                 confirm: '{{ 'ok'|trans }}',
  132.                                 year: '{{ 'year'|trans }}',
  133.                                 month: '{{ 'month'|trans }}',
  134.                                 day: '{{ 'day'|trans }}',
  135.                                 hour: '{{ 'hour'|trans }}',
  136.                                 minute: '{{ 'minute'|trans }}',
  137.                             },
  138.                         });
  139.                     });
  140.                 }
  141.                 refreshJsFullPicker = function() {
  142.                     $('.js-full-picker').each(function() {
  143.                         new Picker(this, {
  144.                             controls: false,
  145.                             format: '{{ 'date_format_jspicker_min'|trans }}',
  146.                             language: '{{ app.request.locale }}',
  147.                             headers: true,
  148.                             text: {
  149.                                 title: '{{ 'pick_date_and_time'|trans }}',
  150.                                 cancel: '{{ 'cancel'|trans }}',
  151.                                 confirm: '{{ 'ok'|trans }}',
  152.                                 year: '{{ 'year'|trans }}',
  153.                                 month: '{{ 'month'|trans }}',
  154.                                 day: '{{ 'day'|trans }}',
  155.                                 hour: '{{ 'hour'|trans }}',
  156.                                 minute: '{{ 'minute'|trans }}',
  157.                             },
  158.                         });
  159.                         if (!$(this).parent().find('.reset-js-picker').length) {
  160.                             $(this).parent().append('<div class="reset-js-picker" data-method="reset"><i class="fas fa-times"></i></div>');
  161.                         }
  162.                     });
  163.                 }
  164.             </script>
  165.         {% endblock %}
  166.         {% if is_granted('IS_AUTHENTICATED_FULLY') and ('authenticated_' in app.request.attributes.get('_route')) %}
  167.             </div>
  168.         {% endif %}
  169.         </div>
  170.         {% endblock %}
  171.     </body>
  172.     {% include '_customCss.html.twig' %}
  173. </html>