-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
185 lines (165 loc) · 7.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
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<!DOCTYPE html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!-- Consider adding a manifest.appcache: h5bp.com/d/Offline -->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head prefix="og: http://ogp.me/ns#">
<meta charset="utf-8">
<meta property="og:site_name" content="Volunteering Things to Do"/>
<meta property="fb:app_id" content="110412772419214" />
<!-- 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>Things to do Near You</title>
<meta name="description" content="Volunteering Things to do Near You">
<!-- Mobile viewport optimized: h5bp.com/viewport -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory: mathiasbynens.be/notes/touch-icons -->
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/template.css">
<!-- More ideas for your <head> here: h5bp.com/d/head-Tips -->
<!-- All JavaScript at the bottom, except this Modernizr build.
Modernizr enables HTML5 elements & feature detects for optimal performance.
Create your own custom Modernizr build: www.modernizr.com/download/ -->
<script src="js/libs/modernizr-2.5.3.min.js"></script>
</head>
<body>
<div id="fb-root"></div>
<script>
// All the facebook async integration is in this block
var permissions = null; // stores the permissions the user has granted this app
window.fbAsyncInit = function() {
FB.init({
appId : '110412772419214',
channelUrl : '//'+window.location.hostname+'/channel', // CORS channel file
status : true, // check login status
xfbml : true // parse XFBML
});
// autologin & permissions check
FB.Event.subscribe('auth.statusChange', function(rsp) {
console.log(rsp)
if (rsp.authResponse) {
FB.api('/me', function(me) {
console.log(me)
document.getElementById('fb-username').innerHTML = me.name;
document.getElementById('fb-login-button').style.display = 'none';
document.getElementById('fb-loggedin').style.display = 'block';
});
// get the permissions the user's already granted, we'll need them later
FB.api('/me/permissions', function(response) {
if (response) {
console.log(response.data[0]);
permissions = response.data[0];
}
})
} else {
document.getElementById('fb-login-button').style.display = 'block';
document.getElementById('fb-loggedin').style.display = 'none';
}
})
/*
// Cook Action
document.getElementById('cook-button').addEventListener('click', function(e) {
if (!permissions ||
(permissions && !permissions.publish_actions)){
// user had not granted publish_actions, has not auth'd this app, or is not logged in to Facebook
console.log('user needs to grant publish_actions permission, login, or auth this app')
FB.login(function(rsp) {
FB.api('/me/permissions', function(response) {
console.log(response.data[0]);
permissions = response.data[0];
})
// Could re-attempt to publish here, but won't for simplicity
},{scope:'publish_actions'})
} else {
// all good, let try and publish an action using the og:url tag as the object URL
FB.api('/me/simonsfoodapp:cook', 'POST', {
"recipe": document.getElementById('og-url').getAttribute('content')
}, function(rsp){
console.log(rsp)
if (rsp.id) {
alert('action published with ID: ' + rsp.id)
}
})
}
})
*/
}; // fbAsyncInit
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
// js.src = "//connect.facebook.net/en_US/all.js";
js.src = "//connect.facebook.net/en_US/all/debug.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<!-- Prompt IE 6 users to install Chrome Frame. Remove this if you support IE 6.
chromium.org/developers/how-tos/chrome-frame-getting-started -->
<!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->
<header>
<form onsubmit="return oppSearch();" action="index.html" method="get" accept-charset="utf-8">
<span id="loading">…</span>
<input name="location" type="search" value="EC2A 4BX" required id="searchloc"
placeholder="Where do you want to volunteer?" size="20" maxlength="99" />
<input type="submit" value=">" />
</form>
</header>
<div role="main">
<ul class="opportunities composer">
<li style="text-align:center">
<a href="add.html"><h3>What are you inspired to do?</h3></a>
</li>
</ul>
<script id="opplisting" type="text/template">
<li>
<img src="{{image}}" width="80" height="80" />
<dl>
<dt>Proposer</dt><dd>{{name}}</dd>
<dt>What</dt><dd><a href="event.html#!/{{detailurl}}">{{title}}</a></dd>
<dt>When</dt><dd>{{date}} {{time}}</dd>
<dt>Where</dt><dd>{{location}}</dd>
</dl>
<a href="event.html#!/{{detailurl}}"><img src="img/chevron.png" width="50" height="50" alt="More details" style="float:right; margin-top:-60px;" /></a>
<span class="attendance">{{going}} going</span>
<img src="img/fb-like-count.png" class="icons" width="20" height="20" alt="likes:" />
<span class="like-count">{{likes}}</span>
<img src="img/fb-comment-count.png" class="icons" width="20" height="20" alt="comments:" />
<span class="comment-count">{{comments}}</span>
</li>
</script>
<ul id="opplist" class="opportunities"></ul>
</div>
<div class="fb-activity" data-app-id="110412772419214" data-ref="webapp-list"
data-width="400" data-max-age="28" data-header="false" data-recommendations="true">
</div>
<footer>
More 2km away...
</footer>
<!-- JavaScript at the bottom for fast page loading -->
<!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if offline -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.1.min.js"><\/script>')</script>
<!-- The mustache JS client lib -->
<script src="js/mustache.js"></script>
<!-- The import.io JS client lib (served from their CDN) -->
<!-- <script src="//d7xe6yl2ckrgs.cloudfront.net/js/2/importio.js"></script>
-->
<!-- scripts concatenated and minified via build script -->
<script src="js/plugins.js"></script>
<script src="js/listcontroller.js"></script>
<!-- end scripts -->
<script>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-40500326-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>