-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
140 lines (112 loc) · 4.99 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="stylesheets/vendor/yui/reset.css">
<link rel="stylesheet" type="text/css" href="stylesheets/vendor/yui/base.css">
<link rel="stylesheet" type="text/css" href="stylesheets/application/main.css">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" >
<meta name="apple-mobile-web-app-capable" content="yes">
<script>
function verify() {
var request = window.navigator.mozApps.getInstalled();
request.onerror = function(e) {
alert("Error calling getInstalled: " + request.error.name);
};
request.onsuccess = function(e) {
if (request.result.length === 0) {
install();
}
};
};
function install() {
var request = window.navigator.mozApps.install('http://localhost/go_explore/manifest.json');
request.onerror = function () {
alert('Install failed, error: ' + this.error.name);
};
};
if (window.navigator.mozApps) {
verify();
}
</script>
<title>Go Explore</title>
<body>
<script src="javascripts/vendor/packery.js"></script>
<script src="javascripts/vendor/yui.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/yahoo/yahoo-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/connection/connection_core-min.js"></script>
<script src="javascripts/application/services/flickr.js"></script>
<script src="javascripts/application/services/location.js"></script>
<script src="javascripts/application/views/detail.js"></script>
<script src="javascripts/application/views/explore.js"></script>
<script src="javascripts/application/views/index.js"></script>
<script src="javascripts/application/views/map.js"></script>
<script src="javascripts/application/models/item.js"></script>
<script src="javascripts/application/models-list/item.js"></script>
<script src="javascripts/application/application.js"></script>
<script id="index-template" type="text/template">
<div class="header">
<div class="title">Go Explore</div>
</div>
<div class="content index">
<p>Start discovering photos and places of interest in a new way</p>
<a href="#/explore">
<div class="button">
Discover
</div>
</a>
</div>
</script>
<script id="explore-template" type="text/template">
<div class="header">
<div class="title">Go Explore</div>
</div>
<div class="content explore">
<div class="main">
<div class="container">
<% for(var i = 0, l = data.length; i < l; ++i) { %>
<a href="#/detail/<%= data[i].id %>">
<img src="<%= data[i].url %>" alt="" class="item item<%= i %>">
</a>
<% } %>
</div>
</div>
</div>
</script>
<script type="text/javascript">
function showMap () {
var mapOptions = {
center: new google.maps.LatLng(-34.397, 150.644),
zoom: 8,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map-canvas"),
mapOptions);
}
</script>
<script id="detail-template" type="text/template">
<div class="header">
<a class="back" href="#/explore">Back</a>
<div class="title">Go Explore</div>
</div>
<div class="content detail">
<h1 class="title"><%= data.title %></h1>
<p class="distance">
<%= data.distance.toFixed(2) %> kilometers away from you - <a href="#">get directions</a>
</p>
<img class="photo" src="<%= data.url %>" alt="<%= data.title %>">
<p class="description">
<% if (data.description === undefined) { %>
No descriptions
<% } else { %>
<%= data.description %>
<% } %>
</p>
</div>
<div id="map-canvas"/>
</script>
</body>
</html>