mirror of
https://github.com/ProjectSynthoria/SynthoriaArchive.git
synced 2025-03-12 15:26:56 +02:00
templates: move icon_dir set outside of the loop
Someone put this inside the loop despite it essentially being constant. Probably makes immeasurably little difference perf-wise, but why not fix it anyway.
This commit is contained in:
parent
8365894268
commit
a6d800b4ca
1 changed files with 1 additions and 1 deletions
|
@ -55,11 +55,11 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
{% set icon_dir = config.SITE_FLAVOR %}
|
||||||
{% set torrents = torrent_query if use_elastic else torrent_query.items %}
|
{% set torrents = torrent_query if use_elastic else torrent_query.items %}
|
||||||
{% for torrent in torrents %}
|
{% for torrent in torrents %}
|
||||||
<tr class="{% if torrent.deleted %}deleted{% elif torrent.hidden %}warning{% elif torrent.remake %}danger{% elif torrent.trusted %}success{% else %}default{% endif %}">
|
<tr class="{% if torrent.deleted %}deleted{% elif torrent.hidden %}warning{% elif torrent.remake %}danger{% elif torrent.trusted %}success{% else %}default{% endif %}">
|
||||||
{% set cat_id = use_elastic and ((torrent.main_category_id|string) + '_' + (torrent.sub_category_id|string)) or torrent.sub_category.id_as_string %}
|
{% set cat_id = use_elastic and ((torrent.main_category_id|string) + '_' + (torrent.sub_category_id|string)) or torrent.sub_category.id_as_string %}
|
||||||
{% set icon_dir = config.SITE_FLAVOR %}
|
|
||||||
<td style="padding:0 4px;">
|
<td style="padding:0 4px;">
|
||||||
{% if use_elastic %}
|
{% if use_elastic %}
|
||||||
<a href="{{ url_for('main.home', c=cat_id) }}" title="{{ category_name(cat_id) }}">
|
<a href="{{ url_for('main.home', c=cat_id) }}" title="{{ category_name(cat_id) }}">
|
||||||
|
|
Loading…
Add table
Reference in a new issue