-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.html
121 lines (101 loc) · 5.06 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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<title>Sangeeta Shetty</title>
<!-- meta tags -->
<meta charset="UTF-8">
<meta name="description" content="Sangeeta Shetty">
<meta name="keywords" content="portfolio, sangeeta, programmer, web developer">
<meta name="author" content="Sangeeta Shetty">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- bootstrap script -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<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/[email protected]/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<!-- css file -->
<link rel="stylesheet" href="css/style.css">
<!-- font-awesome link -->
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300&display=swap" rel="stylesheet">
</head>
<body>
<div style="background-color: #191919;">
<nav class="navbar navbar-expand-lg navbar-dark container">
<a class="navbar-brand " href="#"><b>Sangeeta</b></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo02" aria-controls="navbarTogglerDemo02" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarTogglerDemo02">
<ul class="navbar-nav mr-auto mt-3 ml-3 mt-lg-0">
<li class="nav-item">
<a class="nav-link mr-2" href="./home.html">Home</a>
</li>
<li class="nav-item">
<a class="nav-link mr-2" href="./capture.html">Captures</a>
</li>
<li class="nav-item">
<a class="nav-link mr-2" href="#">Contact</a>
</li>
</ul>
</div>
</nav>
</div>
<div class="container mt-5">
<h2>I am looking for an Opportunity</h2>
<p class="mb-5">Send me a message with your email id</p>
<form id="myForm">
<div class="form-group">
<label for="name">Name</label>
<input type="text" class="form-control" id="name" name="name" aria-describedby="emailHelp">
</div>
<div class="form-group">
<label for="exampleInputEmail1">Email</label>
<input type="email" class="form-control" id="exampleInputEmail1" name="gmail" aria-describedby="emailHelp">
</div>
<div class="form-group">
<label for="exampleFormControlTextarea1">Message</label>
<textarea class="form-control" id="exampleFormControlTextarea1" name="message" rows="4"></textarea>
</div>
<p class="mt-3 success__message">I got your message. I'll come back to you as soon as I get some free time</p>
<p class="mt-3 failure__message">Something went wrong</p>
<button type="submit" class="btn btn-primary mb-5">Send</button>
</form>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
// function validateForm(e) {
// var name = document.forms["myForm"]["name"].value;
// var email = document.forms["myForm"]["email"].value
// var phone = document.forms["myForm"]["phone"].value;
// if (name === "") {
// alert("Name must be filled out");
// e.preventDefault();
// } else if (email === "" && phone === "") {
// alert('Email or Phone no must be filled out');
// e.preventDefault();
// }
// else {
// sendEmail(e);
// }
// }
$('#myForm').on('submit', function(event) {
event.preventDefault(); // prevent reload
var formData = new FormData(this);
formData.append('service_id', 'service_e6j9eho');
formData.append('template_id', 'template_m7cz7x6');
formData.append('user_id', 'user_hnoVKOBKOpwcVV4rYrQUB');
$.ajax('https://api.emailjs.com/api/v1.0/email/send-form', {
type: 'POST',
data: formData,
contentType: false, // auto-detection
processData: false // no need to parse formData to string
}).done(function() {
document.querySelector('.success__message').style.display = 'block';
}).fail(function(error) {
document.querySelector('.failure__message').style.display = 'block';
});
});
</script>
</body>
</html>