templates/Global/layout.html.twig line 88

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html lang="{{ app.request.get('_locale') }}">
  3.     <head>
  4.         <!--[if IE]>
  5.             <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6.         <![endif]-->
  7.         <meta charset="utf-8" />
  8.         <meta name="robots" content="index, follow, all" />
  9.         <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
  10.         <title>{% block title %}{% endblock %} | {{ services.getSetting("website_name") }}</title>
  11.         <meta property="og:site_name" content="{{ services.getSetting("website_name") }}" />
  12.         <meta property="og:type" content="website" />
  13.         <meta property="og:url" content="{{ app.request.schemeAndHttpHost ~ app.request.requestUri }}" />
  14.         <meta name="twitter:card" content="summary_large_image" />
  15.         <meta name="twitter:site" content="@{{ services.getSetting("website_slug") }}" />
  16.         {% block meta_dynamic_seo %}
  17.             <meta name="description" content="{{ services.getSetting("website_description_" ~ app.request.locale) }}" />
  18.             <meta name="keywords" content="{{ services.getSetting("website_keywords_" ~ app.request.locale) }}" />
  19.             <meta property="og:title" content="{{ services.getSetting("website_name") }}" />
  20.             <meta property="og:image" content="{{ absolute_url(asset(services.getAppLayoutSettings.getOgImagePath)) }}" />
  21.             <meta property="og:description" content="{{ services.getSetting("website_description_" ~ app.request.locale) }}" />
  22.             <meta name="twitter:title" content="{{ services.getSetting("website_name") }}" />
  23.             <meta name="twitter:image" content="{{ absolute_url(asset(services.getAppLayoutSettings.getOgImagePath)) }}" />
  24.             <meta name="twitter:image:alt" content="{{ services.getSetting("website_description_" ~ app.request.locale) }}" />
  25.             <meta name="twitter:description" content="{{ services.getSetting("website_description_" ~ app.request.locale) }}" />
  26.         {% endblock %}
  27.         <link rel="shortcut icon" href="{{ absolute_url(asset(services.getAppLayoutSettings.getFaviconPath)) }}" />
  28.         <link rel="canonical" href="{{ app.request.schemeAndHttpHost ~ app.request.requestUri }}" />
  29.         <meta name="apple-mobile-web-app-title" content="{{ services.getSetting("website_name") }}" />
  30.         <meta name="twitter:site" content="@{{ services.getSetting("website_name") }}" />
  31.         <meta name="application-name" content="{{ services.getSetting("website_name") }}" />
  32.         <meta name="msapplication-tooltip" content="{{ services.getSetting("website_description_" ~ app.request.locale) }}" />
  33.         {# Google analytics code added in the app parameters #}
  34.         {% if services.getSetting('google_analytics_code') != "" and services.getSetting('google_analytics_code') is not null %}
  35.             <!-- Global site tag (gtag.js) - Google Analytics -->
  36.             <script async src="https://www.googletagmanager.com/gtag/js?id={{ services.getSetting('google_analytics_code') }}" integrity="sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC"></script>
  37.             <script>
  38.                 window.dataLayer = window.dataLayer || [];
  39.                 function gtag() {
  40.                     dataLayer.push(arguments);
  41.                 }
  42.                 gtag('js', new Date());
  43.                 gtag('config', '{{ services.getSetting('google_analytics_code') }}');
  44.             </script>
  45.         {% endif %}
  46.         {{ encore_entry_link_tags('app') }}
  47.         {# i18n lang specific styles #}
  48.         {% if app.request.locale == "fr" %}
  49.             {{ encore_entry_link_tags('app.fr') }}
  50.         {% elseif app.request.locale == "ar" %}
  51.             {{ encore_entry_link_tags('app.ar') }}
  52.         {% elseif app.request.locale == "es" %}
  53.             {{ encore_entry_link_tags('app.es') }}
  54.         {% elseif app.request.locale == "de" %}
  55.             {{ encore_entry_link_tags('app.de') }}
  56.         {% elseif app.request.locale == "pt" %}
  57.             {{ encore_entry_link_tags('app.pt') }}
  58.         {% endif %}
  59.         {# Application theme #}
  60.         {{ encore_entry_link_tags('app.'~services.getSetting('app_theme')) }}
  61.         {% block stylesheets %}
  62.         {% endblock %}
  63.         {# Custom css code added in the app parameters #}
  64.         {% if services.getSetting('custom_css') != "" and services.getSetting('custom_css') is not null %}
  65.             <style>
  66.                 {{ services.getSetting('custom_css')|raw }}
  67.             </style>
  68.         {% endif %}
  69.     </head>
  70.     <body class="bg-gray {% if app.request.locale == "ar" %}rtl{% endif %}" data-currency-ccy="{{ services.getSetting('currency_ccy') }}" data-currency-symbol="{{ services.getSetting('currency_symbol') }}" data-currency-position="{{ services.getSetting('currency_position') }}" data-timezone="{{ date_timezone }}" {% if services.getSetting('show_cookie_policy_bar') == "yes" %}data-cookie-bar-page-link="{{ path('page', { slug : services.getSetting('cookie_policy_page_slug') }) }}" {% endif %} {% if services.getEnv('DEMO_MODE') == "1" %}data-demo-mode="1"{% endif %}>
  71.         {% include "Global/header.html.twig" %}
  72.         {% if is_granted('ROLE_PREVIOUS_ADMIN') %}
  73.             {% include "Global/message.html.twig" with { type: 'info', icon: 'fas fa-info-circle', message: ('You are connected as "%username%'|trans({'%username%' : app.user.username})~ '", <a href="'~ path('dashboard_index', {'_switch_user': '_exit'}) ~'">' ~ 'Click here'|trans ~ '</a> ' ~ 'to return to your dashboard'|trans) } %}
  74.         {% endif %}
  75.         {% block content %}{% endblock %}
  76.         {% include "Global/footer.html.twig" %}
  77.         {% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
  78.             {% include "Global/dashboard-items-sidenav.html.twig" %}
  79.         {% endif %}
  80.         {{ encore_entry_script_tags('app') }}
  81.         {% block javascripts %}
  82.         {% endblock %}
  83.         {% for type, messages in app.flashes %}
  84.             {% for message in messages %}
  85.                 <div class="flash-message" data-type="{{ type }}" data-message="{{ message|trans }}"></div>
  86.             {% endfor %}
  87.         {% endfor %}
  88.         <script id="top-search-result-template" type="text/x-handlebars-template">
  89.             {% include "Global/event-preview-horizontal.html.twig" with { handlebarstemplate: true } %}
  90.         </script>
  91.         {% if services.getSetting("show_back_to_top_button") == "yes" %}
  92.             <a class="material-scrolltop cursor-pointer btn btn-sm btn-primary"></a>
  93.         {% endif %}
  94.     </body>
  95. </html>