This commit is contained in:
afornerot 2024-11-01 10:20:15 +01:00
parent d7fb1af826
commit e383dd8b83
1 changed files with 15 additions and 3 deletions

View File

@ -249,11 +249,22 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if (loop.index - 1) % 8 == 0 %} {% if loop.index == 1 %}
{% set classmini = 'grid-item-mini-50' %}
{% elseif loop.index % 8 == 0 %}
{% set classmini = 'grid-item-mini-50' %} {% set classmini = 'grid-item-mini-50' %}
{% else %} {% else %}
{% set classmini = 'grid-item-mini-25' %} {% set classmini = 'grid-item-mini-25' %}
{% endif %} {% endif %}
{% set position = (loop.index - 1) % 10 + 1 %}
{% if position == 1 or position == 8 %}
{% set classmini = 'grid-item-mini-50' %}
{% else %}
{% set classmini = 'grid-item-mini-25' %}
{% endif %}
{% elseif appthumbwidth==1 %} {% set class="" %} {% elseif appthumbwidth==1 %} {% set class="" %}
{% elseif appthumbwidth==2 %} {% set class="grid-item-size-2" %} {% elseif appthumbwidth==2 %} {% set class="grid-item-size-2" %}
{% endif %} {% endif %}
@ -270,9 +281,10 @@
{% if appthumbheight!=0 %} {% if appthumbheight!=0 %}
{% set source="thumbori_"~illustration.illustration %} {% set source="thumbori_"~illustration.illustration %}
{% endif %} {% endif %}
<a href="{{ path("app_illustration_view",{"by":"user","idcat":category.id,"id":illustration.id}) }}"> <a href="{{ path("app_illustration_view",{"by":"user","idcat":category.id,"id":illustration.id}) }}">
<div id="illustration{{illustration.id}}" class="grid-item grid-item-size {{class}} {{classmini}} cssfilter cssfilter-{{category.id}} no-cache-bg" data-width="{{illustration.width}}" data-background-image="/{{ appAlias }}/uploads/illustration/{{source}}" data-height="{{illustration.height}}" style="height:auto;background-position: center ; background-size: cover; background-image: url(/{{ appAlias }}/uploads/illustration/{{source}}");"> <div id="illustration{{illustration.id}}" data-position="{{position}}" data-loop="{{loop.index}}" class="grid-item grid-item-size {{class}} {{classmini}} cssfilter cssfilter-{{category.id}} no-cache-bg" data-width="{{illustration.width}}" data-background-image="/{{ appAlias }}/uploads/illustration/{{source}}" data-height="{{illustration.height}}" style="height:auto;background-position: center ; background-size: cover; background-image: url(/{{ appAlias }}/uploads/illustration/{{source}}");">
</div> </div>
</a> </a>
{% endfor %} {% endfor %}