From: Radek Czajka Date: Fri, 16 Jun 2023 09:25:29 +0000 (+0200) Subject: polishing map fixes X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/1c9e2865ce8c6ab51b2fa3e43d3661089e7b7eb8?ds=inline;hp=6dc65dcaa0245bfb27f1a857016b8c25f8214557 polishing map fixes --- diff --git a/src/references/templates/references/map.html b/src/references/templates/references/map.html index 04d3e8052..b182b9cb9 100644 --- a/src/references/templates/references/map.html +++ b/src/references/templates/references/map.html @@ -1,4 +1,5 @@ {% extends "2022/base.html" %} +{% load cache %} {% load static %} {% load l10n %} @@ -55,6 +56,7 @@ ); } + {% cache 60 references-map %} {% localize off %} {% for e in entities %} L.marker( @@ -67,6 +69,7 @@ ).on('click', showMarker).addTo(markers); {% endfor %} {% endlocalize %} + {% endcache %} map.addLayer(markers); diff --git a/src/references/templates/references/popup.html b/src/references/templates/references/popup.html index f4ac1f0ec..f8977e6d8 100644 --- a/src/references/templates/references/popup.html +++ b/src/references/templates/references/popup.html @@ -7,7 +7,6 @@
{% for ref in entity.reference_set.all %} -
diff --git a/src/references/views.py b/src/references/views.py index ae4e5fae1..3c12c8f46 100644 --- a/src/references/views.py +++ b/src/references/views.py @@ -27,8 +27,6 @@ def pin_map_tagged(request, tags): }) - -@never_cache def popup(request, pk): e = get_object_or_404(models.Entity, pk=pk) return render(request, 'references/popup.html', { diff --git a/src/wolnelektury/static/2022/styles/pages/_map.scss b/src/wolnelektury/static/2022/styles/pages/_map.scss index 32b73f503..a7c2e8fb5 100644 --- a/src/wolnelektury/static/2022/styles/pages/_map.scss +++ b/src/wolnelektury/static/2022/styles/pages/_map.scss @@ -20,6 +20,11 @@ gap: 5px; max-height: 350px; overflow-y: scroll; + + margin-left: -10px; + margin-right: -10px; + padding-left: 10px; + padding-right: 10px; } .l-popup-books img { display: block;