-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact.html
252 lines (225 loc) · 6.89 KB
/
contact.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contact - 3Z0</title>
<link rel="stylesheet" href="/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<style>
/* Fade-in Animation */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(-20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Slide-in Animation for Popup */
@keyframes slideIn {
from {
opacity: 0;
transform: translate(-50%, -60%);
}
to {
opacity: 1;
transform: translate(-50%, -50%);
}
}
/* Bounce Hover Effect */
@keyframes bounce {
0%, 100% {
transform: translateY(0);
}
50% {
transform: translateY(-5px);
}
}
.funny-popup {
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: rgba(0, 0, 0, 0.9);
color: #fff;
padding: 20px;
border-radius: 8px;
font-size: 1.2rem;
text-align: center;
z-index: 1000;
animation: slideIn 0.5s ease-in-out;
}
.funny-popup button {
margin-top: 15px;
padding: 10px 20px;
background: #ff4747;
border: none;
color: #fff;
cursor: pointer;
border-radius: 5px;
}
/* Form Inputs: Flash Effect */
@keyframes flash {
0%, 100% {
background-color: #ff4747;
}
50% {
background-color: #fff;
}
}
input, textarea {
transition: background 0.3s ease-in-out;
}
input:focus, textarea:focus {
animation: flash 0.5s ease-in-out 3;
}
/* Navbar & Footer Fade-in */
.navbar, .footer {
animation: fadeIn 0.8s ease-in-out;
}
/* Hamburger Menu */
.menu-toggle {
display: none;
font-size: 1.5rem;
cursor: pointer;
transition: transform 0.3s ease;
}
.menu-toggle:hover {
transform: rotate(90deg);
}
@media (max-width: 768px) {
.menu-toggle {
display: block;
}
.nav-links {
display: none;
position: absolute;
top: 100%;
left: 0;
right: 0;
background-color: var(--background);
padding: 1rem;
text-align: center;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
opacity: 0;
transform: translateY(-10px);
transition: opacity 0.4s ease, transform 0.4s ease;
}
.nav-links.active {
display: flex;
flex-direction: column;
gap: 1rem;
opacity: 1;
transform: translateY(0);
}
}
</style>
</head>
<body>
<div id="navbar-container"></div>
<header class="page-header">
<h1>Contact Us</h1>
<p>Get in touch with our team</p>
</header>
<main class="contact-content">
<div class="contact-container">
<div class="contact-info">
<h2>Get In Touch</h2>
<p>Have a question or feedback? We'd love to hear from you.</p>
<div class="info-item">
<i class="fas fa-envelope"></i>
<p>no-reply@3Z0.org</p>
</div>
<div class="info-item">
<i class="fas fa-phone"></i>
<p>+1 (866) 246-6453</p>
</div>
<div class="info-item">
<i class="fas fa-location-dot"></i>
<p>123 Blog Street, Digital City</p>
</div>
</div>
<form class="contact-form" id="contactForm">
<div class="form-group">
<label for="name">Name</label>
<input type="text" id="name" name="name" required>
</div>
<div class="form-group">
<label for="email">Email</label>
<input type="email" id="email" name="email" required>
</div>
<div class="form-group">
<label for="subject">Subject</label>
<input type="text" id="subject" name="subject" required>
</div>
<div class="form-group">
<label for="message">Message</label>
<textarea id="message" name="message" required></textarea>
</div>
<button type="submit" class="submit-btn">Send Message</button>
</form>
</div>
</main>
<!-- Funny Popup -->
<div class="funny-popup" id="funnyPopup">
<p>Oops! Looks like our developers were too lazy to code this feature. 😂</p>
<p>Just email us instead at: <strong>no-reply@3Z0.org</strong></p>
<button onclick="closePopup()">Close</button>
</div>
<div id="footer-container"></div>
<script>
function loadComponent(containerId, filePath) {
fetch(filePath)
.then(response => response.text())
.then(html => {
document.getElementById(containerId).innerHTML = html;
// Set Active Class Dynamically Based on Current Page
const currentPath = window.location.pathname;
document.querySelectorAll('#navbar-container .nav-links a').forEach(link => {
if (link.getAttribute('href') === currentPath) {
link.classList.add('active');
} else {
link.classList.remove('active');
}
});
})
.catch(error => console.error(`Error loading ${filePath}:`, error));
}
document.addEventListener("DOMContentLoaded", function () {
loadComponent('navbar-container', '/styling/navbar.html');
loadComponent('footer-container', '/styling/footer.html');
});
document.addEventListener("DOMContentLoaded", function () {
document.body.addEventListener("click", function (event) {
if (event.target.closest(".menu-toggle")) {
const navLinks = document.querySelector(".nav-links");
if (navLinks) navLinks.classList.toggle("active");
}
});
});
// Function to show popup
function showPopup() {
document.getElementById("funnyPopup").style.display = "block";
}
// Function to close popup
function closePopup() {
document.getElementById("funnyPopup").style.display = "none";
}
// Attach event listeners
document.getElementById("contactForm").addEventListener("submit", function(event) {
event.preventDefault();
showPopup();
});
document.querySelectorAll("input, textarea").forEach((element) => {
element.addEventListener("focus", function() {
showPopup();
element.blur();
});
});
</script>
</body>
</html>