fix: restore hero OOB swap after gallery innerHTML fix
This commit is contained in:
parent
1a9aa24ebf
commit
6e2f477c09
1 changed files with 12 additions and 0 deletions
|
|
@ -45,3 +45,15 @@
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% if request.htmx %}
|
||||||
|
<div id="plant-hero-container" hx-swap-oob="true">
|
||||||
|
{% if plant.species and plant.species.api_image_url %}
|
||||||
|
<img src="{{ plant.species.api_image_url }}" class="plant-hero rounded mb-3" alt="{{ plant.species.common_name }}">
|
||||||
|
{% elif plant.thumbnail_url %}
|
||||||
|
<img src="{{ plant.thumbnail_url }}" class="plant-hero rounded mb-3" alt="{{ plant.name }}">
|
||||||
|
{% else %}
|
||||||
|
<div class="plant-hero-placeholder rounded mb-3">🌿</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue