-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontact.html
More file actions
192 lines (175 loc) · 7.59 KB
/
contact.html
File metadata and controls
192 lines (175 loc) · 7.59 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contact Me!</title>
<link rel="icon" href="/favicon.ico">
<link href="https://unpkg.com/nes.css@2.3.0/css/nes.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap" rel="stylesheet">
<script src="https://cdn.tailwindcss.com"></script>
<style>
body {
background-image: url('PacMan.gif');
background-repeat: no-repeat;
background-size: cover;
background-position: center center;
color: white;
margin: 0;
padding: 0;
height: 100%;
width: 100%;
position: relative;
image-rendering: -webkit-optimize-contrast;
image-rendering: crisp-edges;
image-rendering: pixelated;
/* overflow: hidden; */
}
.img {
image-rendering: -webkit-optimize-contrast;
image-rendering: crisp-edges;
image-rendering: pixelated;
}
.navbar {
box-shadow: 0 -4px #000, 0 -8px #fff, 4px 0 #000, 4px -4px #fff, 8px 0 #fff, 0 4px #000, 0 8px #fff, -4px 0 #000, -4px 4px #fff, -8px 0 #fff, -4px -4px #fff, 4px 4px #fff;
background-color: black;
color: white;
top: 15px;
left: 20px;
right: 20px;
position: fixed;
height: 30px;
display: flex;
align-items: center;
justify-content: space-between;
z-index: 1000;
padding: 0 10px;
}
.boxxy {
box-shadow: 0 -4px #000, 0 -8px #2121ff, 4px 0 #000, 4px -4px #2121ff, 8px 0 #2121ff, 0 4px #000, 0 8px #2121ff, -4px 0 #000, -4px 4px #2121ff, -8px 0 #2121ff, -4px -4px #2121ff, 4px 4px #2121ff;
background-color: black;
color: white;
}
.nav-item {
margin: 0 10px;
}
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
z-index: 100;
justify-content: center;
align-items: center;
}
.modal-content {
background-color: white;
border-radius: 8px;
padding: 20px;
max-width: 90%;
max-height: 90%;
overflow-y: auto;
}
.hidden {
display: none;
}
.block {
display: block;
}
</style>
</head>
<body>
<header class="w-full">
<nav class="bulbula navbar">
<div class="hidden md:flex items-center justify-between w-full">
<div class="flex items-center space-x-4">
<a class="nav-item" href="blog.html">Blog</a>
<a class="nav-item" href="project.html">Projects</a>
</div>
<a href="/index.html" class="flex items-center justify-center">
<img src="indexbg/logo.png" alt="logo" class="h-8 img">
</a>
<div class="flex items-center space-x-4">
<a class="nav-item" href="about.html">About</a>
<a class="nav-item" href="contact.html">Contact</a>
</div>
</div>
<!-- Hamburger menu -->
<div class="md:hidden flex items-center justify-between w-full">
<a href="/index.html" class="flex items-center justify-start">
<img src="indexbg/logo.png" alt="logo" class="h-8 img">
</a>
<button id="menu-toggle" class="flex items-center justify-end">
<svg class="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M4 6h16M4 12h16m-7 6h7"></path>
</svg>
</button>
</div>
<div id="mobile-menu" class="hidden absolute top-0 right-0 bg-black w-full mt-14 z-50">
<a class="block py-2 px-4 text-white" href="index.html">Home</a>
<a class="block py-2 px-4 text-white" href="blog.html">Blog</a>
<a class="block py-2 px-4 text-white" href="project.html">Projects</a>
<a class="block py-2 px-4 text-white" href="about.html">About</a>
<a class="block py-2 px-4 text-white" href="contact.html">Contact</a>
</div>
</nav>
</header>
<div class="flex flex-col items-center justify-center min-h-screen">
<form id="contact-form" class="bg-gray-500 bg-opacity-50 px-6 pb-5 pt-3 rounded-lg shadow-lg w-11/12 absolute top-[70px] max-w-lg">
<h2 class="text-2xl font-bold mb-3 text-center text-white">Contact Me</h2>
<div class="mb-4">
<label for="name" class="block text-white">Name</label>
<input type="text" id="name" name="name" class="boxxy w-full px-3 py-2 mt-2 text-white" required>
</div>
<div class="mb-4">
<label for="email" class="block text-white">Email</label>
<input type="email" id="email" name="email" class="boxxy w-full px-3 py-2 mt-2 text-white" required>
</div>
<div class="mb-4">
<label for="subject" class="block text-white">Subject</label>
<input type="text" id="subject" name="subject" class="boxxy w-full px-3 py-2 mt-2 text-white" required>
</div>
<div class="mb-4">
<label for="message" class="block text-white">Message</label>
<textarea id="message" name="message" class="boxxy w-full px-3 py-2 mt-2 text-white" rows="3"
required></textarea>
</div>
<button type="submit"
class="boxxy w-full px-3 py-2 mt-2 text-white hover:text-black hover:bg-gray-200">Send</button>
</form>
</div>
<footer class="flex items-center justify-center bg-gray-900 py-4 w-full">
<p class="text-white max-[320px]:text-[8px] text-[10px] lg:text-[16px] mr-2">Copyright © 2024 --</p>
<a href="mailto:tanishvashisth@"
class="text-white max-[320px]:text-[8px] text-[10px] lg:text-[16px] underline">tanishvashisth</a>
</footer>
<script src="https://cdn.emailjs.com/dist/email.min.js"></script>
<script>
(function () {
emailjs.init('MAUBFHodMOevpbI-P');
})();
document.getElementById('menu-toggle').addEventListener('click', function () {
const menu = document.getElementById('mobile-menu');
menu.classList.toggle('hidden');
});
document.getElementById('contact-form').addEventListener('submit', function (event) {
event.preventDefault();
const serviceID = 'service_uh2awsk';
const templateID = 'template_5o5412n';
emailjs.sendForm(serviceID, templateID, this)
.then(() => {
alert('Your message has been sent successfully!');
document.getElementById('contact-form').reset();
}, (error) => {
alert('Failed to send your message. Please try again.');
console.error('Error:', error);
});
});
</script>
</body>
</html>