{% comment %} Image Preview Widget with Modal Zoom & Pan Uses Alpine.js for interactivity and Tailwind 4 for styling. Features: - Click thumbnail to open modal - Mouse wheel zoom - Drag to pan - Image info display - Keyboard navigation (Escape to close) - Dark/light theme support {% endcomment %} {% load i18n %}
{# Thumbnail Preview #}
{% if widget.image_url %} {% trans 'Preview' %} {# Zoom indicator on hover #}
zoom_in
{% else %}
image {% trans 'No image' %}
{% endif %}
{# File Input #}
{% include "django/forms/widgets/clearable_file_input.html" %}
{# Modal Overlay #}