templates/home/blocks/page_header.html.twig line 1

Open in your IDE?
  1. <!--div class="page-header"
  2.     {% if data.background_page_header is defined and data.background_page_header is not empty %}
  3.         style="background:url({{ asset('uploads/' ~ data.background_page_header.0) }})no-repeat center;background-size:cover;"
  4.     {% endif %}
  5. -->
  6. {#% set datas = {
  7.     background_page_header: {
  8.         0: 'louis-hansel-restaurant-photographer-7jpXutWZFDQ-unsplash-626fedbd3c660.png',
  9.         1: 'louis-hansel-restaurant-photographer-7jpXutWZFDQ-unsplash-626fedbd3c660.png',
  10.         2: 'louis-hansel-restaurant-photographer-7jpXutWZFDQ-unsplash-626fedbd3c660.png'
  11.     },
  12.     video_page_header: {
  13.         0: 'https://losch.lu/files/settings_homepagevideo/6/losch_brand_3000kb.webm'
  14.     }
  15. } %#}
  16. {% set datas = {
  17.     background_page_header: {
  18.         0: 'louis-hansel-restaurant-photographer-7jpXutWZFDQ-unsplash-626fedbd3c660.png',
  19.         1: 'louis-hansel-restaurant-photographer-7jpXutWZFDQ-unsplash-626fedbd3c660.png',
  20.         2: 'louis-hansel-restaurant-photographer-7jpXutWZFDQ-unsplash-626fedbd3c660.png'
  21.     }
  22. } %}
  23. <div class="page-header">
  24.     {% if data.sub_blocks is defined and data.video_page_header is not defined %}
  25.     <div class="images">
  26.     <div class="fader"></div>
  27.         <ul class="items" {% if slug == 'contact' %}id="map"{% endif %}>
  28.             {% for item in data.sub_blocks %}
  29.             <li class="item" data-id="{{ loop.index }}">
  30.                 <img src="{{ asset('uploads/' ~ item.image_slide.0) }}" class="image" width="100%" height="100%">
  31.             </li>
  32.             {% endfor %}
  33.         </ul>
  34.     </div>
  35.     {% endif %}
  36.         
  37.     {% if data.video_page_header is defined %}
  38.         <div class="video">
  39.             <video autoplay="autoplay" playsinline="playsinline" webkit-playsinline="webkit-playsinline" preload="auto" muted="muted" loop="loop" poster="{{ asset('img/poster_video_home.png') }}">
  40.                 <source src="{{ asset('uploads/' ~ data.video_page_header.0) }}" type="video/webm">
  41.             </video>
  42.         </div>
  43.     {% endif %}
  44.     <div class="container position-relative">
  45.         {% if data.header_page_url_link is defined and data.header_page_url_link %}
  46.             <div class="card-link-header bg-white col-md-5 position-absolute d-flex{% if datas.video_page_header is defined %} with_video{% endif %}">
  47.                 {#% if data.logo_before_title is defined %#}
  48.                     <div class="pr-3 fity">
  49.                         <div class="tify_wh_wheel"></div>
  50.                         <div class="tify_wheel"></div>
  51.                         <div class="tify_arm"></div>
  52.                         
  53.                     </div>
  54.                 {#% endif %#}
  55.                 <div class="txt">
  56.                     {% if data.header_page_title_link is defined %}
  57.                         <h2 class="blue-dark">{{ data.header_page_title_link }}</h2>
  58.                     {% endif %}
  59.                     <a href="{{ data.header_page_url_link }}" class="col-md-12 d-flex justify-content-between p-0 blue btn-arrow">
  60.                         {% if data.header_page_description_link is defined %}
  61.                             <p>{{ data.header_page_description_link }}</p>
  62.                         {% endif %}
  63.                         <img src="{{ asset('img/icons/arrow-right-blue.svg') }}" alt="flèche droite">
  64.                     </a>
  65.                 </div>
  66.             </div>
  67.         {% endif %}
  68.         {% if data.big_title_header is defined and data.big_title_header %}
  69.             {% set bigTitleSplited = data.big_title_header|split(',') %}
  70.             <h1 class="position-absolute big-title-header pl-4">{% if bigTitleSplited.1 is defined %}{{ bigTitleSplited.0 }}, <span class="blue">{{ bigTitleSplited.1 }}</span>{% else %}{{ data.big_title_header }}{% endif %}</h1>
  71.         {% endif %}
  72.     </div>
  73. </div>