templates/home/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Items!{% endblock %}
  3. {% block body %}
  4.     {% block header %}
  5.         {% set menu = 'foo' %}
  6.         {{ parent() }}
  7.     {% endblock %}
  8.     {% block content %}
  9.         <div id="main" role="main" class="container-fluid">
  10.             <!-- contained-->
  11.             <div class="contained">
  12.                 {% block aside %}
  13.                     {% include 'aside.html.twig' %}
  14.                 {% endblock %}
  15.                 {% block principal %}
  16.                     <div id="page-content">
  17.                         <div class="container-fluid clearfix">
  18.                             <div id="contenedor"> <!-- contenedor flex -->
  19.                                 {% if menuprincipal is defined %}
  20.                                     {% for item in menuprincipal %}
  21.                                         <div class="item">
  22.                                             <a href="{{ item.link }}">
  23.                                             <div class="contenido">
  24.                                                 <div>
  25.                                                     <!--<img src="{{ asset('build/iconos/Sombra Wishlist.png') }}" alt="">-->
  26.                                                 </div>
  27.                                                 <div>
  28.                                                     <img src="{{ asset("build/iconos/" ~ item.name ~ ".png") }}" alt="">
  29.                                                 </div>
  30.                                             </div>
  31.                                             </a>
  32.                                             {#<div class="details">
  33.                                                 <span><input type="checkbox" name="{{ typeName }}[{{ item.id }}]" value="{{ item.internalid }}">{{ translateItem(item.internalid)|title }}</span><br>
  34.                                                 <img src="{{ asset('build/iconos/baya.png') }}">{{ item.buy }}
  35.                                             </div>
  36.                                             #}
  37.                                         </div>
  38.                                     {% endfor %}
  39.                                 {% endif %}
  40.                                 <div class="clearfix"></div>
  41.                             </div>
  42.                             {% if maxPages is defined %}
  43.                             <div class="paginate">
  44.                                 {% if maxPages > 1 %}
  45.                                     {%if thisPage > 1 %}
  46.                                         {% if category is defined %}
  47.                                             <a href="{{ path('items_type_category', {idioma: idioma, type: typeName, currentPage: thisPage-1 < 1 ? 1 : thisPage-1, category: category}) }}"><i class="fas fa-angle-left"></i></a>
  48.                                         {% else %}
  49.                                             <a href="{{ path('items_type', {idioma: idioma, type: typeName, currentPage: thisPage-1 < 1 ? 1 : thisPage-1}) }}"><i class="fas fa-angle-left"></i></a>
  50.                                         {% endif %}
  51.                                     {% endif %}
  52.                                     {# Render each page number #}
  53.                                     {% for i in 1..maxPages %}
  54.                                         {% if i==thisPage %}
  55.                                             <a class="currentpage">{{ i }}</a>
  56.                                         {% else %}
  57.                                             {% if (maxPages>10 and i < thisPage+6 and i > thisPage-6) or (i < 9 and thisPage<9)   %}
  58.                                                 {% if category is defined %}
  59.                                                     <a href="{{ path('items_type_category', {idioma: idioma, type: typeName, currentPage: i, category: category}) }}">{{ i }}</a>
  60.                                                 {% else %}
  61.                                                     <a href="{{ path('items_type', {idioma: idioma, type: typeName, currentPage: i}) }}">{{ i }}</a>
  62.                                                 {% endif %}
  63.                                             {%  else %}
  64.                                             {% endif %}
  65.                                         {% endif %}
  66.                                     {% endfor %}
  67.                                     {# `ยป` arrow #}
  68.                                     {%if thisPage < maxPages %}
  69.                                         {% if category is defined %}
  70.                                             <a href="{{ path('items_type_category', {idioma: idioma, type: typeName, currentPage: thisPage+1 <= maxPages ? thisPage+1 : thisPage, category: category}) }}"><i class="fas fa-angle-right"></i></a>
  71.                                         {% else %}
  72.                                             <a href="{{ path('items_type', {idioma: idioma, type: typeName, currentPage: thisPage+1 <= maxPages ? thisPage+1 : thisPage}) }}"><i class="fas fa-angle-right"></i></a>
  73.                                         {% endif %}
  74.                                     {% endif %}
  75.                                 {% endif %}
  76.                                 {% endif %}
  77.                             </div>
  78.                         </div>
  79.                     </div>
  80.                 {% endblock %}
  81.             </div>
  82.         </div>
  83.     {% endblock %}
  84.     {% block javascripts %}
  85.         {{ encore_entry_script_tags('app') }}
  86.     {% endblock %}
  87. {% endblock %}