-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontact.html
More file actions
221 lines (193 loc) · 9.3 KB
/
contact.html
File metadata and controls
221 lines (193 loc) · 9.3 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-Q82BJMCFHY"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-Q82BJMCFHY');
</script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./index.css">
<script src="https://kit.fontawesome.com/1bdfc5c68a.js" crossorigin="anonymous"></script>
<script src="./index.js" defer></script>
<script
type="text/javascript"
src="https://cdn.jsdelivr.net/npm/@emailjs/browser@4/dist/email.min.js">
</script>
<!-- EmailJs client. -->
<script>
(function() {
// Initializing EmailJS
emailjs.init("afQCuQv-eLc3LlB8f");
})();
</script>
<script type="text/javascript">
window.onload = function() {
const contactForm = document.getElementById('contact-form');
const contactButton = document.getElementById('submit-button');
const successMessage = document.querySelector('.success');
contactForm.addEventListener('submit', function(event) {
event.preventDefault();
// Set loading state
contactButton.classList.add('loading');
contactButton.textContent = 'Sending...';
contactButton.disabled = true;
// these IDs from the previous steps
emailjs.sendForm('service_gjfmtqp', 'template_ifr4ido', this)
.then(() => {
contactButton.classList.remove('loading');
contactForm.classList.add('hidden');
successMessage.classList.remove('hidden');
successMessage.style.display = 'flex';
successMessage.style.justifyContent = 'center';
successMessage.style.alignItems = 'center';
contactForm.reset();
// Reset back to default after 3s
setTimeout(() => {
contactButton.disabled = false;
contactForm.classList.remove('hidden');
successMessage.classList.add('hidden');
successMessage.style.display = 'none';
contactButton.textContent = 'Send Message';
}, 1000);
}, (error) => {
// console.log('FAILED...', error);
contactButton.classList.remove('loading');
contactButton.textContent = 'Error! Try Again';
// Reset back after false
setTimeout(() => {
contactButton.disabled = false;
contactButton.textContent = 'Send Message';
contactForm.reset();
}, 3000);
});
});
}
</script>
<title>Contact Erick Gitahi</title>
</head>
<body>
<header>
<h1 class="logo">Erick-WG</h1>
<!-- Desktop Nav -->
<nav class="desktop-nav">
<ul class="nav-links">
<li><a href="./index.html">Home</a></li>
<li><a href="./index.html#profile">About</a></li>
<li><a href="./index.html#projects">Projects</a></li>
<li><a href="./contact.html" class="contact-button">Contact Me</a></li>
</ul>
</nav>
<!-- Mobile Nav -->
<div class="menu" id="menu">
<span class="humberger-menu"></span>
<span class="humberger-menu"></span>
<span class="humberger-menu"></span>
</div>
<nav class="mobile-nav" id="mobile-nav">
<ul class="nav-links" id="nav-links">
<li><a href="" class="close" id="close">X</a></li>
<li><i class="fas fa-home fa-s"></i> <a href="./index.html">Home</a></li>
<li><i class="fas fa-user fa-s"></i> <a href="./index.html#profile">About</a></li>
<li><i class="fas fa-tools fa-s"></i> <a href="./index.html#projects">Projects</a></li>
<li><i class="fas fa-phone fa-s"></i> <a href="./contact.html">Contact Me</a></li>
</ul>
</nav>
</header>
<main>
<section class="contact-form-container">
<div class="title">
<h2>Contact Me</h2>
<hr>
</div>
<div class="contact-details">
<!--* Socials and connection point. -->
<div class="socials">
<div class="final-comment">
<h3>Let's Connect</h3>
<p>Thank you for visiting my portfolio!</p>
<p>I'm always open to new opportunities and collaborations. Whether you have a project in mind or just want to say hello, feel free to reach out!</p>
<p>I'm here to help and would love to hear from you.</p>
<p>Let's connect and create something amazing together!</p>
</div>
<div class="social-links">
<a href="https://www.linkedin.com/in/erick-wainaina/" target="_blank" rel="noopener noreferrer" class="social-icon">
<img src="https://cdn.jsdelivr.net/npm/devicon@latest/icons/linkedin/linkedin-original.svg" alt="LinkedIn">
</a>
<a href="https://x.com/erick_gitahi" target="_blank" rel="noopener noreferrer" class="social-icon">
<img src="https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/x.svg" alt="X">
</a>
<a href="https://github.com/Erick-WG" target="_blank" rel="noopener noreferrer" class="social-icon">
<img src="https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/github.svg" alt="GitHub">
</a>
</div>
</div>
<div class="form-section">
<!--* contact form -->
<form id="contact-form">
<div class="form-header">
<h3>Send me an Email</h3>
<p>Fill out the form below to send me a message.</p>
</div>
<div class="form-group names">
<div class="name">
<label for="fname">First Name *</label>
<input type="text" id="fname" name="name" placeholder="First Name" required>
</div>
<div class="name">
<label for="lname">Last Name *</label>
<input type="text" id="lname" name="name" placeholder="Last Name" required>
</div>
</div>
<div class="input-group">
<label for="email">Email *</label>
<input type="email" id="email" name="email" placeholder="Email Address" required>
</div>
<div class="input-group">
<label for="contact">Contact no *</label>
<input type="tel"
id="contact"
name="contact"
placeholder="Format: +123456789"
required
pattern="^\+\d{10,15}$">
</div>
<div class="input-group">
<label for="message">Message *</label>
<textarea id="message" name="message" placeholder="What would you like us to work on together?" required></textarea>
</div>
<button class="submit-btn" id="submit-button" type="submit">Send Message</button>
</form>
<div class="success hidden">
<h3 class="success-message">Message Sent Successfully <i class="fas fa-check"></i>
</h3>
</div>
</div>
</section>
</main>
<footer>
<div class="footer-main">
<div class="brand">
<h2 class="logo" >Erick-WG</h2>
<p class="tagline">
"From concept to code, with precision."
</p>
</div>
<div class="footer-nav">
<ul class="footer-links">
<li><a href="./">Home</a></li>
<li><a href="./index.html#profile">About</a></li>
<li><a href="./index.html#projects">Projects</a></li>
<li><a href="./contact.html">Contact Me</a></li>
</ul>
</div>
</div>
<hr>
<p>© 2025 Erick WG</p>
</footer>
</body>
</html>