-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
executable file
·75 lines (69 loc) · 2.88 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
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Happy 2013</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/font-awesome.css">
<link rel="apple-touch-icon" href="apple-touch-icon.png" />
<script src="js/vendor/modernizr-2.6.2.min.js"></script>
</head>
<body>
<section class="container">
<div id="cube">
<figure class="first">
<i class="icon-asterisk"></i>
<p>What was your last year like?</p>
</figure>
<figure class="second">
<i class="icon-umbrella"></i>
<p>I hope it wasn't that bad.</p>
</figure>
<figure class="third">
<i class="icon-music"></i>
<p>And I wish you<br/>a happy year!</p>
</figure>
<figure class="fourth">
<i class="icon-heart"></i>
<p>Love & Peace!</p>
</figure>
</div>
<div id="ondesktop">Open this page on your mobile phone.</div>
<div id="onsafari">Please add this page to your home screen.</div>
</section>
<script>
var init = function() {
var cube = document.getElementById('cube'),
figures = document.querySelectorAll('#cube figure'),
panelCount = cube.children.length,
transformProp = Modernizr.prefixed('transform'),
theta = 0,
onNavButtonClick = function( event ){
var increment = 1;
theta += ( 360 / panelCount ) * increment * -1;
cube.style[ transformProp ] = 'translateZ( -160px ) rotateY(' + theta + 'deg)';
};
cube.style['display'] = 'block';
document.body.addEventListener( 'touchend', onNavButtonClick, false);
};
if ("standalone" in window.navigator) {
if (window.navigator.standalone) {
window.addEventListener( 'DOMContentLoaded', init, false);
} else {
document.getElementById('onsafari').style['display'] = 'block';
}
} else {
document.getElementById('ondesktop').style['display'] = 'block';
}
</script>
</body>
</html>