{% extends 'base.html.twig' %}
{% block title %}Items!{% endblock %}
{% block body %}
{% block header %}
{% set menu = 'foo' %}
{{ parent() }}
{% endblock %}
{% block content %}
<div id="main" role="main" class="container-fluid">
<!-- contained-->
<div class="contained">
{% block aside %}
{% include 'aside.html.twig' %}
{% endblock %}
{% block principal %}
<div id="page-content">
<div class="container-fluid clearfix">
<div id="contenedor"> <!-- contenedor flex -->
{% if menuprincipal is defined %}
{% for item in menuprincipal %}
<div class="item">
<a href="{{ item.link }}">
<div class="contenido">
<div>
<!--<img src="{{ asset('build/iconos/Sombra Wishlist.png') }}" alt="">-->
</div>
<div>
<img src="{{ asset("build/iconos/" ~ item.name ~ ".png") }}" alt="">
</div>
</div>
</a>
{#<div class="details">
<span><input type="checkbox" name="{{ typeName }}[{{ item.id }}]" value="{{ item.internalid }}">{{ translateItem(item.internalid)|title }}</span><br>
<img src="{{ asset('build/iconos/baya.png') }}">{{ item.buy }}
</div>
#}
</div>
{% endfor %}
{% endif %}
<div class="clearfix"></div>
</div>
{% if maxPages is defined %}
<div class="paginate">
{% if maxPages > 1 %}
{%if thisPage > 1 %}
{% if category is defined %}
<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>
{% else %}
<a href="{{ path('items_type', {idioma: idioma, type: typeName, currentPage: thisPage-1 < 1 ? 1 : thisPage-1}) }}"><i class="fas fa-angle-left"></i></a>
{% endif %}
{% endif %}
{# Render each page number #}
{% for i in 1..maxPages %}
{% if i==thisPage %}
<a class="currentpage">{{ i }}</a>
{% else %}
{% if (maxPages>10 and i < thisPage+6 and i > thisPage-6) or (i < 9 and thisPage<9) %}
{% if category is defined %}
<a href="{{ path('items_type_category', {idioma: idioma, type: typeName, currentPage: i, category: category}) }}">{{ i }}</a>
{% else %}
<a href="{{ path('items_type', {idioma: idioma, type: typeName, currentPage: i}) }}">{{ i }}</a>
{% endif %}
{% else %}
{% endif %}
{% endif %}
{% endfor %}
{# `ยป` arrow #}
{%if thisPage < maxPages %}
{% if category is defined %}
<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>
{% else %}
<a href="{{ path('items_type', {idioma: idioma, type: typeName, currentPage: thisPage+1 <= maxPages ? thisPage+1 : thisPage}) }}"><i class="fas fa-angle-right"></i></a>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
</div>
</div>
</div>
{% endblock %}
</div>
</div>
{% endblock %}
{% block javascripts %}
{{ encore_entry_script_tags('app') }}
{% endblock %}
{% endblock %}