-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
311 lines (272 loc) · 11.8 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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
<!DOCTYPE HTML>
<html>
<title>Time to Face the Music</title>
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<!-- Header Section -->
<head>
<title> Design for Wellbeing</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://connect.soundcloud.com/sdk/sdk-3.3.0.js"></script>
<!-- Import JQuery-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!-- Import Bootstrap Library-->
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" />
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<!-- Import Affectiva javascript Library -->
<script src="https://download.affectiva.com/js/3.2/affdex.js"></script>
<div class="container" id="affdex_elements"></div>
<!-- Use Custom CSS and Javascript files-->
<link rel="stylesheet" href="style.css">
<!-- Sidebars that sticks out (tab)-->
<style>
body {
font-family: "Lato", sans-serif;
}
.sidetab_left {
height: 100%;
width: 50px;
position: fixed;
z-index: 1;
top: 0;
left: 0;
background-color: #111;
overflow-x: hidden;
padding-top: 20px;
}
.sidetab_left a {
padding: 6px 8px 6px 16px;
text-decoration: none;
font-size: 25px;
color: #f1f1f1;
display: block;
}
.main {
margin-left: 50px; /* Same as the width of the sidenav */
font-size: 28px; /* Increased text to enable scrolling */
padding: 0px 10px;
}
@media screen and (max-height: 450px) {
.sidetab_left {padding-top: 15px;}
.sidetab_left a {font-size: 18px;}
}
</style>
<style>
body {
font-family: "Lato", sans-serif;
}
.sidetab_right {
height: 100%;
width: 50px;
position: fixed;
z-index: 1;
top: 0;
right: 0;
background-color: #111;
overflow-x: hidden;
padding-top: 20px;
}
.sidetab_right a {
padding: 6px 8px 6px 16px;
text-decoration: none;
font-size: 25px;
color: #f1f1f1;
display: block;
}
.main {
margin-left: 50px; /* Same as the width of the sidenav */
font-size: 28px; /* Increased text to enable scrolling */
padding: 0px 10px;
}
@media screen and (max-height: 450px) {
.sidetab_right {padding-top: 15px;}
.sidetab_right a {font-size: 18px;}
}
</style>
<!-- Sidebars -->
<style>
body {
font-family: "Lato", sans-serif;
}
.sidenav_left {
height: 100%;
width: 350px;
position: fixed;
z-index: 1;
top: 0;
left: 0;
background-color: #111;
overflow-x: hidden;
padding-top: 20px;
}
.sidenav_left a {
padding: 6px 8px 6px 16px;
text-decoration: none;
font-size: 25px;
color: #f1f1f1;
display: block;
}
.main {
margin-left: 350px; /* Same as the width of the sidenav */
font-size: 28px; /* Increased text to enable scrolling */
padding: 0px 10px;
}
@media screen and (max-height: 450px) {
.sidenav_left {padding-top: 15px;}
.sidenav_left a {font-size: 18px;}
}
</style>
<style>
body {
font-family: "Lato", sans-serif;
}
.sidenav_right {
height: 100%;
width: 350px;
position: fixed;
z-index: 1;
top: 0;
left: 350;
background-color: #111;
overflow-x: hidden;
padding-top: 20px;
}
.sidenav_right a {
padding: 6px 8px 6px 16px;
text-decoration: none;
font-size: 25px;
color: #f1f1f1;
display: block;
}
.main {
margin-left: 350px; /* Same as the width of the sidenav */
font-size: 28px; /* Increased text to enable scrolling */
padding: 0px 10px;
}
@media screen and (max-height: 450px) {
.sidenav_right {padding-top: 15px;}
.sidenav_right a {font-size: 18px;}
}
</style>
<style>
div.a {
text-align: center;
}
div.b {
text-align: left;
}
div.c {
text-align: right;
}
</style>
<script>
var SC=SC||{};SC.Widget=function(n){function t(r){if(e[r])return e[r].exports;var o=e[r]={exports:{},id:r,loaded:!1};return n[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var e={};return t.m=n,t.c=e,t.p="",t(0)}([function(n,t,e){function r(n){return!!(""===n||n&&n.charCodeAt&&n.substr)}function o(n){return!!(n&&n.constructor&&n.call&&n.apply)}function i(n){return!(!n||1!==n.nodeType||"IFRAME"!==n.nodeName.toUpperCase())}function a(n){var t,e=!1;for(t in b)if(b.hasOwnProperty(t)&&b[t]===n){e=!0;break}return e}function s(n){var t,e,r;for(t=0,e=I.length;t<e&&(r=n(I[t]),r!==!1);t++);}function u(n){var t,e,r,o="";for("//"===n.substr(0,2)&&(n=window.location.protocol+n),r=n.split("/"),t=0,e=r.length;t<e&&t<3;t++)o+=r[t],t<2&&(o+="/");return o}function c(n){return n.contentWindow?n.contentWindow:n.contentDocument&&"parentWindow"in n.contentDocument?n.contentDocument.parentWindow:null}function l(n){var t,e=[];for(t in n)n.hasOwnProperty(t)&&e.push(n[t]);return e}function d(n,t,e){e.callbacks[n]=e.callbacks[n]||[],e.callbacks[n].push(t)}function E(n,t){var e,r=!0;return t.callbacks[n]=[],s(function(t){if(e=t.callbacks[n]||[],e.length)return r=!1,!1}),r}function f(n,t,e){var r,o,i=c(e);return!!i.postMessage&&(r=e.getAttribute("src").split("?")[0],o=JSON.stringify({method:n,value:t}),"//"===r.substr(0,2)&&(r=window.location.protocol+r),r=r.replace(/http:\/\/(w|wt).soundcloud.com/,"https://$1.soundcloud.com"),void i.postMessage(o,r))}function p(n){var t;return s(function(e){if(e.instance===n)return t=e,!1}),t}function h(n){var t;return s(function(e){if(c(e.element)===n)return t=e,!1}),t}function v(n,t){return function(e){var r=o(e),i=p(this),a=!r&&t?e:null,s=r&&!t?e:null;return s&&d(n,s,i),f(n,a,i.element),this}}function S(n,t,e){var r,o,i;for(r=0,o=t.length;r<o;r++)i=t[r],n[i]=v(i,e)}function R(n,t,e){return n+"?url="+t+"&"+g(e)}function g(n){var t,e,r=[];for(t in n)n.hasOwnProperty(t)&&(e=n[t],r.push(t+"="+("start_track"===t?parseInt(e,10):e?"true":"false")));return r.join("&")}function m(n,t,e){var r,o,i=n.callbacks[t]||[];for(r=0,o=i.length;r<o;r++)i[r].apply(n.instance,e);(a(t)||t===L.READY)&&(n.callbacks[t]=[])}function w(n){var t,e,r,o,i;try{e=JSON.parse(n.data)}catch(a){return!1}return t=h(n.source),r=e.method,o=e.value,(!t||A(n.origin)===A(t.domain))&&(t?(r===L.READY&&(t.isReady=!0,m(t,C),E(C,t)),r!==L.PLAY||t.playEventFired||(t.playEventFired=!0),r!==L.PLAY_PROGRESS||t.playEventFired||(t.playEventFired=!0,m(t,L.PLAY,[o])),i=[],void 0!==o&&i.push(o),void m(t,r,i)):(r===L.READY&&T.push(n.source),!1))}function A(n){return n.replace(Y,"")}var _,y,O,D=e(1),b=e(2),P=e(3),L=D.api,N=D.bridge,T=[],I=[],C="__LATE_BINDING__",k="http://wt.soundcloud.test:9200/",Y=/^http(?:s?)/;window.addEventListener?window.addEventListener("message",w,!1):window.attachEvent("onmessage",w),n.exports=O=function(n,t,e){if(r(n)&&(n=document.getElementById(n)),!i(n))throw new Error("SC.Widget function should be given either iframe element or a string specifying id attribute of iframe element.");t&&(e=e||{},n.src=R(k,t,e));var o,a,s=h(c(n));return s&&s.instance?s.instance:(o=T.indexOf(c(n))>-1,a=new _(n),I.push(new y(a,n,o)),a)},O.Events=L,window.SC=window.SC||{},window.SC.Widget=O,y=function(n,t,e){this.instance=n,this.element=t,this.domain=u(t.getAttribute("src")),this.isReady=!!e,this.callbacks={}},_=function(){},_.prototype={constructor:_,load:function(n,t){if(n){t=t||{};var e=this,r=p(this),o=r.element,i=o.src,a=i.substr(0,i.indexOf("?"));r.isReady=!1,r.playEventFired=!1,o.onload=function(){e.bind(L.READY,function(){var n,e=r.callbacks;for(n in e)e.hasOwnProperty(n)&&n!==L.READY&&f(N.ADD_LISTENER,n,r.element);t.callback&&t.callback()})},o.src=R(a,n,t)}},bind:function(n,t){var e=this,r=p(this);return r&&r.element&&(n===L.READY&&r.isReady?setTimeout(t,1):r.isReady?(d(n,t,r),f(N.ADD_LISTENER,n,r.element)):d(C,function(){e.bind(n,t)},r)),this},unbind:function(n){var t,e=p(this);e&&e.element&&(t=E(n,e),n!==L.READY&&t&&f(N.REMOVE_LISTENER,n,e.element))}},S(_.prototype,l(b)),S(_.prototype,l(P),!0)},function(n,t){t.api={LOAD_PROGRESS:"loadProgress",PLAY_PROGRESS:"playProgress",PLAY:"play",PAUSE:"pause",FINISH:"finish",SEEK:"seek",READY:"ready",OPEN_SHARE_PANEL:"sharePanelOpened",CLICK_DOWNLOAD:"downloadClicked",CLICK_BUY:"buyClicked",ERROR:"error"},t.bridge={REMOVE_LISTENER:"removeEventListener",ADD_LISTENER:"addEventListener"}},function(n,t){n.exports={GET_VOLUME:"getVolume",GET_DURATION:"getDuration",GET_POSITION:"getPosition",GET_SOUNDS:"getSounds",GET_CURRENT_SOUND:"getCurrentSound",GET_CURRENT_SOUND_INDEX:"getCurrentSoundIndex",IS_PAUSED:"isPaused"}},function(n,t){n.exports={PLAY:"play",PAUSE:"pause",TOGGLE:"toggle",SEEK_TO:"seekTo",SET_VOLUME:"setVolume",NEXT:"next",PREV:"prev",SKIP:"skip"}}]);
</script>
</head>
<body>
<!-- Body Section -->
<!-- Sidebars and tabs -->
<div class="sidetab_left">
<a>H</a>
<a>o</a>
<a>w</a>
<a>-</a>
<a>T</a>
<a>o</a>
</div>
<div class="sidetab_right">
<a>P</a>
<a>l</a>
<a>a</a>
<a>y</a>
<a>l</a>
<a>i</a>
<a>s</a>
<a>t</a>
</div>
<div class="b sidenav_left w3-sidebar w3-bar-block w3-card w3-animate-left" id="leftMenu">
<button onclick="closeLeftMenu();" class="w3-bar-item w3-button w3-large" id ="closeLeft">Close ×</button>
<a><u>Welcome to</a>
<a>Time to Face the Music!!</a></u>
<a></a>
<a>How it works:</a>
<a>:) to add a song to your playlist</a>
<a>:( to move on to something new</a>
<a>Click 'Next' to move onto something similar</a>
<a></a>
<a>**Close this tab to begin!!**</a>
</div>
<div class="b sidenav_right w3-sidebar w3-bar-block w3-card w3-animate-right" style="display:none;right:0;" id="rightMenu">
<button onclick="closeRightMenu();" class="w3-bar-item w3-button w3-large" id="closeRight">Close ×</button>
</div>
<!-- Page Content -->
<div class="w3-teal">
<button class="w3-button w3-teal w3-xlarge w3-left" onclick="openLeftMenu();">☰</button>
<button class="w3-button w3-teal w3-xlarge w3-right" onclick="openRightMenu();">☰</button>
</div>
<script>
var open = 1;
function openLeftMenu() {
widget1.pause();
document.getElementById("leftMenu").style.display = "block";
open++;
}
function closeLeftMenu() {
if(open == 1){
widget1.play();
}
document.getElementById("leftMenu").style.display = "none";
open--;
}
function openRightMenu() {
widget1.pause();
document.getElementById("rightMenu").style.display = "block";
open++;
}
function closeRightMenu() {
if(open == 1){
widget1.play();
}
document.getElementById("rightMenu").style.display = "none";
open--;
}
</script>
<!--Affectiva detector title, instructions -->
<div>
<br><center>Already know you like this song? Listen to a similar one!: <button onclick="refreshIframe();">Next</button></center></br>
<p>
<center>
</br>
<p style="text-align:center;"><img src="cat_party.jpg" width="300" height="300"></p>
<br/> Happiness brings up the green happiness meter, while no reaction fills the blue boredom meter.
</center>
</p>
<center><div class="progress">
<div class="progress-bar progress-bar-success active" id="joy-bar" role="progressbar" aria-valuenow="0"
aria-valuemin="0" aria-valuemax="100" style="width:0%">
Happiness
</div>
<div class="progress-bar progress-bar-info active" id="meh-bar" role="progressbar" aria-valuenow="0"
aria-valuemin="0" aria-valuemax="100" style="width:0%">
Changing Playlist...
</div>
<center><iframe id='sc'width="50%" height="300" scrolling="no" frameborder="no" allow="autoplay" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/playlists/500850885&color=%23ff5500&auto_play=false&hide_related=true&show_comments=false&show_user=false&show_reposts=false&show_teaser=false&show_artwork=true"></iframe></center>
</div>
</center>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<footer>
<!-- Footer Section -->
<canvas id="world"></canvas>
<script src="script.js"></script>
<script src="songchange.js"></script>
<script src="confetti.js"></script>
</footer>
</html>