-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
355 lines (325 loc) · 13.4 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
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Joke Generator</title>
<style>
body {
background-color: #f7ecdf;
transition: background-color 0.5s ease;
font-family: Arial, sans-serif;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
opacity: 0;
animation: fadeIn 1s ease-in-out forwards;
overflow: hidden;
}
@keyframes fadeIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.container {
background-color: #fff;
border-radius: 5px;
padding: 20px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
text-align: center;
max-width: 400px;
width: 100%;
transform: translateY(-20px);
animation: slideIn 1s ease-in-out forwards;
}
@keyframes slideIn {
0% {
transform: translateY(-20px);
}
100% {
transform: translateY(0);
}
}
h1 {
color: #333;
}
.joke {
margin-bottom: 20px;
}
button {
background-color: #4caf50;
border: none;
color: #fff;
padding: 10px 20px;
font-size: 16px;
border-radius: 5px;
cursor: pointer;
opacity: 0;
animation: fadeInButton 1s ease-in-out forwards;
}
@keyframes fadeInButton {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
button:hover {
background-color: #45a049;
}
.submit-joke {
margin-top: 20px;
font-size: 14px;
color: #666;
}
.submit-joke a {
color: #666;
text-decoration: none;
}
.dark-mode {
background-color: #4d4c4c;
}
.switch-container {
display: flex;
align-items: center;
justify-content: center;
margin-top: 10px;
}
.switch-label {
font-size: 20px;
margin-right: 5px;
color: #4caf50;
}
.switch {
position: relative;
display: inline-block;
width: 40px;
height: 20px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
transition: 0.4s;
border-radius: 20px;
}
.slider:before {
position: absolute;
content: "";
height: 16px;
width: 16px;
left: 2px;
bottom: 2px;
background-color: #fff;
transition: 0.4s;
border-radius: 50%;
}
input:checked + .slider {
background-color: #4caf50;
}
input:checked + .slider:before {
transform: translateX(20px);
}
.emoji {
font-size: 16px;
vertical-align: middle;
}
.copyright {
margin-top: 20px;
font-size: 12px;
color: #666;
}
@media (max-width: 480px) {
.container {
max-width: 300px;
}
h1 {
font-size: 24px;
}
button {
font-size: 14px;
}
.submit-joke {
font-size: 12px;
}
.switch-label {
font-size: 16px;
}
}
</style>
</head>
<body>
<div class="container">
<h1>comedy.eu.org - The Simple Joke Generator</h1>
<div class="joke" id="jokeContainer">
<!-- The generated joke will appear here -->
</div>
<button onclick="generateJoke()">Generate Joke</button>
<div class="submit-joke">
<a href="https://forms.gle/r84iJv9Fn772WuFF9" target="_blank">Submit Your Joke</a>
</div>
<div class="switch-container">
<span class="switch-label">☀️</span>
<label class="switch">
<input type="checkbox" onclick="toggleDarkMode()">
<span class="slider"></span>
</label>
<span class="switch-label">🌙</span>
</div>
<div class="copyright">
© 2023 comedy.eu.org - All rights reserved.
</div>
<script>
function generateJoke() {
var jokes = [
"Why don't scientists trust atoms? Because they make up everything!",
"Did you hear about the mathematician who's afraid of negative numbers? He will stop at nothing to avoid them!",
"Why was the math book sad? Because it had too many problems!",
"What did the left eye say to the right eye? Between you and me, something smells!",
"Why did the scarecrow win an award? Because he was outstanding in his field!",
"What did one wall say to the other wall? I'll meet you at the corner!",
"Why did the bicycle fall over? It was two-tired!",
"What did the grape say when it got stepped on? Nothing, it just let out a little wine!",
"What's orange and sounds like a parrot? A carrot!",
"Why did the tomato turn red? Because it saw the salad dressing!",
// Add more jokes here...
"Why don't scientists trust atoms? Because they make up everything!",
"Did you hear about the mathematician who's afraid of negative numbers? He will stop at nothing to avoid them!",
"Why was the math book sad? Because it had too many problems!",
"What did the left eye say to the right eye? Between you and me, something smells!",
"Why did the scarecrow win an award? Because he was outstanding in his field!",
"What did one wall say to the other wall? I'll meet you at the corner!",
"Why did the bicycle fall over? It was two-tired!",
"What did the grape say when it got stepped on? Nothing, it just let out a little wine!",
"What's orange and sounds like a parrot? A carrot!",
"Why did the tomato turn red? Because it saw the salad dressing!",
"What do you call a bear with no teeth? A gummy bear!",
"Why don't eggs tell jokes? They might crack up!",
"Why don't scientists trust atoms? Because they make up everything!",
"Why don't skeletons fight each other? They don't have the guts!",
"Why did the scarecrow win an award? Because he was outstanding in his field!",
"What did one hat say to the other hat? You stay here, I'll go on ahead!",
"How does a train eat? It goes chew, chew!",
"Why was the math book sad? Because it had too many problems!",
"What did the left eye say to the right eye? Between you and me, something smells!",
// Add more jokes here
"Why did the math book look sad? Because it had too many problems!",
"Why don't eggs tell jokes? Because they might crack up!",
"Why did the bicycle fall over? It was two-tired!",
"What do you call a bear with no teeth? A gummy bear!",
"What do you call fake spaghetti? An impasta!",
"Why did the tomato turn red? Because it saw the salad dressing!",
"Why don't skeletons fight each other? They don't have the guts!",
"How do you organize a space party? You planet!",
"What do you call a fake noodle? An impasta!",
"Why couldn't the bicycle find its way home? It lost its bearings!",
"Why did the golfer bring two pairs of pants? In case he got a hole in one!",
"Why did the scarecrow win an award? Because he was outstanding in his field!",
"What do you call a bear with no teeth? A gummy bear!",
"How does a penguin build its house? Igloos it together!",
"Why don't you ever see elephants hiding in trees? Because they're so good at it!",
"Why did the tomato turn red? Because it saw the salad dressing!",
"How do you make a tissue dance? You put a little boogie in it!",
"Why did the bicycle fall over? It was two-tired!",
"What do you get if you cross a snowman and a vampire? Frostbite!",
"What do you call a bear with no teeth? A gummy bear!",
"Why don't scientists trust atoms? Because they make up everything!",
"Why did the scarecrow win an award? Because he was outstanding in his field!",
"What's brown and sticky? A stick!",
"Why don't skeletons fight each other? They don't have the guts!",
"What did one hat say to the other hat? You stay here, I'll go on ahead!",
"How does a train eat? It goes chew, chew!",
"Why was the math book sad? Because it had too many problems!",
"What did the left eye say to the right eye? Between you and me, something smells!",
"What do you call a fake noodle? An impasta!",
"What's orange and sounds like a parrot? A carrot!",
"Why don't eggs tell jokes? They might crack up!",
"Why did the bicycle fall over? It was two-tired!",
"What do you call a bear with no teeth? A gummy bear!",
"What do you call fake spaghetti? An impasta!",
"Why did the tomato turn red? Because it saw the salad dressing!",
"Why don't skeletons fight each other? They don't have the guts!",
"How do you organize a space party? You planet!",
"What do you call a fake noodle? An impasta!",
"Why couldn't the bicycle find its way home? It lost its bearings!",
"Why did the golfer bring two pairs of pants? In case he got a hole in one!",
"Why did the scarecrow win an award? Because he was outstanding in his field!",
"What do you call a bear with no teeth? A gummy bear!",
"How does a penguin build its house? Igloos it together!",
"Why don't you ever see elephants hiding in trees? Because they're so good at it!",
"Why did the tomato turn red? Because it saw the salad dressing!",
"How do you make a tissue dance? You put a little boogie in it!",
"Why did the bicycle fall over? It was two-tired!",
"What do you get if you cross a snowman and a vampire? Frostbite!",
"What do you call a bear with no teeth? A gummy bear!",
"Why don't scientists trust atoms? Because they make up everything!",
"Why did the scarecrow win an award? Because he was outstanding in his field!",
"What's brown and sticky? A stick!",
"Why don't skeletons fight each other? They don't have the guts!",
"What did one hat say to the other hat? You stay here, I'll go on ahead!",
"How does a train eat? It goes chew, chew!",
"Why was the math book sad? Because it had too many problems!",
"What did the left eye say to the right eye? Between you and me, something smells!",
"What do you call a fake noodle? An impasta!",
"What's orange and sounds like a parrot? A carrot!",
"Why don't eggs tell jokes? They might crack up!",
"Why did the bicycle fall over? It was two-tired!",
"What do you call a bear with no teeth? A gummy bear!",
"What do you call fake spaghetti? An impasta!",
"Why did the tomato turn red? Because it saw the salad dressing!",
"Why don't skeletons fight each other? They don't have the guts!",
"How do you organize a space party? You planet!",
"What do you call a fake noodle? An impasta!",
"Why couldn't the bicycle find its way home? It lost its bearings!",
"Why did the golfer bring two pairs of pants? In case he got a hole in one!",
"Why did the scarecrow win an award? Because he was outstanding in his field!",
"What do you call a bear with no teeth? A gummy bear!",
"How does a penguin build its house? Igloos it together!",
"Why don't you ever see elephants hiding in trees? Because they're so good at it!",
"Why did the tomato turn red? Because it saw the salad dressing!",
"How do you make a tissue dance? You put a little boogie in it!",
"Why did the bicycle fall over? It was two-tired!",
"What do you get if you cross a snowman and a vampire? Frostbite!",
"What do you call a bear with no teeth? A gummy bear!",
"Why don't scientists trust atoms? Because they make up everything!",
"Why did the scarecrow win an award? Because he was outstanding in his field!",
"What's brown and sticky? A stick!",
"Why don't skeletons fight each other? They don't have the guts!",
"What did one hat say to the other hat? You stay here, I'll go on ahead!",
"How does a train eat? It goes chew, chew!"
];
var jokeContainer = document.getElementById("jokeContainer");
var randomIndex = Math.floor(Math.random() * jokes.length);
jokeContainer.innerText = jokes[randomIndex];
}
function toggleDarkMode() {
var body = document.querySelector("body");
body.classList.toggle("dark-mode");
}
</script>
<script>
window.addEventListener("DOMContentLoaded", function() {
var container = document.querySelector(".container");
container.style.opacity = "1";
container.style.transform = "translateY(0)";
var button = document.querySelector("button");
button.style.opacity = "1";
});
</script>
</div>
</body>
</html>