-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsonja.html
More file actions
172 lines (135 loc) · 4.96 KB
/
sonja.html
File metadata and controls
172 lines (135 loc) · 4.96 KB
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
<!DOCTYPE html><html lang='en' class=''>
<head>
<title>Sonja</title>
<script src='//production-assets.codepen.io/assets/editor/live/console_runner-079c09a0e3b9ff743e39ee2d5637b9216b3545af0de366d4b9aad9dc87e26bfd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/events_runner-73716630c22bbc8cff4bd0f07b135f00a0bdc5d14629260c3ec49e5606f98fdd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/css_live_reload_init-2c0dc5167d60a5af3ee189d570b1835129687ea2a61bee3513dee3a50c115a77.js'></script><meta charset='UTF-8'><meta name="robots" content="noindex"><link rel="shortcut icon" type="image/x-icon" href="//production-assets.codepen.io/assets/favicon/favicon-8ea04875e70c4b0bb41da869e81236e54394d63638a1ef12fa558a4a835f1164.ico" /><link rel="mask-icon" type="" href="//production-assets.codepen.io/assets/favicon/logo-pin-f2d2b6d2c61838f7e76325261b7195c27224080bc099486ddd6dccb469b8e8e6.svg" color="#111" /><link rel="canonical" href="https://codepen.io/snibo13/pen/xpmewR" />
<link rel = "shortcut icon" type = "image/x-icon" href = "https://pbs.twimg.com/media/DBp-0vIXkAA2umG.jpg.ico">
<link rel = "stylesheet" href = "https://fonts.googleapis.com/css?family=Josefin+Sans">
<script src='https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js'></script>
<style class="cp-pen-styles">
@import url(https://fonts.googleapis.com/css?family=Raleway:400,500,300,600,700,800);
html, body {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
font-size: 100%;
background: #fff;
text-align: center;
font-family: "Josefin Sans","Raleway";
}
h1 {
color: #9A12B3;
}
.letterDrop {
position: relative;
top: 0;
display: inline-block;
text-transform: uppercase;
letter-spacing: 0.5em;
opacity: 0.8;
transform: rotateX(-90deg);
animation: letterDrop 1.2s ease 1 normal forwards;
}
@keyframes letterDrop {
10% {
opacity: 0.5;
}
20% {
opacity: 0.8;
top: 3.75em;
transform: rotateX(-360deg);
}
100% {
opacity: 1;
top: 4.50em;
transform: rotateX(360deg);
}
}
.centered
{
position: absolute;
top:50%;
left: 50%;
transform: translate(-50%,-50%);
}
.card {
padding: 10px 5px;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
transition: 0.3s;
}
.card:hover {
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
}
h1
{
font-size: 48px;
}
a
{
font-size: 6vh;
}
span:nth-child(2n) {
color: #663399;
}
</style>
</head>
<body style="background-color:#87CEEB">
<div id = "audio" style = "display: none;">
<audio controls autoplay>
<source src="https://archive.org/download/DontWorryBeHappy_586/BobMarley-DontWorryBeHappy.mp3" type="audio/mpeg">
<!-- <source src ="creditsInterstellar.ogg" type="audio/ogg"> -->
<p>If you can read this, your browser does not support the audio element.</p>
</audio>
</div>
<div class = "centered">
<h1><a href = "https://www.youtube.com/watch?v=rNSnfXl1ZjU" style = " text-decoration:none; color:inherit;">Be Happy : )</h1>
</a></div>
<script src='//production-assets.codepen.io/assets/common/stopExecutionOnTimeout-b2a7b3fe212eaa732349046d8416e00a9dec26eb7fd347590fbced3ab38af52e.js'></script><script src='//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script >(function($) {
$.fn.letterDrop = function() {
// Chainability
return this.each( function() {
var obj = $( this );
var drop = {
arr : obj.text().split( '' ),
range : {
min : 1,
max : 9
},
styles : function() {
var dropDelays = '\n', addCSS;
for ( i = this.range.min; i <= this.range.max; i++ ) {if (window.CP.shouldStopExecution(1)){break;}if (window.CP.shouldStopExecution(1)){break;}if (window.CP.shouldStopExecution(1)){break;}
dropDelays += '.ld' + i + ' { animation-delay: 1.' + i + 's; }\n';
}
window.CP.exitedLoop(1);
window.CP.exitedLoop(1);
window.CP.exitedLoop(1);
addCSS = $( '<style>' + dropDelays + '</style>' );
$( 'head' ).append( addCSS );
},
main : function() {
var dp = 0;
obj.text( '' );
$.each( this.arr, function( index, value ) {
dp = dp.randomInt( drop.range.min, drop.range.max );
if ( value === ' ' )
value = ' '; //Add spaces
obj.append( '<span class="letterDrop ld' + dp + '">' + value + '</span>' );
});
}
};
Number.prototype.randomInt = function ( min, max ) {
return Math.floor( Math.random() * ( max - min + 1 ) + min );
};
// Create styles
drop.styles();
// Initialise
drop.main();
});
};
}(jQuery));
// USAGE
$( 'h1' ).letterDrop();
//# sourceURL=pen.js
</script><script src="//production-assets.codepen.io/assets/editor/live/check-c263eb37bf3a3d49b8311c096168b478f5750c61a1166ea2cc660498870d671f.js"></script>
</body></html>