-
Notifications
You must be signed in to change notification settings - Fork 751
/
adopt.html
424 lines (409 loc) · 17 KB
/
adopt.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
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
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="./reportstary.css" />
<link rel="stylesheet" href="./navbar.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/remixicon/3.4.0/remixicon.css" crossorigin="">
<link rel="icon" type="image/x-icon" href="logo.png" />
<!-- <link rel="stylesheet" href="./introSection.css"> -->
<!-- <link rel="stylesheet" href="./mobileView.css"> -->
<script
defer
src="https://unpkg.com/[email protected]/dist/cdn.min.js"
></script>
<link
rel="shortcut icon"
type="image/x-icon"
href="/PetMe/Assets/Images/logo.jpg"
/>
<title>Adopt Me</title>
</head>
<body>
<header
class="text-gray-400 bg-header-offwhite body-font flex flex-row items-center justify-center lg:justify-around"
>
<div
class="flex flex-row items-center md:flex-row md:items-center p-5"
id="logo"
>
<span class="mission-1"> Saving Lives </span>
<a class="logo-border" href="./index.html">
<img
class="rounded-full logo-size"
src="./Assets/Images/logo.jpg"
alt="logo"
/>
</a>
<span class="mission-2"> Saving Animals </span>
<!--
<div class="w-full mt-8 md:mt-0">
<h1 class="text-4xl text_2 text-center md:text-left md:ml-12 uppercase font-serif font-bold " id = "heading-adopt-me">Adopt
today!</h1>
<p class="text-lg text-gray-400 text-center md:text-left md:ml-12 mt-2">Give life to a needed animal</p>
</div> -->
</div>
<button
data-collapse-toggle="navbar-default"
type="button"
class="absolute top-4 right-4 sm:inline-flex sm:items-center p-2 lg:hidden focus:outline-none text_4"
aria-controls="navbar-default"
aria-expanded="false"
id="nav-button"
>
<span class="sr-only">Open Main Menu</span>
<svg
class="w-6 h-6"
aria-hidden="true"
fill="currentColor"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
clip-rule="evenodd"
></path>
</svg>
</button>
<nav class="">
<div class="hidden w-full lg:block z-2" id="navbar">
<ul
class="w-[100vw] h-1/2 top-0 right-0 p-8 lg:p-4 mt-12 lg:mt-0 text-center text-base lg:text-lg space-y-4 lg:space-y-0 lg:space-x-5 lg:static lg:w-auto flex flex-col rounded-lg items-start lg:items-center lg:bg-transparent lg:border-0 lg:flex-row justify-between"
>
<li>
<a
href="./index.html"
class="text-custom-heading font-bold hover:underline underline-offset-4 turn-red-hover navbar-item"
>Home</a
>
</li>
<li>
<a
href="./index.html#meet"
class="p-3 text-custom-heading font-bold hover:underline underline-offset-4 turn-red-hover navbar-item"
>Meet Pets</a
>
</li>
<li>
<a
href="./index.html#About"
class="text-custom-heading font-bold hover:underline underline-offset-4 turn-red-hover navbar-item"
>About Us</a
>
</li>
<li>
<a
href="./news.html"
class="text-custom-heading font-bold hover:underline underline-offset-4 turn-red-hover navbar-item"
>Pet News</a
>
</li>
<li>
<a
href="./blog.html"
class="text-custom-heading font-bold hover:underline underline-offset-4 turn-red-hover navbar-item"
>Blogs</a
>
</li>
<li>
<a
href="./donate.html"
class="text-custom-heading font-bold hover:underline underline-offset-4 turn-red-hover navbar-item"
>Donate</a
>
</li>
<li>
<div
x-data="{ open: false }"
@mouseleave="open = false"
class="relative"
>
<a
@mouseover="open = true"
class="text-custom-heading flex font-bold hover:underline underline-offset-4 turn-red-hover navbar-item w-full"
>
Support Us
<svg
xmlns="http://www.w3.org/2000/svg"
width="14px"
height="14px"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
class="mt-1"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M19 9l-7 7-7-7"
></path>
</svg>
</a>
<div
x-show="open"
class="z-20 absolute -left-1 w-[7.5rem] py-2 bg-gray-100 rounded-md shadow-xl"
>
<a
href="volunteer.html"
class="block px-4 py-2 text-base text-gray-300 text-gray-700 hover:bg-amber-800 hover:text-white"
>Become a Volunteer</a
>
</div>
</div>
</li>
<li>
<a
href="./reportstary.html"
class="text-custom-heading font-bold hover:underline underline-offset-4 turn-red-hover navbar-item"
>SOS Report</a
>
</li>
<li>
<a href="./index.html#contact">
<button
class="inline-flex items-center bg-header-orange-light border-0 py-2 lg:py-2 text-base px-2 focus:outline-none text_4 font-bold rounded text-base mt-4 md:mt-0"
>
Contact Us
<svg
fill="none"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
class="w-4 h-4 ml-1"
viewBox="0 0 24 24"
>
<path d="M5 12h14M12 5l7 7-7 7"></path>
</svg>
</button>
</a>
</li>
<li>
<a id="theme-toggle">
<i class="ri-sun-line turn-yellow-hover light-theme" id="switch"></i>
</a>
</li>
<!-- google translate -->
<div id="google_translate_element">
<script
type="text/javascript"
src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"
></script>
</div>
</ul>
</div>
</nav>
</header>
<div class="w-11/12 h-11/12 flex mt-10 ml-5 p-5">
<!-- About section -->
<div
class="bg-[#78350f] grid md:grid-cols-2 border-[#78350f] rounded-lg shadow-lg shadow-[#78350f] p-5"
>
<div class="flex justify-between gap-10 p-5 items-center flex-col">
<h1 class="font-bold text-white" id="title" style="color: #e4e3c2;">
Adopt Your Favourite Pet
</h1>
<img
class="inline-block relative w-[250px] h-[250px] overflow-hidden border-[#78350f] rounded-full object-cover"
src="https://i.pinimg.com/736x/44/d9/8c/44d98cccb725fd3a80c0446b9b2e646d.jpg"
alt=""
/>
<p id="description" class="font-semibold text-cyan-50 text-justify">
The details that you provide using this form will be used to reach
the nearest authority/organization closest to the location of the
pet.
</p>
</div>
<!-- Form section -->
<form
class="w-full h-full flex flex-col justify-center items-center shadow-lg rounded-lg p-5 gap-5"
id="survey-form"
action="https://formspree.io/f/xayaokzl"
method="POST"
>
<div class="w-full p-5 gap-10">
<div class="form-group">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
id="person"
class="w-6 h-6 relative top-6 right-7 inline-block mr-2"
>
<g data-name="Layer 2">
<path
d="M12 11a4 4 0 1 0-4-4 4 4 0 0 0 4 4zm6 10a1 1 0 0 0 1-1 7 7 0 0 0-14 0 1 1 0 0 0 1 1z"
data-name="person"
></path>
</g>
</svg>
<label for="country-code">Your Name <span style="color: red;">*</span></label>
<input
type="text"
name="name"
id="name"
class="form-control"
placeholder="Enter your name | eg. John Doe"
required
/>
</div>
<div class="form-group">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
id="email"
class="w-6 h-6 relative top-6 right-7 inline-block mr-2"
>
<path fill="none" d="M0 0h24v24H0V0z"></path>
<path
d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-.4 4.25l-7.07 4.42c-.32.2-.74.2-1.06 0L4.4 8.25c-.25-.16-.4-.43-.4-.72 0-.67.73-1.07 1.3-.72L12 11l6.7-4.19c.57-.35 1.3.05 1.3.72 0 .29-.15.56-.4.72z"
></path>
</svg>
<label for="country-code">Your email<span style="color: red;">*</span></label>
<input
type="email"
name="email"
id="email"
class="form-control"
placeholder="Enter your email"
required
/>
</div>
<div class="form-group">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 256 256"
id="house"
class="w-6 h-6 relative top-6 right-7 inline-block mr-2"
>
<rect width="256" height="256" fill="none"></rect>
<path
d="M218.76367,103.7002,138.75684,30.96436a15.93657,15.93657,0,0,0-21.52637.00146L37.2373,103.69971A16.03108,16.03108,0,0,0,32,115.53857l0,92.09522a16.47275,16.47275,0,0,0,4.01066,10.96174A15.91729,15.91729,0,0,0,48.002,223.999H95.96484a8,8,0,0,0,8-8V167.9917a8,8,0,0,1,8-8h32a8,8,0,0,1,8,8V215.999a8,8,0,0,0,8,8h48.05731a15.40625,15.40625,0,0,0,7.53406-1.85584A16.08415,16.08415,0,0,0,224,207.999v-92.46A16.03567,16.03567,0,0,0,218.76367,103.7002Z"
></path>
</svg>
<label for="country-code">Your Address <span style="color: red;">*</span></label>
<input
type="text"
name="first address"
id="first-address"
class="form-control"
placeholder="Enter your correct address (eg. Meenawati marg, Lucknow, 209087)"
required
/>
</div>
<div class="form-group">
<svg
xmlns="http://www.w3.org/2000/svg"
data-name="Layer 1"
viewBox="0 0 24 24"
id="address"
class="w-6 h-6 relative top-6 right-7 inline-block mr-2"
>
<path
d="M19.82 9H17.9a1.38 1.38 0 0 1 0 .2 8.89 8.89 0 0 1-.79 2.24 21.17 21.17 0 0 1-3.66 5L12 17.81l-1.41-1.39a20.83 20.83 0 0 1-3.67-5 8.81 8.81 0 0 1-.79-2.25A1.25 1.25 0 0 1 6.1 9H4.18l-2.4 12h20.44Z"
></path>
<path
d="M7 8a4.94 4.94 0 0 0 .11 1 8.12 8.12 0 0 0 .71 2 20.17 20.17 0 0 0 3.47 4.71l.71.7.71-.7A20.17 20.17 0 0 0 16.18 11a8.12 8.12 0 0 0 .71-2A4.94 4.94 0 0 0 17 8 5 5 0 0 0 7 8Zm6 1h-2V7h2Z"
></path>
</svg>
<label for="country-code">Landmark <span style="color: red;">*</span></label>
<input
type="text"
name="address"
id="address"
class="form-control"
placeholder="Enter the nearest landmark to identify the location.(optional)"
/>
</div>
<div class="form-group">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
id="phone"
class="w-6 h-6 relative top-6 right-7 inline-block mr-2"
>
<g data-name="Layer 2">
<g data-name="phone">
<rect width="24" height="24" opacity="0"></rect>
<path
d="M17.4 22A15.42 15.42 0 0 1 2 6.6 4.6 4.6 0 0 1 6.6 2a3.94 3.94 0 0 1 .77.07 3.79 3.79 0 0 1 .72.18 1 1 0 0 1 .65.75l1.37 6a1 1 0 0 1-.26.92c-.13.14-.14.15-1.37.79a9.91 9.91 0 0 0 4.87 4.89c.65-1.24.66-1.25.8-1.38a1 1 0 0 1 .92-.26l6 1.37a1 1 0 0 1 .72.65 4.34 4.34 0 0 1 .19.73 4.77 4.77 0 0 1 .06.76A4.6 4.6 0 0 1 17.4 22z"
></path>
</g>
</g>
</svg>
<label for="country-code">Phone Number <span style="color: red;">*</span></label>
<select id="country-code" name="country-code" class="form-control" required>
<option value="+91">India (+91)</option>
<option value="+1">USA (+1)</option>
<option value="+44">UK (+44)</option>
<option value="+61">Australia (+61)</option>
<!-- country codes added-->
</select>
<input
type="tel"
name="tel"
id="tel"
class="form-control"
placeholder="Enter your phone number"
required
oninput="this.value = this.value.replace(/[^0-9]/g, '');"
/>
</div>
<div class="flex justify-center">
<div class="form-group">
<button
class="bg-green-500 hover:bg-green-700 text-center py-3 px-12 rounded-full transition-all duration-300 ease-in-out text-black font-bold"
type="submit"
>
<svg
xmlns="http://www.w3.org/2000/svg"
enable-background="new 0 0 68 68"
viewBox="0 0 68 68"
id="paw-print"
class="w-6 h-6 inline-block mr-1"
>
<path
d="M37.33 13.54C38.7 8.72 43 5.7 46.92 6.81c1.94.56 3.48 2.01 4.34 4.1.83 2.01.92 4.38.27 6.67-1.18 4.15-4.52 6.96-7.93 6.96-.55 0-1.11-.08-1.66-.23C38.03 23.19 35.96 18.37 37.33 13.54zM65.6 30.27c-.61 2.14-1.85 3.98-3.5 5.17-1.22.89-2.57 1.35-3.9 1.35-.54 0-1.07-.08-1.59-.23-1.82-.51-3.27-1.88-4.08-3.84-.77-1.88-.86-4.09-.25-6.24 1.28-4.52 5.31-7.34 8.99-6.3 1.82.52 3.27 1.89 4.08 3.85C66.12 25.91 66.21 28.12 65.6 30.27zM16.47 17.58c-.65-2.29-.56-4.66.27-6.67.86-2.09 2.4-3.54 4.34-4.1C25 5.7 29.3 8.72 30.67 13.54c1.37 4.83-.7 9.65-4.61 10.77-.55.15-1.11.23-1.66.23C20.99 24.54 17.65 21.73 16.47 17.58zM57.85 48.63c.84 4.3-.22 8.12-2.92 10.48-1.74 1.53-4 2.31-6.5 2.31-1.43 0-2.95-.26-4.49-.78-3.01-1.01-6.26-1.51-9.94-1.51s-6.93.5-9.94 1.51c-4.24 1.43-8.25.88-10.99-1.53-2.7-2.36-3.76-6.18-2.92-10.48C11.56 41.47 19 34.58 25 30.06c2.58-1.84 5.31-2.84 8.17-3v-.03H34c.01 0 .01 0 .02 0h.38c.23.01.41 0 .44 0v.03c2.96.17 5.77 1.2 8.16 3C49 34.58 56.44 41.47 57.85 48.63zM11.39 36.56c-.52.15-1.05.23-1.59.23-1.33 0-2.68-.46-3.9-1.35-1.65-1.19-2.89-3.03-3.5-5.17-.61-2.15-.52-4.36.25-6.24.81-1.96 2.26-3.33 4.08-3.85 3.68-1.04 7.71 1.78 8.99 6.3.61 2.15.52 4.36-.25 6.24C14.66 34.68 13.21 36.05 11.39 36.56z"
></path>
</svg>
Submit
</button>
</div>
</div>
</div>
</form>
<script src="./navbar.js"></script>
<script src="./light-dark-theme.js"></script>
<script>
document.getElementById('survey-form').addEventListener('submit', function(event) {
// Validate phone number
const phoneField = document.getElementById('tel');
const phonePattern = /^[0-9]{10}$/;
if (!phonePattern.test(phoneField.value)) {
phoneField.setCustomValidity("Please enter a valid 10-digit phone number.");
phoneField.reportValidity();
event.preventDefault();
phoneField.focus();
} else {
phoneField.setCustomValidity("");
}
// Validate address
const addressField = document.getElementById('first-address');
const addressPattern = /^[a-zA-Z0-9\s,.'-]{3,}$/;
if (!addressPattern.test(addressField.value)) {
addressField.setCustomValidity("Please enter a valid address.");
addressField.reportValidity();
event.preventDefault();
addressField.focus();
} else {
addressField.setCustomValidity("");
}
});
</script>
</body>
</html>