This repository has been archived by the owner on Jan 24, 2021. It is now read-only.
forked from PandelisZ/mlh.sexy
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
414 lines (378 loc) · 11.6 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
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=0.5, maximum-scale=1">
<title>Pandelis.sexy</title>
<meta property="og:title" content="Pandelis.sexy">
<meta property="og:type" content="website">
<meta property="og:url" content="http://pandelis.sexy/">
<meta property="og:image" content="https://dl.dropboxusercontent.com/s/gwarj4a5keu3sta/5.jpg?dl=0">
<meta property="og:image:width" content="300" />
<meta property="og:image:height" content="300" />
<meta property="og:description" content="Probably the best thing to happen to the internet since MLH.sexy.">
<meta property="description" content="Probably the best thing to happen to the internet since MLH.sexy.">
<style>
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
border: 0;
}
body {
background-color: #000;
}
.intense {
width: 100%;
height: 85vh;
display: block;
margin: 0;
border: 0;
padding: 0;
/* inspired by http://stackoverflow.com/a/4028908/1348109 */
filter: url("data:image/svg+xml;utf8,<svg%20xmlns='http://www.w3.org/2000/svg'><filter%20id='grayscale'><feColorMatrix%20type='matrix'%20values='0.3333%200.3333%200.3333%200%200%200.3333%200.3333%200.3333%200%200%200.3333%200.3333%200.3333%200%200%200%200%200%201%200'/></filter></svg>#grayscale"); /* Firefox 3.5+ */
filter: grayscale(100%); /* Current draft standard */
-webkit-filter: grayscale(100%); /* New WebKit */
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
filter: gray; /* IE6+ */
opacity: 0;
-webkit-transition: opacity 2s ease-in-out;
-moz-transition: opacity 2s ease-in-out;
-o-transition: opacity 2s ease-in-out;
transition: opacity 2s ease-in-out;
background-repeat: no-repeat;
background-position: 50% 50%;
background-size: contain;
}
.intense.visible {
opacity: 1;
}
.noshow {
display: none;
}
.start {
height: 25vh;
display: relative;
padding: 20vh 0 0 0;
color: white;
text-align: center;
}
.text {
padding-top: 14px;
font-family: 'papyrus', 'comic sans';
font-size: 28px;
cursor:pointer;
}
.footer {
display: block;
position: absolute;
color: white;
font-family: 'papyrus', 'comic sans';
bottom: 0;
width: 100%;
}
.footer p {
margin: 0 auto;
text-align: center;
}
.footer a, .footer a:visited {
color: white;
}
/* this beaty adapted from here http://coursesweb.net/css/heart-shape-css_cs */
.heart-shape{
margin: 0 auto;
width: 150px;
height: 150px;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
background-color: rgba(255,0,0, 1);
cursor:pointer;
}
.heart-shape:before,
.heart-shape:after{
position: absolute;
width: 150px;
height: 150px;
content: '';
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-o-border-radius: 50%;
border-radius: 50%;
background-color: rgba(255,0,0,1);
cursor:pointer;
}
.heart-shape:before{
bottom: 0px;
left: -70px;
}
.heart-shape:after{
top: -70px;
right: 0px;
}
.pandelis {
width: 500px;
max-width: 500px;
margin-left: auto;
margin-right: auto;
}
</style>
</head>
<body>
<article class="intense noshow">
</article>
<audio class="audio noshow">
<source src="https://dl.dropboxusercontent.com/s/3j0w45sttxaa75d/bbg.mp3?dl=0" type="audio/mpeg">
</audio>
<div class="start">
<div class="pandelis"></div>
<p class="text">click to begin</p>
<p class="text">turn up the volume for full effect</p>
</div>
<footer class="footer">
<p>
<a href="https://twitter.com/pandelisz" target="_blank">Follow</a>
</p>
<p>Credit to <a href="https://twitter.com/pandelisz" target="_blank">@JackWeirdy<a/> for inspiration | Adapted by <a href="https://twitter.com/jna_sh" target="_blank">Someone who should know better<a/>
</p>
</footer>
<script>
(function() {
var images = [
'https://dl.dropboxusercontent.com/s/wggg7trja9xn8s0/1.jpg',
'https://dl.dropboxusercontent.com/s/34af2y5mptwcide/2.jpg?dl=0',
'https://dl.dropboxusercontent.com/s/mhxgffhoyb4h33i/3.jpg?dl=0',
'https://dl.dropboxusercontent.com/s/b650xj0tnjr2j3u/4.jpg?dl=0',
'https://dl.dropboxusercontent.com/s/gwarj4a5keu3sta/5.jpg?dl=0',
'https://i.imgur.com/j1ajbxW.jpg',
'https://i.imgur.com/eWFxj0f.jpg',
'https://i.imgur.com/c11oVjq.jpg',
'https://i.imgur.com/JWMv8pL.jpg',
'https://i.imgur.com/BQWJpaT.jpg',
'https://i.imgur.com/8Nmr68A.jpg',
'https://i.imgur.com/RN0XPy7.jpg'
];
var intenseElem = document.querySelector('.intense');
var musicElem = document.querySelector('.audio');
var i = -1;
function fadeIn() {
intenseElem.className = 'intense visible';
setTimeout(fadeOut, 4000);
}
function fadeOut() {
intenseElem.className = 'intense';
setTimeout(changeImage, 3000);
}
function changeImage() {
i++;
if (i == images.length) i = 0;
try { ga('send', 'event', 'media', 'changeimage'); } catch (e) {}
intenseElem.style.backgroundImage = "url('" + images[i] + "')";
fadeIn();
}
function shuffle(array) {
var i = 0;
var j = 0;
var temp = null;
for (i = array.length - 1; i > 0; i -= 1) {
j = Math.floor(Math.random() * (i + 1));
temp = array[i];
array[i] = array[j];
array[j] = temp;
}
}
function start() {
shuffle(images);
musicElem.play();
document.querySelector('.start').className = 'start noshow';
try { ga('send', 'event', 'media', 'play'); } catch (e) {}
intenseElem.className = 'intense';
setTimeout(changeImage, 2000);
}
document.querySelector('.pandelis').onclick = start;
document.querySelector('.text').onclick = start;
images.map(function(url) {
var i = new Image();
i.src = url;
});
})();
</script>
<script type="text/javascript">
// <![CDATA[
var colours=new Array('#f00', '#f06', '#f0f', '#f6f', '#f39', '#f9c'); // colours of the hearts
var minisize=20; // smallest size of hearts in pixels
var maxisize=50; // biggest size of hearts in pixels
var hearts=66; // maximum number of hearts on screen
var over_or_under="over"; // set to "over" for hearts to always be on top, or "under" to allow them to float behind other objects
/*****************************
*JavaScript Love Heart Cursor*
* (c)2013+ mf2fm web-design *
* http://www.mf2fm.com/rv *
* DON'T EDIT BELOW THIS BOX *
*****************************/
var x=ox=400;
var y=oy=300;
var swide=800;
var shigh=600;
var sleft=sdown=0;
var herz=new Array();
var herzx=new Array();
var herzy=new Array();
var herzs=new Array();
var kiss=false;
if (typeof('addRVLoadEvent')!='function') function addRVLoadEvent(funky) {
var oldonload=window.onload;
if (typeof(oldonload)!='function') window.onload=funky;
else window.onload=function() {
if (oldonload) oldonload();
funky();
}
}
addRVLoadEvent(mwah);
function mwah() { if (document.getElementById) {
var i, heart;
for (i=0; i<hearts; i++) {
heart=createDiv("auto", "auto");
heart.style.visibility="hidden";
heart.style.zIndex=(over_or_under=="over")?"1001":"0";
heart.style.color=colours[i%colours.length];
heart.style.pointerEvents="none";
if (navigator.appName=="Microsoft Internet Explorer") heart.style.filter="alpha(opacity=75)";
else heart.style.opacity=0.75;
heart.appendChild(document.createTextNode(String.fromCharCode(9829)));
document.body.appendChild(heart);
herz[i]=heart;
herzy[i]=false;
}
set_scroll();
set_width();
herzle();
}}
function herzle() {
var c;
if (Math.abs(x-ox)>1 || Math.abs(y-oy)>1) {
ox=x;
oy=y;
for (c=0; c<hearts; c++) if (herzy[c]===false) {
herz[c].firstChild.nodeValue=String.fromCharCode(9829);
herz[c].style.left=(herzx[c]=x-minisize/2)+"px";
herz[c].style.top=(herzy[c]=y-minisize)+"px";
herz[c].style.fontSize=minisize+"px";
herz[c].style.fontWeight='normal';
herz[c].style.visibility='visible';
herzs[c]=minisize;
break;
}
}
for (c=0; c<hearts; c++) if (herzy[c]!==false) blow_me_a_kiss(c);
setTimeout("herzle()", 40);
}
document.onmousedown=pucker;
document.onmouseup=function(){clearTimeout(kiss);};
function pucker() {
ox=-1;
oy=-1;
kiss=setTimeout('pucker()', 100);
}
function blow_me_a_kiss(i) {
herzy[i]-=herzs[i]/minisize+i%2;
herzx[i]+=(i%5-2)/5;
if (herzy[i]<sdown-herzs[i] || herzx[i]<sleft-herzs[i] || herzx[i]>sleft+swide-herzs[i]) {
herz[i].style.visibility="hidden";
herzy[i]=false;
}
else if (herzs[i]>minisize+2 && Math.random()<.5/hearts) break_my_heart(i);
else {
if (Math.random()<maxisize/herzy[i] && herzs[i]<maxisize) herz[i].style.fontSize=(++herzs[i])+"px";
herz[i].style.top=herzy[i]+"px";
herz[i].style.left=herzx[i]+"px";
}
}
function break_my_heart(i) {
var t;
herz[i].firstChild.nodeValue=String.fromCharCode(9676);
herz[i].style.fontWeight='bold';
herzy[i]=false;
for (t=herzs[i]; t<=maxisize; t++) setTimeout('herz['+i+'].style.fontSize="'+t+'px"', 60*(t-herzs[i]));
setTimeout('herz['+i+'].style.visibility="hidden";', 60*(t-herzs[i]));
}
document.onmousemove=mouse;
function mouse(e) {
if (e) {
y=e.pageY;
x=e.pageX;
}
else {
set_scroll();
y=event.y+sdown;
x=event.x+sleft;
}
}
window.onresize=set_width;
function set_width() {
var sw_min=999999;
var sh_min=999999;
if (document.documentElement && document.documentElement.clientWidth) {
if (document.documentElement.clientWidth>0) sw_min=document.documentElement.clientWidth;
if (document.documentElement.clientHeight>0) sh_min=document.documentElement.clientHeight;
}
if (typeof(self.innerWidth)=='number' && self.innerWidth) {
if (self.innerWidth>0 && self.innerWidth<sw_min) sw_min=self.innerWidth;
if (self.innerHeight>0 && self.innerHeight<sh_min) sh_min=self.innerHeight;
}
if (document.body.clientWidth) {
if (document.body.clientWidth>0 && document.body.clientWidth<sw_min) sw_min=document.body.clientWidth;
if (document.body.clientHeight>0 && document.body.clientHeight<sh_min) sh_min=document.body.clientHeight;
}
if (sw_min==999999 || sh_min==999999) {
sw_min=800;
sh_min=600;
}
swide=sw_min;
shigh=sh_min;
}
window.onscroll=set_scroll;
function set_scroll() {
if (typeof(self.pageYOffset)=='number') {
sdown=self.pageYOffset;
sleft=self.pageXOffset;
}
else if (document.body && (document.body.scrollTop || document.body.scrollLeft)) {
sdown=document.body.scrollTop;
sleft=document.body.scrollLeft;
}
else if (document.documentElement && (document.documentElement.scrollTop || document.documentElement.scrollLeft)) {
sleft=document.documentElement.scrollLeft;
sdown=document.documentElement.scrollTop;
}
else {
sdown=0;
sleft=0;
}
}
function createDiv(height, width) {
var div=document.createElement("div");
div.style.position="absolute";
div.style.height=height;
div.style.width=width;
div.style.overflow="hidden";
div.style.backgroundColor="transparent";
return (div);
}
// ]]>
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-69398382-4', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>