-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
81 lines (69 loc) · 2.66 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
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<!-- Use the .htaccess and remove these lines to avoid edge case issues.
More info: h5bp.com/i/378 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Phenological Clock</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<!-- build:css css/styles.min.css -->
<link rel="stylesheet" href="css/styles.css">
<link rel="stylesheet" href="libraries/avgrund/avgrund.css">
<!-- endbuild -->
</head>
<body>
<div id="data-source-selection-modal" class="avgrund-popup">
<!-- Insert fallback content here -->
<input type="text" placeholder="Enter a google docs spreadsheet key.">
<input type="text" placeholder="Enter which sheet you want.">
<a href="#" id="data-source-modal-close">Close</a>
</div>
<div id="main" role="main">
<div id="pClock">
<div id="paper"></div>
<div id="chrome"></div>
<!-- Insert fallback content here -->
</div>
</div>
<footer id="footer">
<a href="#" id="data-modal-actuator">Change Sheet</a>
</footer>
<script src="libraries/raphael/raphael-min.js"></script>
<!-- keep these comments here they are needed for grunt -->
<!-- build:js js/pClock.pkg.min.js -->
<script src="libraries/mousetrap.min.js"></script>
<script src="libraries/avgrund/avgrund.js"></script>
<script src="js/pclock.utils.js"></script>
<script src="js/pclock.species.js"></script>
<script src="js/pclock.renderer.js"></script>
<script src="js/pclock.pclock.js"></script>
<script src="js/pclock.js"></script>
<script src="js/plugins.js"></script>
<!-- endbuild -->
<!-- load data from google doc and call phenClockGDImport -->
<script>
// this parses the data that came in from google docs
function phenClockGDImport (json ) {
var out = [];
for( var i = 0; i < json.feed.entry.length; i++){
var entry = json.feed.entry[i];
out[i] = {
'id': entry.gsx$id.$t,
'categories': entry.gsx$category.$t.split(','),
'category': entry.gsx$category.$t,
'name': entry.gsx$name.$t,
'events': [{
'start': entry.gsx$eventstart.$t,
'end': entry.gsx$eventend.$t
}],
'description': entry.gsx$description.$t,
'color': entry.gsx$color.$t.replace('#','')
}
}
pClock.data = out;
}
</script>
<script src="http://spreadsheets.google.com/feeds/list/0AspZRjIECCvPdEdxUDNiaDRSbzA1SEoyMEJxUGhhMGc/1/public/values?alt=json-in-script&callback=phenClockGDImport"></script>
</body>
</html>