-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.html
89 lines (82 loc) · 4.03 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
<html>
<head>
<title>Contact Me</title>
<link rel="stylesheet" href="index.css">
<link rel="stylesheet" href="contact.css">
<script src="https://kit.fontawesome.com/a2ae6297fc.js" crossorigin="anonymous"></script>
<script>
function confirmSend() {
alert("Your message has been sent. Thank you for contacting me.");
}
function validateForm() {
var name = document.getElementById("name").value;
var email = document.getElementById("email").value;
var phone = document.getElementById("phone").value;
var message = document.getElementById("message").value;
if (name == "" || email == "" || phone == "" || message == "") {
alert("Please fill out all the fields.");
return false;
}
else {
confirmSend()
}
}
</script>
</head>
<body data-nav="false" id="B">
<main id="0">
<h1>Contact Me</h1>
<p>If you have any questions or feedback, please fill out the form below and I will get back to you as soon as
possible.</p>
<form action="mailto:[email protected]" method="post" enctype="text/plain"
onsubmit="return validateForm()">
<label for="name">Name.</label>
<input type="text" id="name" name="name" required>
<label for="email">Email.</label>
<input type="email" id="email" name="email" required>
<label for="phone">Phone.</label>
<input type="tel" id="phone" name="phone" pattern="[0-9]{3}-[0-9]{3}-[0-9]{4}" placeholder="123-456-7890">
<label for="message">Message.</label>
<textarea id="message" name="message" rows="10" cols="40" required></textarea>
<div class="btn-cont">
<input type="submit" value="Send">
<input type="reset" value="Reset">
</div>
</form>
</main>
<nav>
<div id="nav-links">
<a class="nav-link" href="/index.html">
<h2 class="nav-link-label rubik-font">Home</h2>
<img class="nav-link-image"
src="https://images.unsplash.com/photo-1666091863721-54331a5db52d?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=987&q=80" />
</a>
<a class="nav-link" href="/work.html">
<h2 class="nav-link-label rubik-font">Work</h2>
<img class="nav-link-image"
src="https://images.unsplash.com/photo-1666055642230-1595470b98fd?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=995&q=80" />
</a>
<a class="nav-link" href="/about.html">
<h2 class="nav-link-label rubik-font">About</h2>
<img class="nav-link-image"
src="https://images.unsplash.com/photo-1666005487638-61f45819c975?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=987&q=80" />
</a>
<a class="nav-link" href="#">
<h2 class="nav-link-label rubik-font">Contact</h2>
<img class="nav-link-image"
src="https://images.unsplash.com/photo-1665910407771-bc84ad45676b?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=776&q=80" />
</a>
<a class="nav-link" href="#">
<h2 class="nav-link-label rubik-font">Join Us</h2>
<img class="nav-link-image"
src="https://images.unsplash.com/photo-1553356084-58ef4a67b2a7?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=987&q=80" />
</a>
</div>
</nav>
<button id="nav-toggle" type="button" onclick="toggleNav()">
<i class="fa-solid fa-bars " id="menu"></i>
<i class="fa-solid fa-xmark cross" id="close"></i>
</button>
<script src="index.js"></script>
</body>
</html>