templates/Frontend/Index/index.html.twig line 216

Open in your IDE?
  1. {% extends 'Frontend/base.html.twig' %}
  2. {% block body %}
  3.     
  4.     
  5. <div class='containerr p-t-25'>
  6.     <div id="homeSlides" class="carousel slide" data-ride="carousel">
  7.       <div class="carousel-inner">          
  8.           {% for item in slides %}          
  9.                 {% if loop.index == 1 %}
  10.                     {% set activeFlag = 'active' %}
  11.                 {% else %}
  12.                     {% set activeFlag = '' %}            
  13.                 {% endif %}
  14.                   <div class="carousel-item {{activeFlag}} " data-interval="10000" >
  15.                     {% if item.text1 == '' and item.text2 == '' %}  
  16.                   <div class="d-block w-100" style="background-image:url('{{item.imagePath}}');background-size:cover;background-repeat:no-repeat;background-position:top center;width:100%;height:700px;" alt="">
  17.                   {% else %}
  18.                   <div class="d-block w-100" style="background:linear-gradient(0deg,rgba(0, 0, 0, {% if item.gradientLower != '' %} 0.{{item.gradientLower}}{% else %}0.0{% endif %}),rgba(0, 0, 0,{% if item.gradientHigher != '' %} 0.{{item.gradientHigher}}{% else %}0.0{% endif %})), url('{{item.imagePath}}');background-size:cover;background-repeat:no-repeat;background-position:top center;width:100%;height:700px;" alt="">                  
  19.                   {% endif %}
  20.                     <div class="container h-full">
  21.                             
  22.                         <div class="flex-col-l-m h-full p-t-100 p-b-30 respon5">
  23.                             <div class="animated fadeIn " style="width:100%;{%if item.textAlignment == ''%}text-align:left !important;{%else%}text-align:{{item.textAlignment}} !important;{%endif%}">
  24.                                 <span class="ltext-101 cl2 respon2" style='color:#{{item.text1color}} !important;'>
  25.                                     {{item.text1}}
  26.                                 </span>
  27.                             </div>                                
  28.                             <div class="animated fadeIn " style="width:100%;{%if item.textAlignment == ''%}text-align:left !important;{%else%}text-align:{{item.textAlignment}} !important;{%endif%}">
  29.                                 <h2 class="ltext-201 cl2 p-t-19 p-b-43 respon1" style='color:#{{item.text2color}} !important;'>
  30.                                     {{item.text2}}
  31.                                 </h2>
  32.                             </div>                                                            
  33.                         </div>
  34.                         
  35.                                             
  36.                     </div>        
  37.                       
  38.                   </div>
  39.                 </div>                          
  40.           {% endfor %}
  41.                   
  42.       </div>
  43.       <a class="carousel-control-prev" href="#homeSlides" role="button" data-slide="prev">
  44.         <span class="carousel-control-prev-icon" aria-hidden="true"></span>
  45.         <span class="sr-only">Anterior</span>
  46.       </a>
  47.       <a class="carousel-control-next" href="#homeSlides" role="button" data-slide="next">
  48.         <span class="carousel-control-next-icon" aria-hidden="true"></span>
  49.         <span class="sr-only">Siguiente</span>
  50.       </a>
  51.     </div>
  52. </div>    
  53. <!---- MARCAS ---->
  54. {% if brands | length > 0 %}
  55.     {% if webSetting.brandTitle != '' and webSetting.brandSubtitle != '' %}
  56.         <div class='row bg-img1 bg-background-color' style='margin-right:0px;margin-left:0px;'>
  57.             <div class='col-12'>
  58.                 <section class="txt-center p-lr-15 p-tb-52 text_color_main">
  59.                     <h2 class="ltext-105 txt-center">
  60.                         {{webSetting.brandTitle}}
  61.                     </h2>
  62.                     <p>{{webSetting.brandSubtitle}}</p>
  63.                 </section>
  64.             </div>    
  65.         </div>
  66.     {% endif %}    
  67. <!-- Banner -->
  68. <div class="sec-banner bg0 p-t-30">
  69.     <div class="container">
  70.         <div class="row">
  71.                 
  72.             {% for item in brands %}
  73.                 {% if item.featured == 1 %}
  74.                     {% if item.brand_count > 0 %}
  75.                         <div class="col-md-6 col-xl-4 p-b-30 m-lr-auto">
  76.                                                         
  77.                             <div class="block1 wrap-pic-w bkg_block" style='background-size:cover !important;background:linear-gradient(0deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2)), url("{{asset("uploads/brand/"~item.image_path) }}");'>            
  78.                                 <a href="{{ path('frontend_product', {'brand': item.brand_id, slug:slug}) }}" class="block1-txt ab-t-l s-full flex-col-l-sb p-lr-38 p-tb-34 trans-03 respon3">
  79.                                     <div class="block1-txt-child1 flex-col-l">
  80.                                         <span class="block1-name ltext-102 trans-04 p-b-8">
  81.                                             {{item.name}}
  82.                                         </span>            
  83.                                         <span class="block1-info stext-102 trans-04">                                    
  84.                                             {{item.brand_count}} {% if item.brand_count != 1 %}Productos{%else%}Producto{%endif%}                                    
  85.                                         </span>
  86.                                     </div>            
  87.                                     <div class="block1-txt-child2 p-b-4 trans-05">
  88.                                         <div class="block1-link stext-101 cl0 trans-09">
  89.                                             Ver más
  90.                                         </div>
  91.                                     </div>
  92.                                 </a>
  93.                             </div>
  94.                             
  95.                         </div>
  96.                     {% endif %}
  97.                 {% endif %}
  98.             {% endfor %}
  99.     
  100.         </div>
  101.     </div>
  102. </div>
  103. {% endif %}
  104. <!---- CATEGORIAS ---->
  105. {% if categories | length > 0 %}
  106.     {% if webSetting.categoryTitle != '' and webSetting.categorySubtitle != '' %}
  107.         <div class='row bg-img1 bg-background-color' style='margin-right:0px;margin-left:0px;'>
  108.             <div class='col-12'>
  109.                 <section class="txt-center p-lr-15 p-tb-52 text_color_main">
  110.                     <h2 class="ltext-105 txt-center">
  111.                         {{webSetting.categoryTitle}}
  112.                     </h2>
  113.                     <p>{{webSetting.categorySubtitle}}</p>
  114.                 </section>
  115.             </div>    
  116.         </div>
  117.     {% endif %}    
  118. <!-- Banner -->
  119. <div class="sec-banner bg0 p-t-30">
  120.     <div class="container">
  121.         <div class="row">
  122.                 
  123.             {% for item in categories %}
  124.                 {% if item.featured == 1 %}
  125.                     {% if item.category_count > 0 %}
  126.                         <div class="col-md-6 col-xl-4 p-b-30 m-lr-auto">
  127.                                                         
  128.                             <div class="block1 wrap-pic-w bkg_block" style='background:linear-gradient(0deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2)), url("{{item.image_path}}");'>            
  129.                                 <a href="{{ path('frontend_product', {'category': item.category_id, slug:slug}) }}" class="block1-txt ab-t-l s-full flex-col-l-sb p-lr-38 p-tb-34 trans-03 respon3">
  130.                                     <div class="block1-txt-child1 flex-col-l">
  131.                                         <span class="block1-name ltext-102 trans-04 p-b-8">
  132.                                             {{item.name}}
  133.                                         </span>            
  134.                                         <span class="block1-info stext-102 trans-04">                                    
  135.                                             {{item.category_count}} {% if item.category_count != 1 %}Productos{%else%}Producto{%endif%}                                        
  136.                                         </span>
  137.                                     </div>            
  138.                                     <div class="block1-txt-child2 p-b-4 trans-05">
  139.                                         <div class="block1-link stext-101 cl0 trans-09">
  140.                                             Ver más
  141.                                         </div>
  142.                                     </div>
  143.                                 </a>
  144.                             </div>
  145.                             
  146.                         </div>
  147.                     {% endif %}
  148.                 {% endif %}
  149.             {% endfor %}
  150.     
  151.         </div>
  152.     </div>
  153. </div>
  154. {% endif %}
  155. <!---- BLOGS ---->
  156. {% if blogs | length > 0 %}
  157.     {% if webSetting.blogTitle != '' and webSetting.blogSubtitle != '' %}
  158.         <div class='row bg-img1 bg-background-color' style='margin-right:0px;margin-left:0px;'>
  159.             <div class='col-12'>
  160.                 <section class="txt-center p-lr-15 p-tb-52 text_color_main">
  161.                     <h2 class="ltext-105 txt-center">
  162.                         {{webSetting.blogTitle}}
  163.                     </h2>
  164.                     <p>
  165.                         {{webSetting.blogSubtitle}}
  166.                     </p>
  167.                 </section>
  168.             </div>    
  169.         </div>
  170.     {% endif %}    
  171.     <!-- Banner -->
  172.     <div class="sec-banner bg0 p-t-30">
  173.         <div class="container">
  174.             <div class="row justify-content-md-center">                        
  175.                 {% for blog in blogs %}
  176.                 
  177.                     <div class="col-lg-4" style="padding-top: 10px">
  178.                         <div class="card">
  179.                             <img  class="card-img-top" src="{{ asset('uploads/blog/'~blog.coverPath) }}" alt="Image" onerror="this.onerror=null;this.src='{{asset("images/no_image.png")}}'" onclick="window.location.href='{{ path('frontend_blog_detail', {'blogId': blog.blogId|nzo_encrypt, 'from_inicio': true, slug:slug}) }}'">
  180.                             <div class="card-body" >                
  181.                                 <h5 class="card-title" style='margin-bottom:0px;'>
  182.                                     <a href="{{ path('frontend_blog_detail', {'blogId': blog.blogId|nzo_encrypt, 'from_inicio': true, slug:slug}) }}">
  183.                                         {{blog.title}}
  184.                                     </a>
  185.                                 </h5>
  186.                                 <small style='color:#ccc'>{{ blog.createdAt | date('F m, Y')}}{% if blog.blogCategory %} | {{blog.blogCategory.name}}{% endif %}</small>
  187.                                 <br><br>
  188.                                 <div style='min-height: 130px;'>
  189.                                     <p class="card-text">{{ blog.shortContent| slice(0, 200)}}{% if blog.shortContent|raw |length > 200 %} ...{%endif%}</p>
  190.                                 </div>
  191.                             </div>
  192.                         </div>
  193.                     </div>
  194.                 
  195.                 {% endfor %}
  196.             </div>
  197.         </div>
  198.     </div>
  199. {% endif %}
  200. <!-- LOAD ITEMS DINAMICALLY -->
  201. <br>
  202. {{ include('Frontend/product.html.twig', {filter:true, webSetting: webSetting, slug: slug}) }}
  203.     
  204. {% endblock %}