Map: replace Leaflet's default marker with a divIcon SVG pin coloured per state — green when the user has already successfully applied (status.chip === "ok"), brand-blue otherwise. Same condition also hides the action buttons in the popup, matching the list view, which already hid both Bewerben and Ablehnen on success — so the only remaining action on an applied flat is opening the original ad link. Image gallery: clicks now open a global lightbox modal instead of a new tab. The viewer fits each image into the viewport via max-width/height + object-fit: contain (uniform sizing regardless of source aspect), shows × top-right, prev/next arrows on the sides, ←/→/Esc keyboard nav, and click-on-backdrop to close. Prev arrow is hidden on the first image and next on the last. Tile changes from <a target="_blank"> to <button> since the new-tab fallback is no longer wanted. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
27 lines
1.1 KiB
HTML
27 lines
1.1 KiB
HTML
{# Expanded detail for a single flat — only shows downloaded images. #}
|
|
{% if enrichment_status == 'pending' %}
|
|
<div class="px-4 py-5 text-sm text-slate-500">Bilder werden abgerufen…</div>
|
|
{% elif enrichment_status == 'failed' %}
|
|
<div class="px-4 py-5 text-sm text-slate-500">
|
|
Bilder konnten nicht geladen werden.
|
|
<a href="{{ flat.link }}" target="_blank" rel="noopener" class="ml-1">Zur Original-Anzeige →</a>
|
|
</div>
|
|
{% elif image_urls %}
|
|
<div class="px-4 py-4 space-y-3">
|
|
<div class="flat-gallery">
|
|
{% for src in image_urls %}
|
|
<button type="button" class="flat-gallery-tile" data-full-src="{{ src }}" aria-label="Foto {{ loop.index }} öffnen">
|
|
<img src="{{ src }}" loading="lazy" alt="Foto {{ loop.index }}">
|
|
</button>
|
|
{% endfor %}
|
|
</div>
|
|
<div class="text-xs">
|
|
<a href="{{ flat.link }}" target="_blank" rel="noopener">Zur Original-Anzeige →</a>
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<div class="px-4 py-5 text-sm text-slate-500">
|
|
Keine Bilder gefunden.
|
|
<a href="{{ flat.link }}" target="_blank" rel="noopener" class="ml-1">Zur Original-Anzeige →</a>
|
|
</div>
|
|
{% endif %}
|