-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.html
164 lines (142 loc) · 4.04 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Contact Me</title>
<link rel="stylesheet" type="text/css" href="contact.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/fonts/remixicon.css">
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
padding: 0;
min-height: 100vh;
display: flex;
flex-direction: column;
}
h1 {
text-align: center;
color: #333;
}
form {
max-width: 400px;
margin: 20px auto;
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
label {
display: block;
margin-bottom: 8px;
color: #333;
}
input,
textarea {
width: 100%;
padding: 8px;
margin-bottom: 16px;
box-sizing: border-box;
border: 1px solid #ccc;
border-radius: 4px;
}
input[type="submit"] {
background-color: #4caf50;
color: #fff;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #45a049;
}
footer {
margin-top: auto; /* Push the footer to the bottom */
padding: 10px;
background-color: #333;
color: #fff;
text-align: center;
}
.footer_socials {
display: flex;
align-items: center;
gap: 1rem;
flex-wrap: wrap;
}
.footer_socials a {
list-style: none;
padding: 5px 10px;
font-size: 1.25rem;
color: var(--primary-color);
background-color: var(--white);
border-radius: 100%;
transition: 0.3s;
}
@media only screen and (max-width: 600px) {
form {
max-width: 100%;
padding: 15px;
}
input,
textarea {
font-size: 14px;
}
label {
font-size: 16px;
margin-bottom: 6px;
}
input[type="submit"] {
font-size: 16px;
padding: 10px;
}
}
</style>
</head>
<body>
<h1>Contact Me</h1>
<form action="mailto:[email protected]" method="post" enctype="text/plain">
<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="message">Message:</label>
<textarea id="message" name="message" rows="4" required></textarea>
<input type="submit" value="Send Email" onclick="sendEmail()">
</form>
<p id="phno">Or you can reach me at: <strong>(123) 456-7890</strong></p>
<hr>
<footer>© All rights reserved.
<ul class="footer_socials">
<li>
<a href="https://m.facebook.com/login/?locale=en_GB"><i class="ri-facebook-fill"></i></a>
</li>
<li>
<a href="https://www.instagram.com/accounts/login/"><i class="ri-instagram-line"></i></a>
</li>
<li>
<a href="https://www.youtube.com/account"><i class="ri-youtube-line"></i></a>
</li>
<li>
<a href="https://in.LinkedIn.com"><i class="ri-linkedin-box-fill"></i></a>
</li>
</ul>
</footer>
<script>
function sendEmail(event) {
var name = document.getElementById('name').value;
var email = document.getElementById('email').value;
var message = document.getElementById('message').value;
if (name.length < 3) {
alert('Name must have at least 3 characters.');
return;
}
var emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
if (!emailPattern.test(email)) {
alert('Please enter a valid email address.');
return;
}
if (message.length < 10) {
alert('Message must be at least 10 characters long.');
}
};
</script>
</body>
</html>