|
1 | | -<!DOCTYPE html> |
2 | | -<html lang="de"> |
3 | | -<head> |
4 | | - <meta charset="UTF-8" /> |
5 | | - <meta name="viewport" content="width=device-width, initial-scale=1.0"/> |
6 | | - <title>Drück mich nicht!</title> |
7 | | - <style> |
8 | | - body { |
9 | | - font-family: Comic Sans MS, cursive; |
10 | | - background-color: #ffe; |
11 | | - text-align: center; |
12 | | - margin-top: 100px; |
13 | | - } |
14 | | - h1 { |
15 | | - color: #d00; |
16 | | - } |
17 | | - #funButton { |
18 | | - padding: 20px 40px; |
19 | | - font-size: 20px; |
20 | | - background-color: red; |
21 | | - color: white; |
22 | | - border: none; |
23 | | - border-radius: 10px; |
24 | | - cursor: pointer; |
25 | | - transition: all 0.3s ease; |
26 | | - position: absolute; |
27 | | - } |
28 | | - #message { |
29 | | - margin-top: 50px; |
30 | | - font-size: 24px; |
31 | | - color: green; |
32 | | - } |
33 | | - </style> |
34 | | -</head> |
35 | | -<body> |
36 | | - <h1>Drück NICHT den roten Knopf!</h1> |
37 | | - <button id="funButton">Nicht drücken!</button> |
38 | | - <div id="message"></div> |
39 | | - |
40 | | - <script> |
41 | | - const button = document.getElementById("funButton"); |
42 | | - const message = document.getElementById("message"); |
43 | | - const funnyMessages = [ |
44 | | - "Ich hab's dir gesagt!", |
45 | | - "Jetzt hast du's kaputt gemacht.", |
46 | | - "Oops... das wird teuer.", |
47 | | - "Warum hörst du nie auf Warnungen?", |
48 | | - "Zu spät! Die Aliens kommen.", |
49 | | - "Ein Lama wurde gerade teleportiert.", |
50 | | - "404 Fehler: Verantwortung nicht gefunden.", |
51 | | - ]; |
52 | | - |
53 | | - // Lässt den Button "fliehen", wenn man mit der Maus drüber fährt |
54 | | - button.addEventListener("mouseover", () => { |
55 | | - const x = Math.random() * (window.innerWidth - 200); |
56 | | - const y = Math.random() * (window.innerHeight - 100); |
57 | | - button.style.left = `${x}px`; |
58 | | - button.style.top = `${y}px`; |
59 | | - }); |
60 | | - |
61 | | - // Zeigt eine witzige Nachricht an |
62 | | - button.addEventListener("click", () => { |
63 | | - const randomMessage = funnyMessages[Math.floor(Math.random() * funnyMessages.length)]; |
64 | | - message.textContent = randomMessage; |
65 | | - }); |
66 | | - |
67 | | - // Anfangsposition des Buttons setzen |
68 | | - window.onload = () => { |
69 | | - button.style.left = "50%"; |
70 | | - button.style.top = "50%"; |
71 | | - button.style.transform = "translate(-50%, -50%)"; |
72 | | - }; |
73 | | - </script> |
74 | | -</body> |
75 | | -</html> |
| 1 | +I'm using this repository mainly as a simply [404 page](/404.html) and as a test page. |
0 commit comments