haldis/app/templates/maps.html
mcbloch d0863325a5
Restructuring the codebase!
But for real, it's a real shitstorm in there.
- Added context by making the init go through a function
  and not implicitly happen via imports
- Fixup all context and contextless function mixups
- splitup the models in sensible different files
- give the dump of view functions in views/__init__.py their own file
- add all routes via blueprints, not half of them
- move the slack notifications function and class to its own file,
    no idea what it was doing in a views file in the first place.
2019-08-28 03:46:04 +02:00

42 lines
960 B
HTML

{% extends "layout.html" %}
{% set active_page = "map" -%}
{% import "utils.html" as util %}
{% block container %}
<div id="mapid" class="large-map"></div>
{% endblock %}
{% block styles %}
{{ super() }}
<link rel="stylesheet" href="{{ url_for('static', filename='css/leaflet.css') }}">
<link rel="stylesheet" href="{{url_for('static', filename='css/map.css')}}">
{% endblock %}
{% block scripts %}
{{super()}}
<script src="{{ url_for('static', filename='js/leaflet.js')}}"></script>
<script src="{{ url_for('static', filename='js/map.js' ) }}"></script>
<script>
let locations = [];
let loc = {};
{% for loc in locations -%}
{% if loc.address %}
loc = {
"address": "{{loc.address}}",
"name": "{{loc.name}}",
"url": "{{ url_for('general_bp.location', id=loc.id) }}"
};
locations.push(loc);
{% endif %}
{%- endfor %}
map.setView([51.0231119, 3.7102741], 14);
loadmap(locations);
</script>
{% endblock %}