index.ejs
3 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<% include ../partials/header %>
</head>
<!-- Homepage -->
<body>
<div class="container-fluid">
<div class="jumbotron text-center">
<h1>Safe Routes</h1>
<p>The best way to find the safest routes.</p>
</div>
<form action="/login">
<button type="submit" class="btn btn-primary">Log In</button>
<!-- <input type="submit" value="Submit"> -->
</form>
<!--What are for and type for?-->
<!-- current submit button takes you to the landing page -->
<form action="/landing">
<!-- First text field and label above the text field for current location -->
<div class="form-group text-center">
<label for="currentLocation">From</label>
<input type="currentLocation" class="form-control" id="origin" placeholder="Enter Current Location" onchange="saveFrom()">
</div>
<!-- Second text field and label above the text field for destination -->
<div class="form-group text-center">
<label for="destination">To</label>
<input type="destination" class="form-control" id="dest" placeholder="Enter Destination" onchange="saveTo()">
</div>
<!-- First travel option button, walking
This contains a row that holds buttons of type button. Buttons are highlighted upon selection.
-->
<div class="row">
<button type="button" class="btn-default img-thumbnail col-xs-4" onclick="walk();">
<img class="img-responsive" src="images/pedestrian-walking.svg" alt="Walking Option" width="40" height="40">
</button>
<!-- Second travel button, driving -->
<button type="button" class="btn-default img-thumbnail col-xs-4" onclick="drive();">
<img class="img-responsive" src="images/car-compact.svg" alt="Walking Option" width="40" height="40">
</button>
<!-- Third travel button, bus -->
<button type="button" class="btn-default img-thumbnail col-xs-4" onclick="bus();">
<img class="img-responsive" src="images/bus.svg" alt="Walking Option" width="40" height="40">
</button>
</div>
<div class="text-center">
<button type="submit" class="btn btn-primary btn-space">Go</button>
</div>
</form>
</div>
<!-- Google Map functionality. -->
<script>
function saveFrom() {
var fromInput = document.getElementById("origin").value;
localStorage.setItem("from", fromInput);
}
function saveTo() {
var toInput = document.getElementById("dest").value;
localStorage.setItem("to", toInput);
}
function walk() {
localStorage.setItem("mode", "WALKING");
}
function drive() {
localStorage.setItem("mode", "DRIVING");
}
function bus() {
localStorage.setItem("mode", "TRANSIT");
}
function login(){
}
</script>
</body>
</html>