templates/website/page/food.html.twig line 1

  1. {% extends '@web/base.html.twig' %}
  2. {% if page is defined and page is not empty %}
  3.     {% set metaParams = {
  4.         'title': page.metaTitle ? page.metaTitle : page.title,
  5.         'metaDescription': page.metaDescription,
  6.         'metaKeywords': page.metaKeywords,
  7.         'image':(page.metaImage is defined ? page.metaImage : page.image is defined ? page.image : null)
  8.     } %}
  9. {% else %}
  10.     {% set metaParams = {} %}
  11. {% endif %}
  12. {% block meta %}
  13.     {% include '@web/parts/meta.html.twig' with metaParams %}
  14. {% endblock meta %}
  15. {% block content %}
  16.     <section class="section-food"
  17.             {% if page and page.backgroundImage is not null %}
  18.         style="background-image: url('{{ page.backgroundImage }}');"
  19.             {% endif %}>
  20.         {% block header %}
  21.             {% include '@web/parts/header.html.twig' %}
  22.         {% endblock %}
  23.         <div class="my-container-fluid">
  24.             <div class="food-wrapper">
  25.                 {% if foodSlider is not empty %}
  26.                     <div class="slider slider-banner menuCourt-slick">
  27.                         {% for item in foodSlider %}
  28.                             <div class="slick-slide">
  29.                                 <div class="item">
  30.                                     <img src="{{ item.image|imagine_filter('thumbnail_view') }}" width="100%"
  31.                                          alt="{{ item.id }}">
  32.                                 </div>
  33.                             </div>
  34.                         {% endfor %}
  35.                     </div>
  36.                 {% endif %}
  37.                 <div class="info-content">
  38.                     <div class="standard-text">{{ 'Ծանոթացի՛ր Food Court -ի ճաշացանկին այստեղ'|trans }}</div>
  39.                     <a target="_blank" href="{{ page and page.file ? page.file : '#' }}"
  40.                        class="btn-red menu-btn">{{ 'ՃԱՇԱՑԱՆԿ'|trans }}</a>
  41.                     <div class="title">{{ 'ԱՄԵՆԱՇԱՏ ՊԱՏՎԻՐՎՈՂ'|trans }} <span>5</span> {{ 'ՈՒՏԵՍՏՆԵՐԸ'|trans }}</div>
  42.                 </div>
  43.                 {% if foodCourtMenu is not empty %}
  44.                     <div class="menu-slick">
  45.                         {% for item in foodCourtMenu %}
  46.                             <div class="slick-slide">
  47.                                 <div class="item">
  48.                                     <div class="img-box">
  49.                                         <div class="number">{{ loop.index }}</div>
  50.                                         <img src="{{ item.image|imagine_filter('thumbnail_view') }}" width="100%"
  51.                                              alt="{{ item.id }}">
  52.                                     </div>
  53.                                     <div class="title color-darkblue">{{ item.title }}</div>
  54.                                 </div>
  55.                             </div>
  56.                         {% endfor %}
  57.                     </div>
  58.                 {% endif %}
  59.                 {% if childrensComboSlider is not empty %}
  60.                     <div class="childrens-menu-slick-wrapper">
  61.                         <div class="title">{{ 'Մանկական կոմբո'|trans }}</div>
  62.                         <div class="childrens-menu-slick">
  63.                             {% for item in childrensComboSlider %}
  64.                                 <div class="slick-slide">
  65.                                     <div class="menu-item ">
  66.                                         <div class="img-box">
  67.                                             <img class="mb-sm-3" src="{{ item.image|imagine_filter('thumbnail_view') }}" width="100%"
  68.                                                  alt="{{ item.title }}">
  69.                                             <div class="title color-darkblue ">{{ item.title }}</div>
  70.                                         </div>
  71.                                         <div class="box-info">{{ item.body|raw }} </div>
  72.                                     </div>
  73.                                 </div>
  74.                             {% endfor %}
  75.                         </div>
  76.                     </div>
  77.                 {% endif %}
  78.             </div>
  79.             {% if page and page.video is not empty %}
  80.             <div class="pt-4">
  81.                 <div class="video-wrapper">
  82.                     <video  muted autoplay loop  id="food-video">
  83.                         <source src="{{ page.video }}">
  84.                     </video>
  85.                      <button class="play-button"  id="playBtn" onclick="toggleVideoPlay()">{{ svg('public/static_images/svg/play.svg')|raw }}</button>
  86.                 </div>
  87.             </div>
  88.             {% endif %}
  89.         </div>
  90. {#        <div class="mt-5 my-container-fluid" style="min-height: 1000px;position: relative;top: 220px">#}
  91. {#            <div class="ice-creams" style="display: flex;#}
  92. {#                    width: 88%;#}
  93. {#                    justify-content: flex-end;#}
  94. {#                    position: absolute;#}
  95. {#                    gap:20px;#}
  96. {#                    #}{#padding-right: {{ iceCreams|length }}vw;#}
  97. {#                    ">#}
  98. {#                {% for item in iceCreams %}#}
  99. {#                    <img style="    position: relative; top: {{ -190 + (loop.index == iceCreams|length ? 20 * loop.index : 15 * loop.index) }}px;#}
  100. {#                            z-index: 1;" src="{{ item.image }}" alt="" width="150px">#}
  101. {#                {% endfor %}#}
  102. {#            </div>#}
  103. {#            <div class="text-center">#}
  104. {#                <img style="z-index: 2;position: relative" src="{{ asset('static_images/ice-cream-bus.png') }}" width="80%" alt="">#}
  105. {#            </div>#}
  106. {#        </div>#}
  107.         <div class="ice-cream-wrapper mt-5 my-container-fluid" id="ice-cream-wrapper">
  108.             <img id="ice-cream-logo" class="ice-cream-logo vert-move"
  109.                  src="{{ asset('static_images/ice-cream-logo.png') }}" alt="ice-cream">
  110.             <img class="banner-image" src="{{ page.image }}" width="100%" alt="ice-cream">
  111.             <div class="ice-cream-area">
  112.             {% for item in iceCreams %}
  113.                 <div class=" ice-cream " style="background: linear-gradient(180deg, {{ item.color }} 0%, rgba(255, 255, 255, 1) 80%);">
  114.             <img src="{{ item.image|imagine_filter('thumbnail_slide') }}" alt="{{ item.title }}" width="100%">
  115.             <div class="title  mb-0 text-uppercase" style="color: {{ item.color }}">{{ item.title }}</div>
  116.         </div>
  117.         {% endfor %}
  118.         </div>
  119.             <div class="videos-wrapper">
  120.             {% if  iceCreamVideos is not empty %}
  121.                 {% for item in iceCreamVideos %}
  122.                     <div class="pt-4">
  123.                         <div class="video-wrapper">
  124.                             <video  loop autoplay muted id="food-video{{ item.id }}">
  125.                                 <source src="{{ item.video }}">
  126.                             </video>
  127. {#                             <button class="play-button"  id="playBtn{{ item.id }}" onclick="toggleVideoPlay('{{ item.id }}')">{{ svg('public/static_images/svg/play.svg')|raw }}</button>#}
  128.                         </div>
  129.                     </div>
  130.                 {% endfor %}
  131.             {% endif %}
  132.             </div>
  133.         </div>
  134. {#        background: linear-gradient(180deg, rgb(0 0 114) 0%, rgba(255, 255, 255, 1) 100%);#}
  135.         {% block footer %}
  136.             {% include '@web/parts/footer.html.twig' %}
  137.         {% endblock %}
  138.         <script>
  139.             document.getElementById('ice-cream-logo').addEventListener('click', function (e) {
  140.                 document.getElementById("ice-cream-wrapper").scrollIntoView()
  141.             });
  142.             window.addEventListener('scroll', () => {
  143.                 if (window.scrollY < 400) {
  144.                     document.getElementById('ice-cream-logo').style.display = "flex";
  145.                 } else {
  146.                     document.getElementById('ice-cream-logo').style.display = "none";
  147.                 }
  148.             });
  149.             function toggleVideoPlay(itemId = '') {
  150.                 const video = document.getElementById('food-video'+itemId);
  151.                 const playBtn = document.getElementById('playBtn'+itemId);
  152.                 if (window.innerWidth < 991 ){
  153.                     if (playBtn.style.opacity === "0") {
  154.                         playBtn.style.opacity = "1";
  155.                     } else {
  156.                         playBtn.style.opacity = "0";
  157.                     }
  158.                 }
  159.                 if (video.paused) {
  160.                     video.play();
  161.                     playBtn.classList.add('button-opacity')
  162.                 } else {
  163.                     playBtn.classList.remove('button-opacity')
  164.                     video.pause();
  165.                 }
  166.             }
  167.         </script>
  168.     </section>
  169. {% endblock %}