Update frontend and forms

This commit is contained in:
Livvy Mackintosh
2017-11-18 16:54:44 +00:00
parent aa6c1cf33b
commit 310be805c5
16 changed files with 712 additions and 128 deletions

View File

@ -2,19 +2,26 @@
{% load bootstrap3 %}
{% load i18n %}
{% load leaflet_tags %}
{% load static %}
{% block stylesheets %}
{{ block.super }}
{% leaflet_css %}
<style> html, body, #main { width: 100; height:100%; } </style>
<style>
html, body, #main {
width: 100; height:100%;
}
.leaflet-popup-content > a{
color: #fff;
}
</style>
{% endblock %}
{% block title %}{% trans "Ojuso Platform Map" %}{% endblock %}
{% block content %}
{% block inner_content %}
<div id="main"></div>
<div id="modals"></div>
{% endblock %}
@ -23,6 +30,7 @@
{% block scripts %}
{% leaflet_map "main" callback="main_app_init" creatediv=False %}
{% leaflet_js %}
<script type="text/javascript" src="{% static 'map/plugins/leaflet-hash.js' %}"></script>
<script type="text/javascript">
// This takes HTML as a string and returns an element
@ -38,7 +46,7 @@
// This is called when the map is initialized
function main_app_init(map, options) {
var hash = new L.hash(map);
// Pull data as GeoJSON and add to map with a modal
$.getJSON('/api/case-studies/', function (data) {
L.geoJson(data, {