-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
82 lines (79 loc) · 2.57 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
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>deep2web.net</title>
<style>
body {
font-family: 'Courier New', Courier, monospace;
font-size: 16px;
margin: 0;
padding: 0;
background-color: #000;
color: #0f0;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
h1, h2 {
font-size: 1em;
}
p {
white-space: pre;
}
.cursor {
display: inline-block;
width: 0.5em;
height: 1em;
background-color: #0f0;
animation: blink 1s steps(1) infinite;
}
@keyframes blink {
50% { opacity: 0; }
}
</style>
</head>
<body>
<div class="container">
<h1>frederik@deep2web.net:~$ <span id="typed-text"></span><span class="cursor"></span></h1>
<p id="typed-info"></p>
<h1 id="new-line" style="display: none;">frederik@deep2web.net:~$</h1>
</div>
<script>
const textElement = document.getElementById('typed-text');
const infoElement = document.getElementById('typed-info');
const newLineElement = document.getElementById('new-line');
const cursorElement = document.querySelector('.cursor');
const text = 'cat > about_me.txt';
const info = 'Willkommen auf meiner Homepage.\nHier finden Sie Informationen über meine Projekte und Interessen im Bereich Softwareentwicklung und Elektronik.';
let index = 0;
let infoIndex = 0;
function typeText() {
if (index < text.length) {
textElement.textContent += text.charAt(index);
index++;
setTimeout(typeText, 100); // adjust the typing speed here
} else {
typeInfo();
}
}
function typeInfo() {
if (infoIndex < info.length) {
infoElement.textContent += info.charAt(infoIndex);
infoElement.appendChild(cursorElement);
infoIndex++;
setTimeout(typeInfo, 25); // adjust the typing speed here
} else {
setTimeout(() => {
newLineElement.style.display = 'block';
newLineElement.appendChild(cursorElement);
}, 1000); // adjust the delay here
}
}
typeText();
</script>
</body>
</html>