41 lines
1.6 KiB
HTML
41 lines
1.6 KiB
HTML
<!-- /app/templates/_gallery_item.html -->
|
|
<div class="gallery-item img-clickable"
|
|
data-id="{{ image.id }}"
|
|
data-full="{{ url_for('main.serve_image', filename=image.filepath | replace('/images/', '') ) }}"
|
|
data-type="{{ 'video' if image.filename.lower().endswith(('.mp4', '.mov')) else 'image' }}"
|
|
data-filename="{{ image.filename }}">
|
|
|
|
<div class="gallery-thumb"
|
|
style="background-image: url('{{ url_for('main.serve_image', filename=(image.thumb_path or image.filepath) | replace('/images/', '') ) }}');"></div>
|
|
|
|
{% set visible_tags = image.tags | selectattr('kind', 'ne', 'archive') | list %}
|
|
{% if visible_tags %}
|
|
<div class="tag-overlay">
|
|
{% for t in visible_tags %}
|
|
<a class="tag-chip"
|
|
href="{{ url_for('main.gallery', tag=t.name) }}"
|
|
title="Filter by {{ t.name }}"
|
|
onclick="event.stopPropagation()">
|
|
{% if t.kind == 'artist' %}
|
|
{{ t.name.split(':', 1)[1] if ':' in t.name else t.name }}
|
|
{% elif t.kind == 'character' %}
|
|
{{ t.name.split(':', 1)[1] if ':' in t.name else t.name }}
|
|
{% elif t.kind == 'series' %}
|
|
{{ t.name.split(':', 1)[1] if ':' in t.name else t.name }}
|
|
{% elif t.kind == 'rating' %}
|
|
{{ t.name.split(':', 1)[1] if ':' in t.name else t.name }}
|
|
{% else %}
|
|
#{{ t.name }}
|
|
{% endif %}
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if image.filename.lower().endswith(('.mp4', '.mov')) %}
|
|
<div class="play-overlay"></div>
|
|
{% endif %}
|
|
|
|
<span class="image-date">{{ image.taken_at or image.imported_at | datetimeformat }}</span>
|
|
</div>
|