mirror of
https://git.librezo.fr/Librezo/website.git
synced 2025-09-05 20:32:54 +02:00
Map: positions
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
<meta charset="utf-8"/>
|
||||
<title>{% block title %}{% endblock title %}</title>
|
||||
<link rel="stylesheet" href="/css/base.css"/>
|
||||
{% if page.extra.leaflet or section.extra.leaflet %}<link rel="stylesheet" href="/vendor/leaflet/leaflet.css"/>{% endif %}
|
||||
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico"/>
|
||||
<meta name="viewport" content="width=device-width"/>
|
||||
<meta name="robots" content="noindex,nofollow"/><!-- TODO remove this for production -->
|
||||
|
15
templates/shortcodes/map.html
Normal file
15
templates/shortcodes/map.html
Normal file
@ -0,0 +1,15 @@
|
||||
<div id="map" class="nn"></div>
|
||||
<script type="text/javascript" src="/vendor/leaflet/leaflet.js"></script>
|
||||
<script type="text/javascript">
|
||||
var map = L.map('map').setView([46.725, 2.834], 6);
|
||||
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
maxZoom: 10,
|
||||
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||
}).addTo(map);
|
||||
var places = [
|
||||
{{body|safe}}
|
||||
];
|
||||
for(i in places) {
|
||||
L.marker(places[i]).addTo(map);
|
||||
}
|
||||
</script>
|
Reference in New Issue
Block a user