-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontact.html
More file actions
322 lines (302 loc) · 15.6 KB
/
contact.html
File metadata and controls
322 lines (302 loc) · 15.6 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
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
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<meta name="keywords" content="Kavish Pandit,Kavish,beastgetssavvy13, web developer, techie">
<meta name="description" content="Portfolio of Kavish Pandit">
<meta name="author" content="Kavish Pandit">
<!-- Favicon -->
<link rel="apple-touch-icon" sizes="180x180" href="./assets/kavish.PNG">
<link rel="icon" type="image/png" sizes="32x32" href="./assets/kavish.PNG">
<link rel="icon" type="image/png" sizes="16x16" href="./assets/kavish.PNG">
<link rel="manifest" href="./assets/site.webmanifest">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=Roboto&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./styles/navbar.css">
<link rel="stylesheet" href="./styles/contact.css">
<title>Kavish Pandit | Contact</title>
</head>
<body style="background-color: black;">
<nav class="navbar navbar-expand-lg sticky-top navbar-light bg-white">
<a class="navbar-brand" href="index.html">
<div id="logo-top" style="padding-top:5px;">
<div style="border-top:4px solid #006AFF; width:72%;"></div>
<p style="font-family:'Courier New', Courier, monospace;font-size:30px;"><b><img src="./assets/kavish.PNG"
alt="instagram" style="height:60px;"> ThePixelatedCoder™</b></p>
</div>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<div class="toggle-cover">
<div class="toggle-top"></div>
<div class="toggle-mid"></div>
<div class="toggle-mid"></div>
<div class="toggle-bottom"></div>
</div>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto" style="margin-right:100px;">
<li class="nav-item">
<a class="nav-link active" href="index.html">
<p style="font-family:'Lucida Console', Monaco, monospace;font-size:25px;">Home</p>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="achievements.html">
<p style="font-family:'Lucida Console', Monaco, monospace;font-size:25px;">Achievments</p>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="project.html">
<p style="font-family:'Lucida Console', Monaco, monospace;font-size:25px;">Projects</p>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="skill.html">
<p style="font-family:'Lucida Console', Monaco, monospace;font-size:25px;">Skills</p>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="contact.html">
<p style="font-family:'Lucida Console', Monaco, monospace;font-size:25px;">Coding</p>
</a>
</li>
<li class="nav-item">
<a class="nav-link" target="_blank" href="./public/Resume main.pdf">
<p style="font-family:'Lucida Console', Monaco, monospace;font-size:25px;">Resume</p>
</a>
</li>
</ul>
</div>
</nav>
<div class="container-fluid">
<div class="row" style="text-align:center; margin-top:40px;">
<div class="col-12">
<h1><p style="font-family:'Lucida Console', Monaco, monospace;font-size:25px;color:white;">My Coding Platform Profiles</p></h1>
</div>
<div class="col-2 col-lg-4"></div>
<div class="col-8 col-lg-4">
<div class="row" style="text-align:center; margin-top:40px; margin-bottom: 50px;">
<div class="col-4">
<a href="https://auth.geeksforgeeks.org/user/lockdowncoder21/practice/" target="_blank" rel="noreferrer"
aria-label="Contact on Github">
<picture>
<source srcset="./assets/ezgif.com-gif-maker.webp" type="image/webp">
<source srcset="./assets/instagram-logo.jpeg 1x" type="image/jpeg">
<img src="./assets/gfg.png" alt="instagram" style="height:40px;">
</picture>
<p style="color:white;font-family:'Lucida Console',Monaco, monospace;font-size:15px;">GeeksforGeeks</p>
</a>
</div>
<div class="col-4">
<a href="https://www.hackerrank.com/pixelated_coder?hr_r=1" target="_blank" rel="noreferrer"
aria-label="Contact on Linkedin">
<picture>
<source srcset="./assets/hackerrank-logo.webp" type="image/webp">
<img src="./assets/hackerrank-logo.webp" alt="linkedin" style="height:40px;">
</picture>
<p style="color:white;font-family:'Lucida Console',Monaco, monospace;font-size:15px;">HackerRank</p>
</a>
</div>
<div class="col-4">
<a href="https://www.linkedin.com/in/kavishpandit-b9915b1b1/" target="_blank" rel="noreferrer"
aria-label="Contact on Instagram">
<picture>
<source srcset="./assets/linkedin-logo.webp 1x" type="image/webp">
<source srcset="./assets/linkedin-logo.webp 1x" type="image/jpeg">
<img src="./assets/linkedin-logo.webp" alt="instagram" style="height:40px;">
</picture>
<p style="color:white;font-family:'Lucida Console',Monaco, monospace;font-size:15px;">Linkedin</p>
</a>
</div>
</div>
<div class="col">
<a href="https://github.com/beastgetssavvy13?tab=repositories" target="_blank" rel="noreferrer" aria-label="Contact on Instagram">
<picture>
<source srcset="./assets/github-logo.png" type="image/webp">
<source srcset="./assets/github-logo.png" type="image/jpeg">
<img src="./assets/github-logo.png" alt="instagram" style="height:40px;">
</picture>
<p style="color:white;font-family:'Lucida Console',Monaco, monospace;font-size:15px;">Github</p>
</a>
</div>
</div>
<div class="col-2 col-lg-4"></div>
</div>
<div class="col-2 col-lg-4"></div>
</div>
<div class="row">
<div class="col-12" style="text-align:center; margin-top:40px;">
<h1><p style="color:white;font-family:'Lucida Console',Monaco, monospace;font-size:25px;">Drop a message</p></h1>
</div>
</div>
<div class="row">
<div class="col-12 col-lg-4"></div>
<div class="col-12 col-lg-4" style="margin-top:10px; padding : 20px; margin-bottom:100px;">
<div class="row">
<div class="col-12">
<label for="name">Full name<sup>*</sup></label>
<input oninput="nameVerify(event); activateBtn()" type="text" id="name" name=""
style="width : 100%" title="Enter your full name">
</div>
<div class="col-12">
<label for="email">Email<sup>*</sup></label>
<input oninput="emailVerify(event); activateBtn()" type="text" id="email" name=""
style="width : 100%" title="Enter your email">
</div>
<div class="col-12">
<label for="message">Message<sup>*</sup></label>
<textarea id="message" oninput="messageVerify(event); activateBtn()"
style="width : 100%; min-height : 150px" title="Enter your message"></textarea>
</div>
<div class="col-12" style="margin-top:30px; text-align:center">
<button id="submit-btn" class="btn btn-primary" disabled><strong>Submit</strong></button>
</div>
</div>
</div>
<div class="col-12 col-lg-4"></div>
</div>
</div>
<footer style="background-color:black;font-size:20px;">
<p style="text-align: center;color:white;">©</p>
<p style="text-align:center;color:white;font-family:'Lucida Console', Monaco, monospace;font-size:20px;">2020 |
Kavish Pandit | ThePixelatedCoder™ | <a href="https://github.com/beastgetssavvy13?tab=repositories"> Github
Link</p>
</a>
</footer>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"
async></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"
async></script>
<script src="./scripts/navbar.js" async></script>
<script>
function emailVerify(event) {
let re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
if (event.target == undefined) {
if (re.test(event)) {
return true;
} else {
return false;
}
}
else {
let email = event.target.value;
if (re.test(email)) {
event.target.style.borderColor = "Green";
return true;
} else {
event.target.style.borderColor = "Red";
return false;
}
}
}
function nameVerify(event) {
if (event.target == undefined) {
if (event.length > 0) {
return true;
} else {
return false;
}
}
else {
let name = event.target.value;
if (name.length > 0) {
event.target.style.borderColor = "Green";
return true;
} else {
event.target.style.borderColor = "Red";
return false;
}
}
}
function messageVerify(event) {
if (event.target == undefined) {
if (event.length > 0) {
return true;
}
else {
return false;
}
}
else {
let message = event.target.value;
if (message.length > 0) {
event.target.style.borderColor = "Green";
return true;
} else {
event.target.style.borderColor = "Red";
return false;
}
}
}
function activateBtn() {
const name = document.getElementById("name").value
const email = document.getElementById("email").value
const message = document.getElementById("message").value
if (emailVerify(email) && nameVerify(name) && messageVerify(message)) {
document.getElementById("submit-btn").disabled = false;
} else {
document.getElementById("submit-btn").disabled = true;
}
}
</script>
<script src="https://www.gstatic.com/firebasejs/7.13.2/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.13.2/firebase-firestore.js"></script>
<script>
// Your web app's Firebase configuration
var firebaseConfig = {
apiKey: "AIzaSyCc8-lTUMli8Sf-JUsiQafTan-EcBlooj0",
authDomain: "portfolio-364e6.firebaseapp.com",
databaseURL: "https://portfolio-364e6.firebaseio.com",
projectId: "portfolio-364e6",
storageBucket: "portfolio-364e6.appspot.com",
messagingSenderId: "1060073827936",
appId: "1:1060073827936:web:b334eb94b8feab88631d05",
measurementId: "G-Y7TT28BEM1"
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
const db = firebase.firestore();
window.onload = () => {
document.getElementById("submit-btn").addEventListener('click', () => {
const name = document.getElementById("name").value
const email = document.getElementById("email").value
const message = document.getElementById("message").value
const data = {
name, email, message,
time: new Date(Date.now()).toLocaleString().split(',')[0]
};
if (emailVerify(email) && nameVerify(name) && messageVerify(message)) {
document.getElementById("submit-btn").innerHTML = "Sending...";
db.collection('user-data').add(data)
.then((res) => {
console.log("Inserted");
// data inserted successfully
document.getElementById("submit-btn").style.backgroundColor = "#4BB543";
document.getElementById("submit-btn").style.borderColor = "#4BB543";
document.getElementById("submit-btn").innerHTML = "Message Sent Successfully!";
})
.catch((err) => {
// data failed to insert
console.log("LOL");
document.getElementById("submit-btn").style.backgroundColor = "#FF0000";
document.getElementById("submit-btn").style.borderColor = "#FF0000";
document.getElementById("submit-btn").innerHTML = "Error!";
});
}
})
}
</script>
</body>
</html>