Missing logos.
[wolnelektury.git] / src / references / templates / references / map.html
index 7cd391c..c067f49 100644 (file)
@@ -1,4 +1,5 @@
-{% extends "2022/base.html" %}
+{% extends "base.html" %}
+{% load cache %}
 {% load static %}
 {% load l10n %}
 
   <link rel="stylesheet" type="text/css" media="all" href="{% static 'contrib/leaflet-1.9.4/leaflet.css' %}">
   <link rel="stylesheet" type="text/css" media="all" href="{% static 'contrib/leaflet.markercluster-1.4.1/MarkerCluster.css' %}">
   <link rel="stylesheet" type="text/css" media="all" href="{% static 'contrib/leaflet.markercluster-1.4.1/MarkerCluster.Default.css' %}">
+  <meta property="og:type" content="website">
+  <meta property="og:title" content="Mapa Wolnych Lektur">
+  <meta property="og:image" content="{% static 'references/preview.png' %}">
+  <meta property="og:image:alt" content="Mapa miejsc w książkach na Wolnych Lekturach">
+  <meta property="og:image:width" content="1200">
+  <meta property="og:image:height" content="630">
+
 {% endblock %}
 
 
@@ -21,6 +29,7 @@
   <script src="{% static 'contrib/leaflet.markercluster-1.4.1/leaflet.markercluster.js' %}"></script>
   <script>
    var map = L.map('references-map').setView([52, 20], 7);
+   L.Icon.Default.imagePath='{{ STATIC_URL }}contrib/leaflet-1.9.4/images/'
 
    if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(function(position) {
@@ -48,6 +57,7 @@
        );
    }
 
+   {% cache 60 references-map %}
    {% localize off %}
    {% for e in entities %}
    L.marker(
@@ -60,6 +70,7 @@
    ).on('click', showMarker).addTo(markers);
    {% endfor %}
    {% endlocalize %}
+   {% endcache %}
 
    map.addLayer(markers);