-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
93 lines (73 loc) · 2.91 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <!--for ie 8 both bootstrap and riotjs-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<!--link rel="icon" href="favicon.ico"-->
<title>TZ Store List</title>
<style>
html, body {
height: 100%;
margin: 0;
padding: 0;
}
#map {
height: 30%;
}
</style>
<link href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.15.0/vis.min.css" rel="stylesheet" type="text/css" />
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-73278529-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-73278529-2');
</script>
</head>
<body>
<!--navbar-top></navbar-top-->
<div id="map"></div>
<main id='main'></main>
<script src="https://cdnjs.cloudflare.com/ajax/libs/riot/2.3.16/riot+compiler.min.js"></script>
<!--script src="tags/navbar-top.tag" type="riot/tag"></script-->
<script src="main.tag" type="riot/tag"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/suncalc/1.7.0/suncalc.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.15.0/vis.min.js"></script>
<script src="data.js"></script><!--after moment is loaded-->
<script>
var auth = riot.observable();
//riot.mount('navbar-top');
var currentTag = null
function mount (tag, options) {
//console.log('trying to unmount...')
//console.log(currentTag);
currentTag && currentTag.unmount(true);
//console.log("mounting:" + tag + " with opts:")
//console.log(options);
currentTag = riot.mount('#main', tag, options);
if(currentTag && currentTag[0]) currentTag=currentTag[0];
//if(currentTag) {console.log("mounted:"); console.log(currentTag)}
//else console.log("mounted but no response..?")
}
function router (section, action, uid, data) {
//http://suncalc.net/#/31.8772,35.2402,18/2016.03.02/20:46
//console.log("executed route callback with: " + section +' / '+ action +' / '+ uid + ' / ' + data)
if(""==section) {section = 'main'; mount('main');}
else if ("auth"==section) mount('auth',{action:action, uid:uid, data:data});
else console.log("404 no section found");
auth.trigger('switchPage',section);
auth.currentPage=section;
}
riot.route.stop() // clear all the old riot.route callbacks
riot.route(router);
riot.route.start(true) // start again
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDP4Qy6nKQwdg8uPO-uaBpV_mx3ynMU264"></script>
</body>
</html>