templates/app/dayshop.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% set side_nav = 'carte' %}
  3. {% block body %}
  4.     <!-- Page Title -->
  5.     <section class="page-title" style="background-image: url('{{ asset('build/theme/images/main-slider/9.png') }}');">
  6.         <div class="auto-container">
  7.             <h1>Lena chocolat</h1>
  8.             <ul class="page-breadcrumb">
  9.                 <li><a href="index.html">Carte</a></li>
  10.                 <li>Menu du jour</li>
  11.             </ul>
  12.         </div>
  13.     </section>
  14.     <!-- End Page Title -->
  15.     <!-- Blog Showcase -->
  16.     <section class="blog-section blog-three-column">
  17.         <div class="container-fluid mixitup-container">
  18.             {% for menu in menus %}
  19.                 {% if menu.statusId.label=='Disponible' %}
  20.                 <div class="testimonial-block-two">
  21.                     <div class="inner-box">
  22.                         <div class="testimonial_img">
  23.                             <svg class="div_left" fill="#ffffff" viewBox="0 0 25 8"><path d="M1.7,5.2C2,5.4,2.1,5.7,1.9,6C1.8,6.2,1.7,6.3,1.5,6.3c-0.4,0.1-1-0.4-0.7,0.4c0.1,0.4,0.6,0.4,0.9,0.5 c1.8,0.2,3.6-1.2,5.1-1.9c-0.9-0.5-2-1.1-2.3-2.1c-0.2-0.8,0-1.8,0.6-2.4C5.7,0,6.8-0.2,7.7,0.3C8,0.6,8.2,1.2,8.1,1.6 C7.9,2.3,7.6,2.5,7,2.5C7,2.1,7.2,1.3,6.8,1C6.5,0.8,6,0.9,5.7,1.2C4.8,1.9,5.2,3.1,6,3.7C6.5,4,6.9,4.2,7.4,4.4 c0.6,0.2,0.9,0,1.5-0.2c1.3-0.6,2.6-1,3.9-1.4c1.4-0.4,2.8-0.5,4.2-0.4c1.1,0.1,2.2,0.5,3.2,1.1c1,0.6,2.1,0.9,3.2,0.9 c0.4,0,1.6,0,1.6,0.4c0,0.4-1.5,0.1-1.7,0.5c0.2,0.1,0.9,0.3,0.7,0.7c-0.2,0.4-0.9,0-1-0.2c-0.4-0.4-1-0.7-1.6-0.6 c-1,0.1-2.1,0.3-3.1,0.4c-1,0.1-1.8,0.1-2.7,0.2C13.7,6.1,11.7,6.2,9.8,6C9.1,5.7,8.2,5.8,7.5,6.1C6.7,6.5,6,7,5.2,7.3 C4,7.9,1.7,8.4,0.5,7.4S0.5,4.3,1.7,5.2z M20.3,4.2c-1.3-1-3-1.4-4.6-1.1c-0.9,0.2-1.9,0.5-2.8,0.7c-0.5,0.1-1,0.3-1.6,0.5 S10.3,4.5,10.4,5L20.3,4.2z"></path></svg>
  24.                             <!-- Thumb Box -->
  25.                             <figure class="thumb-box"><img src="{{ menu.imagemini }}" alt=""></figure>
  26.                             <svg class="div_right" fill="#ffffff" viewBox="0 0 25 8"><path d="M23.31,5.22a.59.59,0,0,0,.22,1.1c.36.08,1-.38.75.38-.13.4-.57.43-.93.46-1.77.17-3.6-1.21-5.11-1.95.87-.51,2-1.09,2.33-2.1A2.43,2.43,0,0,0,19.94.73,2,2,0,0,0,17.36.34a1.25,1.25,0,0,0-.43,1.29c.17.67.5.84,1.13.88-.05-.42-.28-1.17.12-1.49a1,1,0,0,1,1.17.15c.91.76.42,1.94-.38,2.54a4.91,4.91,0,0,1-1.37.66c-.64.22-.89,0-1.51-.22a25.55,25.55,0,0,0-3.94-1.39,13.51,13.51,0,0,0-4.2-.44A7.77,7.77,0,0,0,4.77,3.43a6.29,6.29,0,0,1-3.21.87c-.37,0-1.59,0-1.56.43s1.48.08,1.74.54c-.24.07-.89.29-.66.71s.86,0,1-.18a1.85,1.85,0,0,1,1.58-.6c1,.06,2.06.33,3.09.44s1.81.11,2.72.19a21.75,21.75,0,0,0,5.7.13,3.18,3.18,0,0,1,2.39.15c.76.37,1.47.84,2.23,1.2,1.25.6,3.56,1.12,4.74.13S24.51,4.34,23.31,5.22Zm-18.64-1a6.16,6.16,0,0,1,4.58-1.1c.93.19,1.86.45,2.78.69.52.14,1,.28,1.55.46s1.14.21,1.08.75Z"></path></svg>
  27.                         </div>
  28.                         <div class="text">
  29.                             {% for item in menu.item %}
  30.                                 {{item.label}}{{ not loop.last ? ',' }} 
  31.                             {% endfor %}
  32.                         </div>
  33.                         <div class="name">{{menu.label}}</div>
  34.                     </div>
  35.                 </div>
  36.                 <!-- Filter Buttons -->
  37.                 <div class="mixitup-gallery">
  38.                     <div class="filters clearfix">
  39.                         <ul class="filter-tabs filter-btns clearfix">
  40.                             <li type="button" class="filter active filter-btn" data-role="button" data-filter="all">Tout 
  41.                                 {# <div class="filter_shape"><svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 850.4 217"><path d="M820.3,96.5c-33.3-20.8-83.5-4.6-118,7.6c-79.5,28.2-150.5,57.8-236.9,44.3C317.8,125.3,122.3-11.8,0,132 c26.4,33.4,64.5-8.1,92.5-18.4c37.9-14,78-14.8,117-5c85.2,21.6,154.1,81.5,242,99.4c43,8.8,93.1,13.5,135.9,1.4 c40.6-11.5,70-41.1,102.9-65.9c22.9-17.3,44-36.9,71.6-23.7c14.9,7.1,20.7,28.6,34.6,37.8c14.7,9.7,34.7,10.1,51,16 C852.6,138,854.8,118.1,820.3,96.5z M494.7,81.7c34.5,4.3,141.9,1.9,134.9-60.3C626.8-3.2,594.7-4.5,577.9,7 c-20.8,14.4-14.3,27.9-44.8,29c-71.9,2.6-145.4-21.3-218.1-21.3C310.4,53.5,463.4,77.9,494.7,81.7z"></path></svg></div> #}
  42.                             </li>
  43.                             {% for category in categories %}
  44.                              <li type="button" class="filter" data-role="button" data-filter=".category-{{ category.id }}">{{ category.label }}
  45.                                 {# <div class="filter_shape"><svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 850.4 217"><path d="M820.3,96.5c-33.3-20.8-83.5-4.6-118,7.6c-79.5,28.2-150.5,57.8-236.9,44.3C317.8,125.3,122.3-11.8,0,132 c26.4,33.4,64.5-8.1,92.5-18.4c37.9-14,78-14.8,117-5c85.2,21.6,154.1,81.5,242,99.4c43,8.8,93.1,13.5,135.9,1.4 c40.6-11.5,70-41.1,102.9-65.9c22.9-17.3,44-36.9,71.6-23.7c14.9,7.1,20.7,28.6,34.6,37.8c14.7,9.7,34.7,10.1,51,16 C852.6,138,854.8,118.1,820.3,96.5z M494.7,81.7c34.5,4.3,141.9,1.9,134.9-60.3C626.8-3.2,594.7-4.5,577.9,7 c-20.8,14.4-14.3,27.9-44.8,29c-71.9,2.6-145.4-21.3-218.1-21.3C310.4,53.5,463.4,77.9,494.7,81.7z"></path></svg></div> #}
  46.                             </li>
  47.                             {% endfor %}
  48.                         </ul>
  49.                     </div>
  50.                 </div>
  51.                 {% set currentCategory = null %}
  52.                 {% for item in menu.item %}
  53.                     {% if item.categoryid != currentCategory %}
  54.                         {% if currentCategory is not null %}
  55.                             </div> <!-- Close the previous row -->
  56.                         {% endif %}
  57.                         <div class="sec-title text-center margin-top-50">
  58.                             <div class="divider"><img src="{{ asset('build/theme/images/icons/divider_1.png') }}" alt=""></div>
  59.                             <h1>{{ item.categoryid.label }}</h1>
  60.                         </div>
  61.                         <div class="row"> <!-- Start a new row for the new category -->
  62.                         {% set currentCategory = item.categoryid %}
  63.                     {% endif %}
  64.                 <!-- News Block -->
  65.                     <div class="mix category-{{ item.categoryid.id }} news-block col-lg-3 col-md-6 col-sm-12">
  66.                      <div class="item" data-category="{{ item.categoryid.id }}">
  67.                         <div class="inner-box">
  68.                             <div class="image-column">
  69.                                 <div class="inner-column">
  70.                                     <figure class="image"><img src="{{ item.imagemini }}" alt=""></figure>
  71.                                     {# <div class="date">04 <span>Dec</span></div> #}
  72.                                 </div>
  73.                             </div>
  74.                             <div class="content-column">
  75.                                 <div class="inner-column">
  76.                                     <h3>{{ item.label }}</h3>
  77.                                     <ul class="post-info">
  78.                                         {% set labelString = '' %}
  79.                                         {% for criterion in item.criterion %}
  80.                                             {% set labelString = labelString ~ criterion.label %}
  81.                                             {% if not loop.last %}
  82.                                                 {% set labelString = labelString ~ '-' %}
  83.                                             {% endif %}
  84.                                         {% endfor %}
  85.                                         {% if labelString is empty %}
  86.                                             {% set labelString = 'Pas d\'ingrédients' %}
  87.                                         {% endif %}
  88.                                     
  89.                                         {% set remainingLength = totalLength - labelString|length %}
  90.                                         {% set nbspString = '' %}
  91.                                         {% for i in 1..remainingLength %}
  92.                                             {% set nbspString = nbspString ~ '&nbsp;' %}
  93.                                         {% endfor %}
  94.                                     
  95.                                         <li>
  96.                                             <span class="icon">{{ labelString }} {{ nbspString|raw }}</span>
  97.                                         </li>
  98.                                     </ul>
  99.                                     <div class="text">{{ item.price|number_format(2, ',', ' ')  }} DZD</div>
  100.                                     <div class="devider"><img src="{{asset('build/theme/images/icons/icon-devider-gray.png')}}" alt=""></div>
  101.                                 </div>
  102.                             </div>
  103.                         </div>
  104.                     </div>
  105.                 </div>
  106.                 {% endfor %}
  107.                 {% if currentCategory is not null %}
  108.                     </div> <!-- Close the last row -->
  109.                 {% endif %}
  110.                 {% endif %}
  111.             {% endfor %}
  112.         </div>
  113.     </section>
  114.     <!-- End Blog Showcase -->
  115.     <!-- Footer or other elements -->
  116. <script>
  117. document.addEventListener('DOMContentLoaded', function() {
  118.     var filterButtons = document.querySelectorAll('.filter-tabs .filter');
  119.     var containerEl = document.querySelector('.mixitup-container');
  120.     var mixer = mixitup(containerEl, {
  121.         /*
  122.         animation: {
  123.             duration: 900, // Duration in milliseconds
  124.             effects: 'fade scale(0.9) rotateY(180deg) translateY(-100%) stagger(80ms)', // Combined effects
  125.             easing: 'ease-in-out' // Easing function
  126.         }
  127.         */
  128.         animation: {
  129.             duration: 850, // Duration in milliseconds
  130.             effects: 'fade translateX(-100%) rotateX(90deg) stagger(70ms)', // Combined effects
  131.             easing: 'ease-in-out', // Easing function
  132.             animateResizeTargets: true // Resize targets animated to their new size
  133.         }
  134.         /*
  135.        animation: {
  136.             duration: 750, // Duration in milliseconds
  137.             effects: 'fade rotateY(-180deg) translateX(100%) scale(0.5) stagger(100ms)', // Combined effects
  138.             easing: 'ease-in-out', // Easing function
  139.             perspectiveDistance: '3000px', // Perspective distance for 3D transforms
  140.             perspectiveOrigin: '50% 50%' // Perspective origin for 3D transforms
  141.         }
  142.         */
  143.         /*
  144.         animation: {
  145.             duration: 800, // Duration in milliseconds
  146.             effects: 'fade scale(0.8) rotateZ(-180deg) stagger(60ms)', // Combined effects
  147.             easing: 'ease-in-out', // Easing function
  148.         }
  149.         */
  150.     }); // Assuming MixItUp is already initialized
  151.     filterButtons.forEach(function(btn) {
  152.         btn.addEventListener('click', function() {
  153.             // Remove 'active' class from all buttons
  154.             filterButtons.forEach(function(button) {
  155.                 button.classList.remove('active');
  156.             });
  157.             // Add 'active' class to the clicked button
  158.             this.classList.add('active');
  159.             // Proceed with MixItUp filtering
  160.             mixer.filter(this.getAttribute('data-filter'));
  161.         });
  162.     });
  163. });
  164. </script>
  165. {% endblock %}