src/Elements/Bundle/DemiFrontendBundle/Resources/views/Layout/layout.html.twig line 30

Open in your IDE?
  1. <!doctype html>
  2. <html lang="{{ app.request.locale }}">
  3. <head>
  4.     <script>
  5.     /* ga mock function */
  6.     (function(i,s,r){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  7.     (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();
  8.     })(window,document,'ga');
  9.     </script>
  10.     {% if hasGetParams() or 'demi_checkout' in app.request.attributes.get('_route') %}
  11.         {% do elements_robots().setNoIndex(true) %}
  12.     {% endif %}
  13.     {{ include('@ElementsDemiFrontend/Includes/layout/head.html.twig') }}
  14.     {{ include('Layout/includes/codeHead.html.twig') }}
  15. </head>
  16. <body>
  17. {% if not demi_core_configuration("getIsWhitelabel", {}) and not editmode %}
  18.     {{ include('Navigation/navbar.html.twig') }}
  19. {% endif %}
  20. {% if demi_core_configuration("getIsWhitelabel", {}) %}
  21.     {% do jsConfig().add('affiliate', true) %}
  22.     {% do jsConfig().add('affiliateTarget', '_blank') %}
  23.     <main id="main-content" role="main" class="content-block">
  24.         {{ block('content') }}
  25.     </main>
  26. {% else %}
  27.     <div class="main-content--spacing main-content--no-hero-small content-block">
  28.         {{ block('content') }}
  29.     </div>
  30. {% endif %}
  31. {% if not editmode and document.property('modal_info') is instanceof('\\Pimcore\\Model\\Document\\Snippet') %}
  32.     {{ pimcore_inc(document.property('modal_info')) }}
  33. {% endif %}
  34. {% if not demi_core_configuration("getIsWhitelabel", {}) %}
  35.     {{ pimcore_inc(document.property('footer'), {footerStyleModifier: 'footer--has-smaller-padding content-block'}) }}
  36. {% endif %}
  37. {{ jsConfig() }}
  38. {% if loadMerchJs is defined and loadMerchJs == true %}
  39.     {{ include('@ElementsDemiFrontend/Includes/layout/jsScriptsMerchandiseShop.html.twig') }}
  40. {% elseif loadAdditionalServiceJs is defined and loadAdditionalServiceJs == true %}
  41.     {{ include('@ElementsDemiFrontend/Includes/layout/jsScriptsAdditionalService.html.twig') }}
  42. {%  else %}
  43.     {{ include('@ElementsDemiFrontend/Includes/layout/jsScripts.html.twig') }}
  44. {% endif %}
  45. {% set now = carbon().now() %}
  46. {% set earliestProposedFromDate = carbon().createFromFormat('Y-m-d H:i:s', '2020-03-19 12:00:00') %}
  47. {% set earliestProposedToDate = earliestProposedFromDate.copy().addDays(7) %}
  48. {% if earliestProposedFromDate.gt(now) %}
  49.     <script type="text/javascript" data-cookieconsent="ignore">
  50.         _initialState.searchForm.from = '{{ elements_customDateFormat(earliestProposedFromDate) }}';
  51.         _initialState.searchForm.to = '{{ elements_customDateFormat(earliestProposedToDate) }}';
  52.     </script>
  53. {% endif %}
  54. <div class="custom-cursor js-custom-cursor"></div>
  55. </body>
  56. </html>