nuitdelinfo_2021/templates/index.html
flifloo 5771853cdc Merge branch 'master' into kybo
# Conflicts:
#	templates/base.html
2021-12-03 04:55:50 +01:00

43 lines
No EOL
1.6 KiB
HTML

{% extends 'base.html' %}
{% load static %}
{% block content %}
<h1>Les sauveteurs du Dunkerquois</h1>
<section>
<h2>Carte dynamique</h2>
<div id="map" style="width:100%; height:60%"></div>
<!-- <img class="map" src="{% static 'images/map.png' %}"> -->
</section>
<section>
<h2>Articles récents</h2>
<div class="flex-card">
{% for rescue in rescues %}
<div class="card">
<div class="inner">
<div class="img-container">
<img src="{% static 'images/sauvetage.png' %}">
</div>
<div class="content">
<p class="date">{{ rescue.date }}</p>
<p class="titre">{{ rescue.name }}</p>
<a class="btn" href="/a/{{ rescue.pk }}">Voir l'article</a>
</div>
</div>
</div>
{% endfor %}
</div>
</section>
<script src="https://unpkg.com/leaflet@1.6.0/dist/leaflet.js" integrity="sha512-gZwIG9x3wUXg2hdXF6+rVkLF/0Vi9U8D2Ntg4Ga5I5BZpVkVxlJWbSQtXPSiUTtC0TjtGOmxa1AJPuV0CPthew==" crossorigin=""></script>
<script>
let map = L.map('map').setView([51.127, 2.253], 7);
let osmLayer = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '© OpenStreetMap contributors',
maxZoom: 19
});
L.marker([48.5, -0.09]).addTo(map).bindPopup('<a href="/a/1/">Sauvetage de mer</a>');
map.addLayer(osmLayer);
</script>
{% include 'quicksearch.html' %}
{% endblock %}