-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
641 lines (551 loc) · 21.8 KB
/
index.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
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
<!DOCTYPE html>
<html lang="en" data-bs-theme="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hair by Sloane Home</title>
<!-- Bootstrap CSS CDN-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
<!--Custom CSS Styles-->
<style>
.thank-you-message {
display: none;
text-align: center;
margin-top: 20px;
}
.form-animation {
animation: fadeOut 0.5s forwards;
}
@keyframes fadeOut {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
.thank-you-messageDON {
display: none;
text-align: center;
margin-top: 20px;
}
.progress-bar {
width: 0%;
height: 20px;
background-color: #d2879f;
transition: width 0.3s;
}
.thank-you-messageREV {
display: none;
text-align: center;
margin-top: 20px;
}
.bg-danger-bg-subtle {
background-color: #d2879f; /* Replace with your desired color value */
}
.custom-card-body {
background-color: #d2879f
}
.white {
color:white ;
}
.btn-primary {
background-color: #d2879f; /* Replace with your desired color value */
border-color: #d2879f; /* Replace with your desired color value */
}
.inline-container {
display: flex;
align-items: center;
}
.inline-container .material-symbols-outlined {
margin-right: 0.5em;
}
.link-opacity-50-hover {
opacity: 1;
transition: opacity 0.3s;
}
.link-opacity-50-hover:hover {
opacity: 0.5;
}
.padding-top {
margin-top: 25px;
}
.navbar.bottom-navbar .material-symbols-outlined {
position: absolute;
top: 0;
right: 0;
display: none;
}
.navbar.bottom-navbar .nav-link {
position: relative;
display: inline-block;
}
.navbar.bottom-navbar .nav-link:hover .text {
visibility: hidden;
}
.navbar.bottom-navbar .nav-link:hover .material-symbols-outlined {
display: inline;
transform: translateX(-100%) translateY(25%);
}
/* Animation */
.navbar.bottom-navbar .nav-link:hover .text {
animation: fade-in 0.3s forwards;
}
.navbar.bottom-navbar .nav-link:hover .material-symbols-outlined {
animation: slide-in 0.3s forwards;
}
@keyframes fade-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes slide-in {
from {
transform: translateX(-100%) translateY(1000%);
}
to {
transform: translateX(-100%) translateY(25%);
}
}
.specialkeylog{
color:#d2879f
}
</style>
</head>
<body>
<!-- Primary Navigation Bar -->
<nav class="navbar navbar-expand-lg navbar-danger-bg-subtle bg-danger-bg-subtle">
<div class="container">
<a class="navbar-brand" href="#">Hair by Sloane</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link white" href="index.html">
<span class="inline-container">
<span class="material-symbols-outlined">apartment</span> Home
</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link white" href="pric.html">
<span class="inline-container">
<span class="material-symbols-outlined">info</span> About
</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link white" href="booking.html">
<span class="inline-container">
<span class="material-symbols-outlined">calendar_month</span> Booking
</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link white" href="testimonials.html">
<span class="inline-container">
<span class="material-symbols-outlined">forum</span> Testimonials
</span>
</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- Savings Advertisement + it's Modal and success message.-->
<div class="padding-top" style="display: flex; justify-content: center;">
<div style="text-align: center;">
<p><a class="link-opacity-50-hover white" href="#" data-bs-toggle="modal" data-bs-target="#emailModal">10% OFF (UP TO $50) CUT + COLOR 4TH OF JULY SPECIAL!</a></p>
<small>Limits apply. Click for details.</small>
</div>
</div>
<!-- Email Modal -->
<div class="modal fade" id="emailModal" tabindex="-1" aria-labelledby="emailModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="emailModalLabel">Enter Your Email</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form id="emailForm">
<div class="mb-3">
<input type="email" class="form-control" id="emailInput" placeholder="Enter your email" required>
</div>
</form>
<div class="d-none" id="thankYouMessage">
<p>Thank you! Please check your inbox for the promotional code.</p>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="submitBtn">Submit</button>
</div>
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const submitBtn = document.getElementById('submitBtn');
const emailForm = document.getElementById('emailForm');
const emailInput = document.getElementById('emailInput');
const thankYouMessage = document.getElementById('thankYouMessage');
submitBtn.addEventListener('click', function() {
const email = emailInput.value;
if (email) {
// Hide the form
emailForm.classList.add('d-none');
// Show the thank you message inside the modal
thankYouMessage.classList.remove('d-none');
const modalBody = document.querySelector('.modal-body');
modalBody.appendChild(thankYouMessage);
// Replace submit button with span
const span = document.createElement('span');
span.innerHTML = '<span class="material-symbols-outlined">done</span>';
submitBtn.parentNode.replaceChild(span, submitBtn);
}
});
});
</script>
</div>
<!-- Page Content -->
<div class="container mt-5">
<div class="row">
<!-- Card 1 -->
<div class="col-sm-4">
<div class="card custom-card-body">
<div id="carousel1" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<img src="photo1.png" class="d-block w-100" alt="Photo 1">
</div>
<div class="carousel-item">
<img src="photo2.png" class="d-block w-100" alt="Photo 2">
</div>
<div class="carousel-item">
<img src="photo3.png" class="d-block w-100" alt="Photo 3">
</div>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carousel1" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carousel1" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
<div class="card-body">
<h5 class="card-title white">Cut</h5>
<p class="card-text white">For a custom look.</p>
</div>
</div>
</div>
<!-- Card 2 -->
<div class="col-sm-4">
<div class="card custom-card-body">
<div id="carousel2" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<img src="photo4.png" class="d-block w-100" alt="Photo 4">
</div>
<div class="carousel-item">
<img src="photo5.png" class="d-block w-100" alt="Photo 5">
</div>
<div class="carousel-item">
<img src="photo6.png" class="d-block w-100" alt="Photo 6">
</div>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carousel2" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carousel2" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
<div class="card-body">
<h5 class="card-title white">Color</h5>
<p class="card-text white">For a new you.</p>
</div>
</div>
</div>
<!-- Card 3 -->
<div class="col-sm-4">
<div class="card custom-card-body" >
<div id="carousel3" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<img src="photo7.png" class="d-block w-100" alt="Photo 7">
</div>
<div class="carousel-item">
<img src="photo8.png" class="d-block w-100" alt="Photo 8">
</div>
<div class="carousel-item">
<img src="photo9.png" class="d-block w-100" alt="Photo 9">
</div>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carousel3" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carousel3" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
<div class="card-body">
<h5 class="card-title white">Styling</h5>
<p class="card-text white">Elegance starting from the top.</p>
</div>
</div>
</div>
</div>
</div>
<nav class="navbar bottom-navbar navbar-expand-lg navbar-dark fixed-bottom" style="background-color: #d2879f; margin-top: 4px;">
<div class="container">
<ul class="navbar-nav mx-auto">
<li class="nav-item">
<a class="nav-link" href="#" data-bs-toggle="modal" data-bs-target="#bookingModal">
<span class="material-symbols-outlined">calendar_add_on</span>
<span class="text">Book Now</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" data-bs-toggle="modal" data-bs-target="#donationModal">
<span class="material-symbols-outlined">
attach_money
</span>
<span class="text">Donate</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" data-bs-toggle="modal" data-bs-target="#reviewModal">
<span class="material-symbols-outlined">rate_review</span>
<span class="text">Review</span>
</a>
</li>
</ul>
</div>
</nav>
<!-- Modal -->
<div class="modal fade" id="bookingModal" tabindex="-1" aria-labelledby="bookingModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="bookingModalLabel">Booking Form</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form id="bookingForm">
<!-- Booking form fields -->
<div class="mb-3">
<label for="nameInput" class="form-label">Name</label>
<input type="text" class="form-control" id="nameInput" required>
</div>
<div class="mb-3">
<label for="emailInput" class="form-label">Email address</label>
<input type="email" class="form-control" id="emailInput" required>
</div>
<div class="mb-3">
<label for="phoneInput" class="form-label">Phone</label>
<input type="tel" class="form-control" id="phoneInput" required>
</div>
<div class="mb-3">
<label for="serviceInput" class="form-label">Service</label>
<select class="form-select" id="serviceInput" required>
<option value="">Select a service</option>
<option value="haircut">Haircut</option>
<option value="coloring">Coloring</option>
<option value="styling">Styling</option>
</select>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
<div class="thank-you-message">
<h4>Thank you for your booking!</h4>
<p>We will contact you shortly.</p>
</div>
</div>
</div>
</div>
</div>
<!-- Donation Modal -->
<div class="modal fade" id="donationModal" tabindex="-1" aria-labelledby="donationModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="donationModalLabel">Make a Donation</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<!-- Donation Form -->
<form id="donationForm" action="/donate" method="POST"> <!-- Add action and method attributes -->
<div class="mb-3">
<label for="name" class="form-label">Name</label>
<input type="text" class="form-control" id="name" name="name" required> <!-- Add name attribute -->
</div>
<div class="mb-3">
<label for="email" class="form-label">Email</label>
<input type="email" class="form-control" id="email" name="email" required> <!-- Add name attribute -->
</div>
<div class="mb-3">
<label for="amount" class="form-label">Amount</label>
<div class="input-group">
<span class="input-group-text">$</span>
<input type="number" class="form-control" id="amount" name="amount" required> <!-- Add name attribute -->
<span class="input-group-text">.00</span>
</div>
</div>
<div class="progress mb-3">
<div class="progress-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<button type="submit" class="btn btn-primary">Donate</button>
</form>
<div class="thank-you-messageDON d-none">
<h5>Thank you for your donation!</h5>
<p>We appreciate your generosity.</p>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Review Modal -->
<div class="modal fade" id="reviewModal" tabindex="-1" aria-labelledby="reviewModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="reviewModalLabel">Leave a Review</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<!-- Review Form -->
<form id="reviewForm">
<div class="mb-3">
<label for="name" class="form-label">Name (optional)</label>
<input type="text" class="form-control" id="name">
</div>
<div class="mb-3">
<label for="rating" class="form-label">Rating</label>
<select class="form-select" id="rating" required>
<option value="">Select a rating</option>
<option value="5">5 stars</option>
<option value="4">4 stars</option>
<option value="3">3 stars</option>
<option value="2">2 stars</option>
<option value="1">1 star</option>
</select>
</div>
<div class="mb-3">
<label for="feedback" class="form-label">Feedback</label>
<textarea class="form-control" id="feedback" rows="3" required></textarea>
</div>
<button type="submit" class="btn btn-primary">Post</button>
</form>
<div id="customThankYouMessage" class="custom-thank-you-message d-none">
<h5>Your feedback is very important to us. Thank you!</h5>
</div>
</div>
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
var reviewForm = document.getElementById('reviewForm');
var thankYouMessage = document.getElementById('customThankYouMessage');
reviewForm.addEventListener('submit', function(event) {
event.preventDefault(); // Prevent the default form submission behavior
// Hide the form
reviewForm.classList.add('d-none');
// Show the thank you message
thankYouMessage.classList.remove('d-none');
});
});
</script>
<!-- Footer -->
<footer class="bg-dark text-center py-3">
<div class="container">
<p>© 2023 Hair by Sloane. All rights reserved.</p>
<a href="sloanelogin.html">
<span class="material-symbols-outlined specialkeylog">
key
</span>
</a>
</div>
</footer>
<!-- Bootstrap JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/js/bootstrap.bundle.min.js"></script>
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
const donationForm = document.getElementById('donationForm');
const progressBar = document.querySelector('.progress-bar');
const formFields = donationForm.querySelectorAll('input[required]');
let currentFieldIndex = -1;
donationForm.addEventListener('input', function () {
const completedFields = Array.from(formFields).filter((field, index) => index <= currentFieldIndex && field.value !== '');
const progress = (completedFields.length / formFields.length) * 100;
progressBar.style.width = `${progress}%`;
});
donationForm.addEventListener('focusin', function (event) {
currentFieldIndex = Array.from(formFields).findIndex(field => field === event.target);
});
donationForm.addEventListener('submit', function (event) {
event.preventDefault(); // Prevent the default form submission behavior
// Retrieve input values
const nameInput = document.getElementById('name');
const amountInput = document.getElementById('amount');
const name = nameInput.value;
const amount = amountInput.value;
// Hide the form
donationForm.classList.add('d-none');
// Show the thank you message
const thankYouMessage = document.querySelector('.thank-you-messageDON');
thankYouMessage.style.display = 'block';
thankYouMessage.classList.remove('d-none');
// Update the thank you message with donor's name and donation amount
const thankYouTitle = thankYouMessage.querySelector('h5');
const thankYouText = thankYouMessage.querySelector('p');
thankYouTitle.textContent = `Thank you, ${name}, for your donation of $${amount}.`;
thankYouText.textContent = 'We appreciate your generosity.';
// Generate receipt as a text file
const receiptText = generateReceiptText(name, amount);
// Offer the user to save the text file
offerSaveTextFile(receiptText, thankYouMessage);
// Animate the progress bar to 100%
progressBar.style.width = '100%';
});
function generateReceiptText(name, amount) {
const receiptText = `Receipt\n\nName: ${name}\nDonation Amount: $${amount}\n\nThank you for your support!`;
return receiptText;
}
function offerSaveTextFile(text, containerElement) {
const blob = new Blob([text], { type: 'text/plain' });
const anchor = document.createElement('a');
anchor.href = URL.createObjectURL(blob);
anchor.target = '_blank';
anchor.download = 'donation_receipt.txt';
// Create the "Save Receipt" button
const saveButton = document.createElement('button');
saveButton.textContent = 'Save Receipt';
saveButton.addEventListener('click', function() {
anchor.click();
});
// Append the button to the container element (in this case, the thank you message container)
containerElement.appendChild(saveButton);
}
});
</script>
</body>
</html>