feat: Add bulma map
This commit is contained in:
parent
f79bb355cf
commit
93dd0ae4f6
@ -0,0 +1,9 @@
|
||||
{% extends "fellchensammlung/base_bulma.html" %}
|
||||
{% load i18n %}
|
||||
{% block title %}<title>{% translate "Karte" %}</title>{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="section" style="height:70vh">
|
||||
{% include "fellchensammlung/partials/bulma-partial-map.html" %}
|
||||
</div>
|
||||
{% endblock %}
|
@ -10,7 +10,7 @@
|
||||
<script src="{% static 'fellchensammlung/js/turf.min.js' %}"></script>
|
||||
|
||||
<!-- add container for the map -->
|
||||
<div id="map" style="width:100%;aspect-ratio:16/9"></div>
|
||||
<div id="map" style="width:100%;aspect-ratio:16/9;height:100%"></div>
|
||||
|
||||
<!-- start map -->
|
||||
<script>
|
||||
|
@ -49,6 +49,8 @@ urlpatterns = [
|
||||
path("suchen/<slug:important_location_slug>", views.search_important_locations, name="search-by-location"),
|
||||
# ex: /map/
|
||||
path("map/", views.map, name="map"),
|
||||
# ex: /map/
|
||||
path("bulma/map/", views.map_bulma, name="map-bulma"),
|
||||
# ex: /vermitteln/
|
||||
path("vermitteln/", views.add_adoption_notice, name="add-adoption"),
|
||||
|
||||
|
@ -587,10 +587,14 @@ def updatequeue(request):
|
||||
return render(request, 'fellchensammlung/updatequeue.html', context=context)
|
||||
|
||||
|
||||
def map(request):
|
||||
def map(request, templatename='fellchensammlung/map.html'):
|
||||
adoption_notices = AdoptionNotice.get_active_ANs()
|
||||
context = {"adoption_notices_map": adoption_notices}
|
||||
return render(request, 'fellchensammlung/map.html', context=context)
|
||||
return render(request, templatename, context=context)
|
||||
|
||||
|
||||
def map_bulma(request):
|
||||
return map(request, templatename='fellchensammlung/bulma-map.html')
|
||||
|
||||
|
||||
def metrics(request):
|
||||
|
Loading…
x
Reference in New Issue
Block a user