404lab 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -0
- package/bin/index.js +176 -0
- package/package.json +31 -0
- package/templates/AmongUs.tsx +111 -0
- package/templates/BlueGlitch.tsx +118 -0
- package/templates/ModernPage.tsx +20 -0
- package/templates/Poet.tsx +70 -0
- package/templates/RetroTv.tsx +162 -0
- package/templates/SimplePage.tsx +25 -0
- package/templates/Snow.tsx +208 -0
- package/templates/StoneAge.tsx +37 -0
- package/templates/StrangerThings.tsx +441 -0
- package/templates/Terminal404.tsx +268 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
|
|
5
|
+
const SimplePage = () => {
|
|
6
|
+
return (
|
|
7
|
+
<main className="flex min-h-screen items-center justify-center bg-black text-white">
|
|
8
|
+
<div className="w-full max-w-[420px] rounded-2xl border border-neutral-800 bg-neutral-950 px-8 py-10 text-center">
|
|
9
|
+
<h1 className="text-6xl font-bold tracking-tight">404</h1>
|
|
10
|
+
<h2 className="mt-2 text-sm font-medium">Page not found</h2>
|
|
11
|
+
<p className="mt-3 text-sm text-neutral-400">
|
|
12
|
+
The page you're looking for doesn't exist or was moved.
|
|
13
|
+
</p>
|
|
14
|
+
<Link
|
|
15
|
+
href="/"
|
|
16
|
+
className="mt-8 inline-block rounded-xl bg-white px-6 py-3 text-sm font-semibold text-black transition hover:opacity-90"
|
|
17
|
+
>
|
|
18
|
+
Go back home
|
|
19
|
+
</Link>
|
|
20
|
+
</div>
|
|
21
|
+
</main>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default SimplePage;
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useEffect, useRef } from "react";
|
|
4
|
+
import Link from "next/link";
|
|
5
|
+
|
|
6
|
+
export default function Snow() {
|
|
7
|
+
const canvasRef = useRef<HTMLCanvasElement | null>(null);
|
|
8
|
+
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
const canvas = canvasRef.current!;
|
|
11
|
+
const ctx = canvas.getContext("2d")!;
|
|
12
|
+
let width = 0;
|
|
13
|
+
let height = 0;
|
|
14
|
+
|
|
15
|
+
interface Particle {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
dx: number;
|
|
19
|
+
dy: number;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
let particles: Particle[] = [];
|
|
23
|
+
|
|
24
|
+
const reset = (p: Particle) => {
|
|
25
|
+
p.y = Math.random() * height;
|
|
26
|
+
p.x = Math.random() * width;
|
|
27
|
+
p.dx = Math.random() - 0.5;
|
|
28
|
+
p.dy = Math.random() * 0.5 + 0.5;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
function createParticles(count: number) {
|
|
32
|
+
particles = [];
|
|
33
|
+
for (let i = 0; i < count; i++) {
|
|
34
|
+
const p: Particle = { x: 0, y: 0, dx: 0, dy: 0 };
|
|
35
|
+
reset(p);
|
|
36
|
+
particles.push(p);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function resize() {
|
|
41
|
+
width = window.innerWidth;
|
|
42
|
+
height = window.innerHeight;
|
|
43
|
+
canvas.width = width;
|
|
44
|
+
canvas.height = height;
|
|
45
|
+
createParticles(Math.floor((width * height) / 10000));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function animate() {
|
|
49
|
+
ctx.clearRect(0, 0, width, height);
|
|
50
|
+
ctx.fillStyle = "#f6f9fa";
|
|
51
|
+
|
|
52
|
+
particles.forEach((p) => {
|
|
53
|
+
p.y += p.dy;
|
|
54
|
+
p.x += p.dx;
|
|
55
|
+
|
|
56
|
+
if (p.y > height) p.y = 0;
|
|
57
|
+
if (p.x > width) {
|
|
58
|
+
reset(p);
|
|
59
|
+
p.y = 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
ctx.beginPath();
|
|
63
|
+
ctx.arc(p.x, p.y, 5, 0, Math.PI * 2);
|
|
64
|
+
ctx.fill();
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
requestAnimationFrame(animate);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
resize();
|
|
71
|
+
animate();
|
|
72
|
+
window.addEventListener("resize", resize);
|
|
73
|
+
return () => window.removeEventListener("resize", resize);
|
|
74
|
+
}, []);
|
|
75
|
+
|
|
76
|
+
return (
|
|
77
|
+
<div className="content">
|
|
78
|
+
<canvas ref={canvasRef} id="snow" className="snow" />
|
|
79
|
+
|
|
80
|
+
<div className="main-text">
|
|
81
|
+
<h1>
|
|
82
|
+
Aw jeez.
|
|
83
|
+
<br />
|
|
84
|
+
That page has gone missing.
|
|
85
|
+
</h1>
|
|
86
|
+
<Link href="/" className="home-link">
|
|
87
|
+
Hitch a ride back home.
|
|
88
|
+
</Link>
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
<div className="ground">
|
|
92
|
+
<div className="mound">
|
|
93
|
+
<div className="mound_text">404</div>
|
|
94
|
+
<div className="mound_spade" />
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
<style jsx>{`
|
|
99
|
+
.content {
|
|
100
|
+
height: 100vh;
|
|
101
|
+
position: relative;
|
|
102
|
+
background: linear-gradient(to bottom, #bbcfe1 0%, #e8f2f6 80%);
|
|
103
|
+
overflow: hidden;
|
|
104
|
+
font-family: "Dosis", sans-serif;
|
|
105
|
+
font-size: 32px;
|
|
106
|
+
font-weight: 500;
|
|
107
|
+
color: #5d7399;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.snow {
|
|
111
|
+
position: absolute;
|
|
112
|
+
inset: 0;
|
|
113
|
+
pointer-events: none;
|
|
114
|
+
z-index: 20;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.main-text {
|
|
118
|
+
padding: 20vh 20px 0;
|
|
119
|
+
text-align: center;
|
|
120
|
+
line-height: 2em;
|
|
121
|
+
font-size: 5vh;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.home-link {
|
|
125
|
+
font-size: 0.6em;
|
|
126
|
+
color: inherit;
|
|
127
|
+
text-decoration: none;
|
|
128
|
+
opacity: 0.6;
|
|
129
|
+
border-bottom: 1px dashed rgba(93, 115, 153, 0.5);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.home-link:hover {
|
|
133
|
+
opacity: 1;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.ground {
|
|
137
|
+
position: absolute;
|
|
138
|
+
bottom: 0;
|
|
139
|
+
width: 100%;
|
|
140
|
+
height: 160px;
|
|
141
|
+
background: #f6f9fa;
|
|
142
|
+
box-shadow: 0 0 10px 10px #f6f9fa;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.mound {
|
|
146
|
+
margin-top: -80px;
|
|
147
|
+
font-size: 180px;
|
|
148
|
+
font-weight: 800;
|
|
149
|
+
text-align: center;
|
|
150
|
+
color: #dd4040;
|
|
151
|
+
position: relative;
|
|
152
|
+
pointer-events: none;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.mound::before {
|
|
156
|
+
content: "";
|
|
157
|
+
position: absolute;
|
|
158
|
+
width: 600px;
|
|
159
|
+
height: 200px;
|
|
160
|
+
left: 50%;
|
|
161
|
+
top: 50px;
|
|
162
|
+
transform: translateX(-50%);
|
|
163
|
+
border-radius: 100%;
|
|
164
|
+
background: linear-gradient(to bottom, #d0deea, #f6f9fa 60px);
|
|
165
|
+
z-index: 1;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.mound_text {
|
|
169
|
+
transform: rotate(6deg);
|
|
170
|
+
position: relative;
|
|
171
|
+
z-index: 2;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.mound_spade {
|
|
175
|
+
width: 35px;
|
|
176
|
+
height: 30px;
|
|
177
|
+
position: absolute;
|
|
178
|
+
right: 50%;
|
|
179
|
+
top: 42%;
|
|
180
|
+
margin-right: -250px;
|
|
181
|
+
background: #dd4040;
|
|
182
|
+
transform: rotate(35deg);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.mound_spade::before {
|
|
186
|
+
content: "";
|
|
187
|
+
position: absolute;
|
|
188
|
+
width: 40%;
|
|
189
|
+
height: 30px;
|
|
190
|
+
bottom: 100%;
|
|
191
|
+
left: 50%;
|
|
192
|
+
transform: translateX(-50%);
|
|
193
|
+
background: #dd4040;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.mound_spade::after {
|
|
197
|
+
content: "";
|
|
198
|
+
position: absolute;
|
|
199
|
+
width: 100%;
|
|
200
|
+
height: 30px;
|
|
201
|
+
top: -55px;
|
|
202
|
+
border: 10px solid #dd4040;
|
|
203
|
+
border-radius: 4px 4px 20px 20px;
|
|
204
|
+
}
|
|
205
|
+
`}</style>
|
|
206
|
+
</div>
|
|
207
|
+
);
|
|
208
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import Link from "next/link";
|
|
2
|
+
|
|
3
|
+
export default function StoneAge() {
|
|
4
|
+
return (
|
|
5
|
+
<section className="min-h-screen bg-white flex items-center justify-center font-[Arvo]">
|
|
6
|
+
<div className="w-full max-w-5xl px-4">
|
|
7
|
+
<div className="text-center">
|
|
8
|
+
<div
|
|
9
|
+
className="h-100 bg-center bg-no-repeat flex items-center justify-center"
|
|
10
|
+
style={{
|
|
11
|
+
backgroundImage:
|
|
12
|
+
"url(https://cdn.dribbble.com/users/285475/screenshots/2083086/dribbble_1.gif)",
|
|
13
|
+
}}
|
|
14
|
+
>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<div className="-mt-12">
|
|
18
|
+
<h3 className="text-2xl md:text-3xl font-semibold mb-2">
|
|
19
|
+
Looks like you're lost
|
|
20
|
+
</h3>
|
|
21
|
+
|
|
22
|
+
<p className="text-gray-600 mb-5">
|
|
23
|
+
The page you are looking for is not available!
|
|
24
|
+
</p>
|
|
25
|
+
|
|
26
|
+
<Link
|
|
27
|
+
href="/"
|
|
28
|
+
className="inline-block bg-[#39ac31] text-white px-5 py-2 rounded-md hover:opacity-90 transition"
|
|
29
|
+
>
|
|
30
|
+
Go to Home
|
|
31
|
+
</Link>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</section>
|
|
36
|
+
);
|
|
37
|
+
}
|