-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path404.php
160 lines (134 loc) · 4.07 KB
/
404.php
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div class="container">
<div class="copy-container center-xy">
<p>
404, page not found.
</p>
<span class="handle"></span>
</div>
</div>
<svg version="1.1" id="cb-replay" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 279.9 297.3" style="enable-background:new 0 0 279.9 297.3;" xml:space="preserve">
<g>
<path d="M269.4,162.6c-2.7,66.5-55.6,120.1-121.8,123.9c-77,4.4-141.3-60-136.8-136.9C14.7,81.7,71,27.8,140,27.8
c1.8,0,3.5,0,5.3,0.1c0.3,0,0.5,0.2,0.5,0.5v15c0,1.5,1.6,2.4,2.9,1.7l35.9-20.7c1.3-0.7,1.3-2.6,0-3.3L148.6,0.3
c-1.3-0.7-2.9,0.2-2.9,1.7v15c0,0.3-0.2,0.5-0.5,0.5c-1.7-0.1-3.5-0.1-5.2-0.1C63.3,17.3,1,78.9,0,155.4
C-1,233.8,63.4,298.3,141.9,297.3c74.6-1,135.1-60.2,138-134.3c0.1-3-2.3-5.4-5.3-5.4l0,0C271.8,157.6,269.5,159.8,269.4,162.6z" />
</g>
</svg>
<style>
@import url('https://fonts.googleapis.com/css?family=Roboto+Mono');
.center-xy {
width: inherit;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
position: absolute;
}
html,
body {
font-family: 'Roboto Mono', monospace;
font-size: 16px;
}
html {
box-sizing: border-box;
user-select: none;
}
body {
background-color: #000;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
.container {
width: 100%;
}
.copy-container {
text-align: center;
}
p {
color: #fff;
font-size: 24px;
letter-spacing: .2px;
margin: 0;
}
.handle {
background: #ffe500;
width: 14px;
height: 30px;
top: 0;
left: 0;
margin-top: 1px;
position: absolute;
}
#cb-replay {
fill: #666;
width: 20px;
margin: 15px;
right: 0;
bottom: 0;
position: absolute;
overflow: inherit;
cursor: pointer;
&:hover {
fill: #888;
}
}
</style>
<script>
var $copyContainer = $(".copy-container"),
$replayIcon = $('#cb-replay'),
$copyWidth = $('.copy-container').find('p').width();
var mySplitText = new SplitText($copyContainer, {
type: "words"
}),
splitTextTimeline = new TimelineMax();
var handleTL = new TimelineMax();
// WIP - need to clean up, work on initial state and handle issue with multiple lines on mobile
var tl = new TimelineMax();
tl.add(function() {
animateCopy();
blinkHandle();
}, 0.2)
function animateCopy() {
mySplitText.split({
type: "chars, words"
})
splitTextTimeline.staggerFrom(mySplitText.chars, 0.001, {
autoAlpha: 0,
ease: Back.easeInOut.config(1.7),
onComplete: function() {
animateHandle()
}
}, 0.05);
}
function blinkHandle() {
handleTL.fromTo('.handle', 0.4, {
autoAlpha: 0
}, {
autoAlpha: 1,
repeat: -1,
yoyo: true
}, 0);
}
function animateHandle() {
handleTL.to('.handle', 0.7, {
x: $copyWidth,
ease: SteppedEase.config(12)
}, 0.05);
}
$('#cb-replay').on('click', function() {
splitTextTimeline.restart()
handleTL.restart()
})
</script>
</body>
</html>