-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.gohtml
More file actions
144 lines (126 loc) · 4.32 KB
/
error.gohtml
File metadata and controls
144 lines (126 loc) · 4.32 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
{{- $title := .Status | str_status -}}
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, maximum-scale=5">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<style>
@import url('https://fonts.googleapis.com/css?family=Roboto+Mono');
.center-xy {
position: relative;
}
html, body {
font-family: 'Roboto Mono', monospace;
font-size: 16px;
width: 100%;
height: 100%;
}
html {
box-sizing: border-box;
user-select: none;
}
body {
background-color: #000;
}
*, *:before, *:after {
box-sizing: inherit;
margin: 0;
padding: 0;
}
.container {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.copy-container {
text-align: center;
}
p {
color: #fff;
letter-spacing: .2px;
margin: 0;
}
.handle {
background: #ffe500;
width: 10px;
height: 20px;
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;
}
}
@media screen and (min-width: 768px) {
p {
font-size: 24px;
}
.handle {
width: 14px;
height: 30px;
}
}
</style>
<title>{{.Status}} - {{$title}}</title>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.1/dist/gsap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.1/dist/SplitText.min.js"></script>
</head>
<body>
<div class="container">
<div class="copy-container center-xy">
<p>
{{.Status}}, {{$title | str_lower}}.
</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>
<script>
document.addEventListener('DOMContentLoaded', () => {
gsap.registerPlugin(SplitText);
gsap.defaults({overwrite: 'auto'});
const width = document.querySelector('.copy-container > p').clientWidth;
const splitText = SplitText.create('.copy-container', {type: 'words'});
const splitTextTl = gsap.timeline();
const handleTL = gsap.timeline();
const tl = gsap.timeline();
tl.add(function() {
animateCopy();
blinkHandle();
}, 0.2);
function animateCopy() {
splitText.split({type: 'chars, words'});
splitTextTl.from(splitText.chars, {stagger: {each: 0.05, amount: 1, duration: 0.001, onComplete: animateHandle}, autoAlpha: 0, ease: 'back.inOut(1.7)'});
}
function blinkHandle() {
handleTL.fromTo('.handle', {duration: 0.4, autoAlpha: 0}, {duration: 0.4, autoAlpha: 1, repeat: -1, yoyo: true});
}
function animateHandle() {
handleTL.to('.handle', {duration: 0.7, x: width, ease: 'steps(12)'});
}
document.querySelector('#cb-replay').addEventListener('click', () => {
splitTextTl.restart();
handleTL.restart();
});
});
</script>
</body>
</html>