fix(admin): move map scripts inline in template preview

Put Leaflet init scripts inside admin_content block instead of relying
on the scripts block inheritance chain through base_admin → base.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Deeman
2026-03-05 22:33:16 +01:00
parent 9515ec8ae9
commit e9b4faa05c

View File

@@ -28,13 +28,11 @@
{# Rendered article #}
<div class="card">
<h2 class="text-lg mb-4">Rendered HTML</h2>
<div class="prose" style="max-width: none;">
<div class="article-body" style="max-width: none;">
{{ preview.html | safe }}
</div>
</div>
{% endblock %}
{% block scripts %}
<script>window.LEAFLET_JS_URL = '{{ url_for("static", filename="vendor/leaflet/leaflet.min.js") }}';</script>
<script src="{{ url_for('static', filename='js/article-maps.js') }}"></script>
<script>window.LEAFLET_JS_URL = '{{ url_for("static", filename="vendor/leaflet/leaflet.min.js") }}';</script>
<script src="{{ url_for('static', filename='js/article-maps.js') }}"></script>
{% endblock %}