add base map

This commit is contained in:
Matteo Rosati
2026-02-11 00:19:38 +01:00
parent 85efbf4093
commit 160a8bf020
4 changed files with 107 additions and 45 deletions

View File

@@ -9,14 +9,26 @@
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="{% static 'frontend/css/base.css' %}">
{% block extra_css %}{% endblock %}
<script
src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.8/dist/htmx.min.js"
integrity="sha384-/TgkGk7p307TH7EXJDuUlgG3Ce1UVolAOFopFekQkkXihi5u/6OCvVKyz1W+idaz"
<link rel="stylesheet" href="{% static 'frontend/css/reset.css' %}">
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/maplibre-gl/5.7.3/maplibre-gl.min.css"
integrity="sha512-/UDhp6sLyQgK2cEDHUYEyJFXI7+WgJ+nuxTqETJkT8XlfLiMSt2xQblBVnCjE5rGJMBr5sOWaEhflmtBL1Psww=="
crossorigin="anonymous"
></script>
referrerpolicy="no-referrer"
/>
{% block extra_css %}{% endblock %}
<script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.8/dist/htmx.min.js" integrity="sha384-/TgkGk7p307TH7EXJDuUlgG3Ce1UVolAOFopFekQkkXihi5u/6OCvVKyz1W+idaz" crossorigin="anonymous"></script>
{% block js_top %}{% endblock %}
</head>
<body>
{% block content %} {% endblock %}
<script
src="https://cdnjs.cloudflare.com/ajax/libs/maplibre-gl/5.7.3/maplibre-gl.min.js"
integrity="sha512-Gx0xDElSrwjxjT9mjMg+OsoA0ekI8IkwuPurccWk5afkFBzXQHE0eQsQ7syopu9MJ0HD1EYGmVXjY8SPZt5FAg=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
></script>
{% block js_bottom %}{% endblock %}
</body>
</html>

View File

@@ -3,8 +3,16 @@
{% block title %}Home{% endblock %}
{% block content%}
<div class="home">
<h1>Ciao</h1>
<p>Static CSS is wired up through WhiteNoise. Tweak this file to verify changes.</p>
</div>
<div id="map"></div>
{% endblock %}
{% block js_bottom %}
<script>
var map = new maplibregl.Map({
container: 'map',
style: 'https://api.maptiler.com/maps/019be805-c88e-7c8b-9850-bc704d72e604/style.json?key=8nmgHEIZQiIgqQj3RZNa',
center: [-74.5, 40],
zoom: 9
});
</script>
{% endblock %}