-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
371 lines (330 loc) · 12.4 KB
/
index.html
File metadata and controls
371 lines (330 loc) · 12.4 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Happy Father's Day!</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Great+Vibes&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Playfair Display', serif;
background-color: #e8f5e9; /* Light green background */
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
padding: 20px;
box-sizing: border-box;
overflow-x: hidden;
}
.card-container {
perspective: 1500px;
width: 90vw;
max-width: 800px;
height: 85vh;
max-height: 550px;
}
.card {
width: 100%;
height: 100%;
position: relative;
transform-style: preserve-3d;
transition: transform 1s ease-in-out;
cursor: pointer;
border-radius: 15px;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}
.card.open {
transform: rotateY(-180deg);
cursor: default;
}
.card-panel {
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
display: flex;
justify-content: center;
align-items: center;
border-radius: 15px;
overflow: hidden;
}
.card-front {
background-color: #f1f8e9; /* Very light green/off-white */
z-index: 2;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
padding: 20px;
border: 5px solid #a5d6a7; /* Medium green border */
transform: rotateY(0deg);
}
.card-front h1 {
font-family: 'Great Vibes', cursive;
font-size: clamp(2.8rem, 9vw, 5rem);
color: #2e7d32; /* Dark green */
margin-bottom: 10px;
}
.card-front p {
font-family: 'Dancing Script', cursive;
font-size: clamp(1.2rem, 4.5vw, 1.8rem);
color: #43a047; /* Bright green */
}
.decoration {
font-size: clamp(2.2rem, 7vw, 3.5rem);
color: #66bb6a; /* Lighter green */
margin-top: 15px;
}
.card-inside {
background-color: #f1f8e9; /* Very light green/off-white */
transform: rotateY(180deg);
z-index: 1;
display: flex;
flex-direction: column;
padding: 20px;
border: 5px solid #a5d6a7; /* Medium green border */
}
.inside-left, .inside-right-wrapper {
width: 100%;
padding: 10px;
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
@media (min-width: 640px) { /* sm breakpoint */
.card-inside {
flex-direction: row;
}
.inside-left, .inside-right-wrapper {
width: 50%;
height: 100%;
}
}
.inside-left h2 {
font-family: 'Dancing Script', cursive;
font-size: clamp(1.8rem, 5vw, 2.8rem);
color: #2e7d32; /* Dark green */
margin-bottom: 15px;
text-align: center;
}
.inside-left p {
font-size: clamp(0.9rem, 2.5vw, 1.2rem);
color: #37474f; /* Dark gray for text */
line-height: 1.6;
text-align: center;
}
.inside-right-content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 15px;
width: 100%;
height: 100%;
}
.top-image-container {
width: clamp(120px, 40vw, 180px);
height: clamp(100px, 30vw, 150px);
cursor: pointer;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.bottom-images-container {
display: flex;
justify-content: center;
gap: 15px;
width: 100%;
}
.bottom-image-container {
width: clamp(80px, 25vw, 120px);
height: clamp(100px, 30vw, 130px);
cursor: pointer;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.card-image {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
transition: transform 0.3s ease;
}
.card-image:hover {
transform: scale(1.05);
}
.click-to-open {
margin-top: 20px;
font-style: italic;
color: #555;
font-size: clamp(0.8rem, 2.5vw, 1rem);
}
/* Lightbox Modal Styles */
.lightbox-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.7);
display: none;
justify-content: center;
align-items: center;
z-index: 1000;
padding: 20px;
box-sizing: border-box;
}
.lightbox-modal {
background-color: #fff;
padding: 25px;
border-radius: 10px;
box-shadow: 0 5px 15px rgba(0,0,0,0.3);
max-width: 90vw;
max-height: 90vh;
display: flex;
flex-direction: column;
align-items: center;
position: relative;
}
.lightbox-image {
max-width: 100%;
max-height: 60vh;
object-fit: contain;
border-radius: 8px;
margin-bottom: 15px;
}
.lightbox-text {
margin-top: 15px;
font-size: clamp(0.9rem, 2.5vw, 1.1rem);
color: #333;
text-align: center;
max-height: 20vh;
overflow-y: auto;
width: 100%;
padding: 0 10px;
box-sizing: border-box;
}
.lightbox-close {
position: absolute;
top: 10px;
right: 15px;
font-size: 2rem;
color: #555;
cursor: pointer;
line-height: 1;
}
.lightbox-close:hover {
color: #000;
}
</style>
</head>
<body>
<div class="card-container">
<div class="card" id="fatherCard"> <!-- Changed ID for clarity -->
<!-- Card Front -->
<div class="card-panel card-front">
<div>
<h1>Happy Father's Day</h1>
<p>To the GOAT Dad!</p>
<div class="decoration">🏆👔⭐</div>
<p class="click-to-open">(Click to open)</p>
</div>
</div>
<!-- Card Inside -->
<div class="card-panel card-inside">
<!-- Left Side of Inside Card -->
<div class="inside-left">
<h2>Hey Dad,</h2>
<p>
Just wanted to say Happy Father's day and thank you for all you do for our family!
I've had a lot of fun these past couple of years on our drives to and from school, and I appreciate
the perspectives you bring. Hope you have a great day and enjoy this card.
</p>
<p style="margin-top: 15px; font-style: italic;">With love,</p>
<p style="font-family: 'Dancing Script', cursive; font-size: 1.5rem; color: #43a047;">Ed IV</p>
</div>
<!-- Right Side of Inside Card -->
<div class="inside-right-wrapper">
<div class="inside-right-content">
<div class="top-image-container">
<img src="20220627_123903.jpg" alt="Memory 1" class="card-image" data-lightbox-text="As our personal travel agent, I want to thank you for all the opportunities you've provided our family to go to amazing destinations and fantastic vacations. You helped shaped my enjoyment of the outdoors.">
</div>
<div class="bottom-images-container">
<div class="bottom-image-container">
<img src="IMG_0325.jpg" alt="Memory 2" class="card-image" data-lightbox-text="Just one of our many escape room wins! Your ability to problem solve goes outside of the game room, and applies to many other aspects of our lives. With those skills you've figured out a way to help me stay in school and make sure everything is still great at home. Thank you!">
</div>
<div class="bottom-image-container">
<img src="IMG_0587.jpg" alt="Memory 3" class="card-image" data-lightbox-text="I'm proud to call myself your son and I'm sure Eli is too. You are a great role model and I gain more respect for you everyday!">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Lightbox Modal Structure -->
<div class="lightbox-overlay" id="lightboxOverlay">
<div class="lightbox-modal">
<span class="lightbox-close" id="lightboxClose">×</span>
<img src="" alt="Lightbox Image" class="lightbox-image" id="lightboxImg">
<div class="lightbox-text" id="lightboxTextContent">
</div>
</div>
</div>
<script>
// Get the main card element
const card = document.getElementById('fatherCard');
// Get all images that should trigger the lightbox
const cardImages = document.querySelectorAll('.card-image');
// Lightbox elements
const lightboxOverlay = document.getElementById('lightboxOverlay');
const lightboxImg = document.getElementById('lightboxImg');
const lightboxTextContent = document.getElementById('lightboxTextContent');
const lightboxClose = document.getElementById('lightboxClose');
// --- Card Opening Logic ---
card.addEventListener('click', function(event) {
// Only open the card if it's not already open and the click is on the card front
if (!card.classList.contains('open') && event.target.closest('.card-front')) {
card.classList.add('open');
}
});
// --- Lightbox Logic ---
cardImages.forEach(image => {
image.addEventListener('click', function(event) {
event.stopPropagation();
const imgSrc = this.src;
const text = this.dataset.lightboxText || "No additional text available for this memory.";
lightboxImg.src = imgSrc;
lightboxTextContent.textContent = text;
lightboxOverlay.style.display = 'flex';
});
});
// Function to close the lightbox
function closeLightbox() {
lightboxOverlay.style.display = 'none';
}
lightboxClose.addEventListener('click', closeLightbox);
lightboxOverlay.addEventListener('click', function(event) {
if (event.target === lightboxOverlay) {
closeLightbox();
}
});
window.addEventListener('resize', () => {
// Future JavaScript-based responsive adjustments if needed
});
document.querySelectorAll('img.card-image').forEach(img => {
img.addEventListener('error', function() {
this.src = 'https://placehold.co/200x200/cccccc/333333?text=Image+Error';
this.alt = 'Error loading image';
});
});
</script>
</body>
</html>