feat: allow to inject a header.html template

Useful to add scripts integration like Sentry
This commit is contained in:
David Larlet 2024-02-06 12:45:40 -05:00
parent 2b08d499ac
commit 1ee9d7dd52
No known key found for this signature in database
GPG key ID: 3E2953A359E7E7BD
5 changed files with 4 additions and 0 deletions

View file

@ -12,6 +12,7 @@
content="{% trans "uMap lets you create maps with OpenStreetMap layers in a minute and embed them in your site." %}"> content="{% trans "uMap lets you create maps with OpenStreetMap layers in a minute and embed them in your site." %}">
<meta name="keywords" content="map, umap"> <meta name="keywords" content="map, umap">
{% block extra_head %} {% block extra_head %}
{% include "umap/header.html" %}
{% endblock extra_head %} {% endblock extra_head %}
<meta name="viewport" <meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

View file

@ -2,6 +2,7 @@
{% load umap_tags i18n %} {% load umap_tags i18n %}
{% block extra_head %} {% block extra_head %}
{% umap_css %} {% umap_css %}
{{ block.super }}
{% endblock extra_head %} {% endblock extra_head %}
{% block body_class %} {% block body_class %}
login login

View file

@ -5,6 +5,7 @@
{% endblock body_class %} {% endblock body_class %}
{% block extra_head %} {% block extra_head %}
{% umap_css %} {% umap_css %}
{{ block.super }}
{% umap_js %} {% umap_js %}
{% endblock extra_head %} {% endblock extra_head %}
{% block header %} {% block header %}

View file

View file

@ -13,6 +13,7 @@
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% umap_css %} {% umap_css %}
{{ block.super }}
{% umap_js locale=locale %} {% umap_js locale=locale %}
{% if object.share_status != object.PUBLIC %}<meta name="robots" content="noindex">{% endif %} {% if object.share_status != object.PUBLIC %}<meta name="robots" content="noindex">{% endif %}
<link rel="alternate" type="application/json+oembed" <link rel="alternate" type="application/json+oembed"