-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmexcrimespage.html
107 lines (98 loc) · 3.07 KB
/
mexcrimespage.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
{% load static%}
<link rel='stylesheet' href="{%static 'style.css'%}" type='text/css'>
<link href="https://fonts.googleapis.com/css?family=Montserrat|Oswald&display=swap" rel="stylesheet">
<title>Crimes Mexico City</title>
<style type="text/css">
h1 {
font-family: 'Oswald', sans-serif;
justify-content: left;
margin-top: 40px;
margin-bottom: 2.5rem;
font-size: 50px;
font-weight: bolder
}
.myButton {
box-shadow:inset 0px 1px 0px 0px #ffffff;
background:linear-gradient(to bottom, #ededed 5%, #dfdfdf 100%);
background-color:#ededed;
border-radius:6px;
border:1px solid #dcdcdc;
display:inline-block;
cursor:pointer;
color:#777777;
font-family:Arial;
font-size:15px;
font-weight:bold;
padding:6px 24px;
text-decoration:none;
text-shadow:0px 1px 0px #ffffff;
}
.myButton:hover {
background:linear-gradient(to bottom, #dfdfdf 5%, #ededed 100%);
background-color:#dfdfdf;
}
.myButton:active {
position:relative;
top:1px;
}
.jumbotron {
background-image: url("https://img.freepik.com/free-vector/elegant-white-background-with-shiny-lines_1017-17580.jpg?size=626&ext=jpg");
background-size: cover;
}
</style>
}
</head>
<body>
<div class="container">
<!--<h1>How risky is the place where I'm going?</h1>-->
<div class="jumbotron">
<h1>How risky is the place where I'm going?</h1>
</div>
<form method="get">
{% csrf_token %}
<table class="form">
{{ form }}
{{ form.media }}
</table>
<button class="myButton" type="submit">Submit</button>
</form>
{% if err %}
<div class="error">
{{ err|safe }}
</div>
{% endif %}
<div class="frame row">
{% if result != None %}
<div class="results row">
<!-- <h2> {{result}} </h2>-->
<!--<img src="{{IMAGE_URL_1}}"/>
<img src="{{IMAGE_URL_2}}"/>-->
<iframe src={{IMAGE_URL_1}} width="500" height="500" scrolling="no" style="overflow:hidden;"></iframe>
<iframe src={{IMAGE_URL_2}} width="500" height="500" scrolling="no" style="overflow:hidden;"></iframe>
<iframe src={{map1}} width="500" height="500"></iframe>
<iframe src={{map2}} width="500" height="500"></iframe>
</div>
</div>
{% endif %}
</div>
</div>
<script>
function activate_places(){
var defaultBounds = new google.maps.LatLngBounds(
new google.maps.LatLng(-99.597, 18.992),
new google.maps.LatLng(-98.606, 19.921));
var options = {bounds : defaultBounds,componentRestrictions: {"country": 'mx'}};
var location_input = document.getElementById('id_address');
var autocomplete = new google.maps.places.Autocomplete(location_input, options)
}
</script>
<script type="text/javascript"
src = "https://maps.googleapis.com/maps/api/js?key=YOURKEY&libraries=places&callback=activate_places" async defer>
</script>
</body>
</html>