From 1c9e2865ce8c6ab51b2fa3e43d3661089e7b7eb8 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Fri, 16 Jun 2023 11:25:29 +0200 Subject: [PATCH 1/1] polishing map fixes --- src/references/templates/references/map.html | 3 +++ src/references/templates/references/popup.html | 1 - src/references/views.py | 2 -- src/wolnelektury/static/2022/styles/pages/_map.scss | 5 +++++ 4 files changed, 8 insertions(+), 3 deletions(-) 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; -- 2.20.1