templates/front/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <!--[if lt IE 7 ]>
  3. <html class="ie ie6" lang="{{ app.request.locale }}"> <![endif]-->
  4. <!--[if IE 7 ]>
  5. <html class="ie ie7" lang="{{ app.request.locale }}"> <![endif]-->
  6. <!--[if IE 8 ]>
  7. <html class="ie ie8" lang="{{ app.request.locale }}"> <![endif]-->
  8. <!--[if (gte IE 9)|!(IE)]><!-->
  9. <html lang="{{ app.request.locale }}">
  10. <!--<![endif]-->
  11. {% set activatePromoCode = getActivatePromoCode() %}
  12. <head>
  13.     {% set _title =  _params is defined and _params.title is defined ? _params.title : block('title') %}
  14.     {% set reverse_title = block('reverse_title') is defined ? true : false %}
  15.     {# timestamp js and css files with current datetime for dev environement #}
  16.     {% set timestamp = (app_env | lower is same as('dev') ? '?v=' ~ ("now"|date("Y-m-d_h-i-s")) : '?v=' ~ version) %}
  17.     <!-- Basic Page Needs
  18.     ================================================== -->
  19.     <meta charset="UTF-8">
  20.     <base href="{{ absolute_url(path('front_home')) }}" />
  21.     {% include 'front/includes/meta.html.twig' %}
  22.     <!-- Mobile Specific Metas
  23.     ================================================== -->
  24.     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  25.     {% if pagetitle_before_sitename b-xor reverse_title %}
  26.         <title>{% if _title is not empty %}{{ _title|raw }}&nbsp;&bull;&nbsp;{% endif %}{{ site_name }}</title>
  27.     {% else %}
  28.         <title>{{ site_name }}{% if _title is not empty %}&nbsp;&bull;&nbsp;{{ _title|raw }}{% endif %}</title>
  29.     {% endif %}
  30.     {% block stylesheets %}
  31.         {# Includes links #}
  32.         {% for _link in encore_entry_css_files('front/css/app') %}
  33.             <link rel="stylesheet" href="{{ absolute_url(_link) ~ timestamp }}">
  34.         {% endfor %}
  35.     {% endblock %}
  36.     <!--Favicons
  37.         ================================================== -->
  38.     <link rel="icon" type="image/png" href="/gfx/favicon/favicon-16.png" sizes="16x16">
  39.     <link rel="icon" type="image/png" href="/gfx/favicon/favicon-32.png" sizes="32x32">
  40.     <link rel="icon" type="image/png" href="/gfx/favicon/favicon-96.png" sizes="96x96">
  41.     <link rel="apple-touch-icon" href="/gfx/favicon/favicon-120.png">
  42.     <link rel="apple-touch-icon" href="/gfx/favicon/favicon-180.png" sizes="180x180">
  43.     <link rel="apple-touch-icon" href="/gfx/favicon/favicon-152.png" sizes="152x152">
  44.     <link rel="apple-touch-icon" href="/gfx/favicon/favicon-167.png" sizes="167x167">
  45.     {% if (app_env | lower is same as('prod')) %}
  46.         <!-- Global site tag (gtag.js) - Google Analytics -->
  47.         <script async src="https://www.googletagmanager.com/gtag/js?id=UA-50356248-1"></script>
  48.         <script>
  49.             window.dataLayer = window.dataLayer || [];
  50.             function gtag(){dataLayer.push(arguments);}
  51.             gtag('js', new Date());
  52.             gtag('config', 'UA-50356248-1');
  53.         </script>
  54.     {% endif %}
  55.     {% block head %}{% endblock %}
  56. </head>
  57. <body>
  58.     {% if activatePromoCode %}
  59.         <div class="promo-code-header">
  60.             Profitez de <b>{{ activatePromoCode.promoRate * 100 }}%</b> de réduction
  61.             {% if activatePromoCode.isEndedByDate %}
  62.                 jusqu'au <b>{{ activatePromoCode.promoEndDate | date('d/m/Y') }}</b>
  63.             {% else %}
  64.                 jusqu'à utilisation
  65.             {% endif %}
  66.             avec le code <b>{{ activatePromoCode.code }}</b>
  67.         </div>
  68.     {% endif %}
  69.     {% if app.request.get('_route') not in controllerRoutes(['Security'], ['login']) %}
  70.         {% include 'front/includes/btn-go-up.html.twig' %}
  71.         {% include 'front/includes/panier/modal-add-panier.html.twig' %}
  72.     {% endif %}
  73.     {% block body %}{% endblock %}
  74.     {% block javascripts %}
  75.         {# Includes scripts #}
  76.         {% for _script in encore_entry_js_files('front/js/app') %}
  77.         <script src="{{ absolute_url(_script) ~ timestamp }}" defer></script>
  78.         {% endfor %}
  79.     {% endblock %}
  80. </body>
  81. </html>