-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontact.html
More file actions
86 lines (76 loc) · 3.31 KB
/
contact.html
File metadata and controls
86 lines (76 loc) · 3.31 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>contact.txt</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="terminal">
<div class="terminal-header">
<span class="title">contact.txt</span>
</div>
<div class="terminal-body">
<p class="command">Mac:~ User$ <span class="typing"></span></p>
<p class="response contact-form" style="display: none;"></p>
<!-- 📧 Feel free to reach out to me using the form below:<br><br> -->
<!-- Contact Form -->
<form action="https://formspree.io/f/xyzeayow" method="POST" class="response contact-form">
<label for="name">Name:</label><br>
<input type="text" id="name" name="name" placeholder="Your Name" required><br><br>
<label for="email">Email:</label><br>
<input type="email" id="email" name="email" placeholder="Your Email" required><br><br>
<label for="message">Message:</label><br>
<textarea id="message" name="message" rows="5" placeholder="Your Message" required></textarea><br><br>
<button type="submit">Send</button>
</form>
</p>
<br>
<a href="index.html" class="terminal-link">Go back</a>
</div>
</div>
</body>
<script>
document.addEventListener("DOMContentLoaded", function () {
fetch("images/ai-den.json")
.then(response => response.json())
.then(data => {
if (data.images && data.images.length > 0) {
// Pick a random image from the JSON list
const randomImage = data.images[Math.floor(Math.random() * data.images.length)];
// Apply the random image to the pseudo-element via CSS
const style = document.createElement("style");
style.innerHTML = `
.terminal-body::after {
background: url('${randomImage}') no-repeat center;
background-size: contain;
}
`;
document.head.appendChild(style);
}
})
.catch(error => console.error("Error loading images:", error));
let commandText = "cat contact.txt"; // The typed command
let typingElement = document.querySelector(".typing");
let responseElement = document.querySelector(".contact-form");
let i = 0;
function typeCommand() {
if (i < commandText.length) {
typingElement.innerHTML = commandText.substring(0, i + 1) + '<span class="blinking-cursor">|</span>';
i++;
setTimeout(typeCommand, 100);
} else {
// Remove cursor after typing command
typingElement.innerHTML = commandText;
// Instantly show the about text
setTimeout(() => {
responseElement.style.display = "block";
}, 500);
}
}
typeCommand();
});
</script>
</body>
</html>