-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
110 lines (106 loc) · 4.88 KB
/
index.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
108
109
110
<!DOCTYPE html>
<html>
<head>
<title>ScriptyJav</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<button class="toggle-nav-button" data-bind="click: $root.toggleNav"></button>
<div class="container">
<div class="side-panel">
<div class="options">
<h1 data-bind="click: $root.toggleNav">Navigate</h1>
<h4>Filter locations:</h4>
<div class="flex-row">
<input id="filterLocs" data-bind="textInput: searchInput" placeholder="Filter Locations">
<button class="btn-block" data-bind="click: function() { $root.toggleDrawing(); $root.toggleNav() }">Draw</button>
</div>
<h4>Where will you start your journey?</h4>
<div class="flew-row">
<input id="places-search" placeholder="Search for places">
<button class="btn-block" data-bind="click: function(){ $root.resetRoute(); $root.searchPlaces() }">Find</button>
</div>
<div class="selectedStart">
<p><b data-bind="visible: selectedStart">You have selected:</b><span data-bind="text: selectedStart().title"></span></p> <hr>
</div>
<div class="flex-row">
<button class="btn-block" data-bind="click: function() { $root.getRoute(); $root.toggleNav() }">Get route</button>
<button class="btn-block" data-bind="click: $root.resetRoute">Reset route</button>
</div>
</div>
<hr>
<div class="results">
<h1>Results</h1>
<table class="resultsTable">
<!-- Foreach feature here -->
<tbody data-bind="foreach: filteredLocations">
<tr style="cursor: pointer;" data-bind="click: locationClicked" class="resultHeader">
<td data-bind="text: title"></td>
<td style="text-align: right;">-</td>
</tr>
<!-- If clicked, a dropdown info will be displayed -->
<tr class="resultDetails" data-bind="visible: showDropdown, website.length > 1">
<td>Website:</td>
<td><a data-bind="attr: { href: website }, text: website"></a></td>
</tr>
<tr class="resultDetails" data-bind="visible: showDropdown, address.length > 1">
<td>Address: </td>
<td data-bind="text: address"></td>
</tr>
<tr class="resultDetails bottomResult" data-bind="visible: showDropdown, phone.length > 1">
<td>Phone</td>
<td data-bind="text: phone"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="map"></div>
<div id="google-map-overlay"></div>
</div>
<footer class="footer">
Made by Anders L. Hurum | <button id="myBtn">Join the discussion</button>
</footer>
<!-- The disqus modal -->
<div id="myModal" class="modal">
<div class="modal-content">
<span class="close">×</span>
<div id="disqus_thread"></div>
<script>
try {
/**
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/
/*
var disqus_config = function () {
this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
*/
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = 'https://scriptyjav.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
} catch (err) {
alert("An error occured in loading the Disqus API : \n" + err);
}
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</div>
</div>
<script src="js/lib/jquery.js"></script>
<script src="js/lib/knockout-3.4.2.js"></script>
<script src="js/mapstyles.js"></script>
<script src="js/mapsmanager.js"></script>
<script src="js/app.js"></script>
<script src="js/disqusModal.js"></script>
<script async defer
src="https://maps.googleapis.com/maps/api/js?libraries=geometry,drawing,places&v=3&key=AIzaSyDVvFVhmOSWL2AULtvp2Hzgqo0Dp5OR_mM&callback=initApp" onerror="errorHandler()">
</script>
</body>
</html>