-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
181 lines (171 loc) · 6.78 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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Artsicle Discovery Game</title>
<link rel="shortcut icon" href="./favicon.ico" />
<link rel="stylesheet" type="text/css" href="./style_base.css"/>
<link rel="stylesheet" type="text/css" href="./cloud-zoom/cloud-zoom.css"/>
<link rel="stylesheet" type="text/css" href="./noty/css/jquery.noty.css"/>
<link rel="stylesheet" type="text/css" href="./noty/css/noty_theme_mitgux.css"/>
<script type="text/javascript">
if (window.location.hostname.match(/www/i))
{
window.location = "http://discoverygame.phpfogapp.com";
}
</script>
</head>
<body>
<header>
<div class="center" id="header">
<ul id="logo"><a href="#">Discovery Game</a></ul>
<!-- <iframe
src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.artsicle.com&send=false&layout=button_count&width=450&show_faces=true&action=like&colorscheme=light&font=verdana&height=21&appId=411664055513252"
scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"></iframe> -->
</div>
</header>
<div class="center" id="choice">
<div class="center" id="better">Which do you like better?</div>
</div>
<div class="center" id="page">
<div class="center" id="page-content">
<img id="loading-animation" src="./images/loading.gif" style="display:none;"/>
<div class="center" id="comparison-box" style="display:none;">
<div class="image-box">
<a href="" class="cloud-zoom" id="zoom1" rel="position:'left'">
<img id="image1" src="" />
</a>
<div>
<button class="share-button" id="post-image1-button" onclick='postToFeed("#image1"); return false;'>Post to Feed</button>
<!-- <iframe id="like-image1" src="" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:300px; height:21px;" allowTransparency="true"></iframe> -->
</div>
</div>
<div class="contStuff" id="neither">
<a href="#" id="neither-button">Neither</a>
</div>
<div class="image-box">
<a href="" class="cloud-zoom" id="zoom2" rel="position:'right'">
<img id="image2" src="" />
</a>
<div>
<button class="share-button" id="post-image2-button" onclick='postToFeed("#image2"); return false;'>Post to Feed</button>
<!-- <iframe id="like-image2" src="" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:300px; height:21px;" allowTransparency="true"></iframe> -->
</div>
</div>
</div>
<div class="center" id="email-box">
<h2 id="fb-welcome-message"></h2>
<div id="login-buttons">
<h2 class="welcome-message">Help us help you!</h2>
<h2 class="welcome-message">Welcome to Artisicle's Discovery Game!</h2><br/>
<div id="gallerybox" class="center">
<img class="gallery" id="0" alt="" src="images/gallery_loading.gif" />
<img class="gallery" id="1" alt="" src="images/gallery_loading.gif" />
<img class="gallery" id="2" alt="" src="images/gallery_loading.gif" />
</div>
<div id="fblog" class="fb-login-button" scope="email" style="display:inline-block;">Connect</div>
<h3 id="login-message">or</h3>
<button id="play-button">Just play</button>
</div>
<input type="text" id="email" style="display:none;"></input>
<!-- <p>Would you like to register with your email?</p>
<input id="play-button" type="button" value="Register & Play"></input> -->
</div>
</div>
</div>
<div class="center" id="preload">
<img id="pre-image1" src=""/>
<img id="pre-image2" src=""/>
</div>
<footer>
<div class="center" id="footer_nav">
<div class="center" id="left-footer">
<a href="https://www.artsicle.com" id="left-logo">Artsicle!</a>
<div class="footer-text"><p><b>Questions?</b> Call us at (646) 470-4219!</p></div>
</div>
<div class="center" id="right-footer">
<a href="https://www.facebook.com/Artsicle" id="facebook">Facebook!</a>
<a href="http://twitter.com/#!/artsicle/" id="twitter">Twitter!</a>
<div class="footer-text"><p>Follow Us!</p></div>
</div>
</div>
</footer>
<div id='fb-root'></div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="./noty/js/jquery.noty.js"></script>
<script src="./cloud-zoom/cloud-zoom.1.0.2.js"></script>
<script src="./game.js"></script>
<script>
$(document).ready(function(){
//start_game();
register_handlers();
});
</script>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '411664055513252',
channelUrl : '//'+window.location.hostname+'/adg/fb-channel.php',
status : true,
cookie : true,
xfbml : true,
oauth : true,
});
// listen for and handle auth.statusChange events
FB.Event.subscribe('auth.statusChange', function(response) {
if (response.authResponse) {
// user has auth'd your app and is logged into Facebook
FB.api('/me', function(me){
if (me.name) {
//alert("hola! " + me.name + "(" + me.email + ")");
$("div.fb-login-button").hide();
$("#fb-welcome-message").html("Welcome <b class='welcome-name'>" + me.first_name + "</b>!");
$("#email").val(me.email);
$('#auth-loggedout').hide();
$('#auth-loggedin').show();
$("#play-button").hide();
start_game();
}
})
} else {
// user has not auth'd your app, or is not logged into Facebook
$('#auth-loggedout').show();
$('#auth-loggedin').hide();
}
});
};
(function(d){
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
function postToFeed(image) {
var url = 'image.php?art=' + encodeURIComponent($(image).attr("permalink"));
$.get(url, function(data) {
try
{
var result = JSON.parse(data);
var obj = {
method: 'feed',
//redirect_uri: 'http://www.artsicle.com/',
link: 'http://www.artsicle.com/art/' + $(image).attr("permalink"),
picture: $(image).attr("src"),
name: 'Artsicle Discovery Game',
caption: '"' + result['name'] + '" by ' + result['artist']['full'],
description: result['description']
};
function callback(response) {
//alert("Post ID: " + response['post_id']);
}
FB.ui(obj, callback);
}
catch (error)
{
//alert("Invalid response!\n"+data);
}
});
}
</script>
</body>
</html>