Add modal for viewing photos by clicking thumbnail.
This commit is contained in:
parent
7bdbb4ea2a
commit
84db8592cb
1 changed files with 11 additions and 2 deletions
|
@ -4,8 +4,17 @@
|
|||
<!-- Image fragment -->
|
||||
<div class="image-slot text-center">
|
||||
{% if image %}
|
||||
<img src="{{ url_for('static', filename=image.filename) }}" alt="Photo of ID {{ id }}" class="img-thumbnail"
|
||||
style="max-height: 256px;">
|
||||
<img src="{{ url_for('static', filename=image.filename) }}" alt="Image of ID {{ id }}" class="img-thumbnail"
|
||||
style="max-height: 256px;" data-bs-toggle="modal" data-bs-target="#imageModal-{{ id }}">
|
||||
<div class="modal fade" id="imageModal-{{ id }}" tabindex="-1">
|
||||
<div class="modal-dialog modal-dialog-centered modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body text-center">
|
||||
<img src="{{ url_for('static', filename=image.filename) }}" alt="Image of ID {{ id }}" class="img-fluid">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<a href="#" class="link-secondary" onclick="document.getElementById('image-upload-input-{{ id }}').click(); return false;">
|
||||
{{ icons.render_icon('image', 256) }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue