-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexercise-8.html
More file actions
370 lines (317 loc) · 7.76 KB
/
exercise-8.html
File metadata and controls
370 lines (317 loc) · 7.76 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Exercise #8 || Site preloader</title>
<!-- Reset -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/modern-normalize@2.0.0/modern-normalize.min.css">
<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap" rel="stylesheet">
<style>
:root {
--def-transition-duration: .3s;
}
html {
font-size: 16px;
font-family: 'Open Sans', sans-serif;
line-height: 1.5;
}
body {
background-color: #F1EFEC;
padding: 5rem 7.5rem;
color: #151618;
}
h2,
h3,
.price {
font-family: 'Playfair Display', serif;
margin: 0;
}
h2 {
color: #151618;
font-size: 3.0625rem;
font-weight: 700;
line-height: 120%; /* 3.675rem */
margin: 2rem 0;
}
h3 {
font-size: 2.1875rem;
font-weight: 400;
line-height: 120%; /* 2.625rem */
}
.price {
font-variant-numeric: lining-nums proportional-nums;
line-height: 120%; /* 1.875rem */
font-size: 1.5625rem;
}
header p {
font-size: 1.125rem;
}
p.small {
color: #E54949;
font-size: 0.8125rem;
font-weight: 700;
text-transform: uppercase;
}
figure,
figure p.small {
color: #fff;
}
figure h3 + p {
font-size: 0.8125rem;
}
figure footer p.small {
font-weight: 400;
margin-bottom: 0;
}
img {
width: 100%;
height: 100%;
display: block;
object-fit: cover;
}
header {
margin-bottom: 7.5rem;
max-width: 75%;
}
.gallery {
display: grid;
list-style-type: none;
padding: 0;
margin: 0;
grid-gap: 2rem;
grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
grid-auto-rows: 40rem;
grid-auto-flow: dense;
}
figure {
margin: 0;
width: 100%;
height: 100%;
position: relative;
}
figcaption {
position: absolute;
inset: 0;
pointer-events: none;
padding: 4rem 2.5rem;
display: flex;
flex-direction: column;
justify-content: flex-end;
gap: 2rem;
}
figcaption main {
display: flex;
flex-direction: column;
justify-content: flex-end;
gap: 2rem;
}
figure p {
margin: 0;
}
figure footer {
display: flex;
justify-content: space-between;
align-items: center;
}
figure footer img {
width: auto;
}
figure main,
figure footer {
opacity: 0;
}
figure:hover main,
figure:hover footer {
opacity: 1;
}
figcaption {
z-index: 1;
}
figcaption::before {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(180deg, rgba(21, 22, 24, 0.24) 0%, #151618 100%);
z-index: -1;
opacity: 0;
transition-property: opacity;
}
figure:hover figcaption::before {
opacity: 1;
}
figure a img {
transform: scale(1.2);
transition-property: transform;
}
figure:hover a img {
transform: scale(1);
}
figure {
overflow: hidden;
}
figure main {
transform: translate3d(0, -6rem, 0);
transition-property: opacity, transform;
}
figure footer {
transform: translate3d(0, 6rem, 0);
transition-property: opacity, transform;
}
figure footer img {
transform: translate3d(-3rem, 0, 0) rotate(360deg);
transition-delay: var(--def-transition-duration);
opacity: 0;
}
figure:hover main,
figure:hover footer {
transform: translate3d(0, 0, 0);
}
figure:hover footer img {
transform: translate3d(0, 0, 0) rotate(0);
opacity: 1;
}
figcaption::before,
figure img,
figure main,
figure footer {
transition-duration: var(--def-transition-duration);
transition-timing-function: ease-in-out;
}
/* Air */
</style>
</head>
<body>
<!-- Air -->
<!-- End Air -->
<section id="page-content">
<header>
<p class="small">Take a trip</p>
<h2>Destinations Unveiled: Inspiring Journeys Await</h2>
<p>Embark on a virtual adventure to stunning destinations worldwide, where breathtaking landscapes, vibrant cultures, and unforgettable experiences await.</p>
</header>
<ul class="gallery">
<li>
<figure>
<a href="#"><img src="images/gallery-1.jpg" alt="Great Barrier Reef, Australia"></a>
<figcaption>
<main>
<p class="small">9-day trip</p>
<h3>Great Barrier Reef, <em>Australia</em></h3>
<p>Dive into the vibrant underwater world of the Great Barrier Reef, a UNESCO World Heritage Site teeming with marine life.</p>
</main>
<footer>
<div>
<p class="small">From</p>
<p class="price">€2,500</p>
</div>
<img src="icons/icon-arrow-right-color.svg" alt="Icon">
</footer>
</figcaption>
</figure>
</li>
<li>
<figure>
<a href="#"><img src="images/gallery-2.jpg" alt="Gallery image"></a>
<figcaption>
<main>
<p class="small">7-day trip</p>
<h3>Grand Canyon, <em>United States</em></h3>
<p>Stand in awe at the colossal beauty of the Grand Canyon, carved by the forces of nature over millions of years.</p>
</main>
<footer>
<div>
<p class="small">From</p>
<p class="price">€1,200</p>
</div>
<img src="icons/icon-arrow-right-color.svg" alt="Icon">
</footer>
</figcaption>
</figure>
</li>
<li>
<figure>
<a href="#"><img src="images/gallery-3.jpg" alt="Gallery image"></a>
<figcaption>
<main>
<p class="small">10-day trip</p>
<h3>Machu Picchu, <em>Peru</em></h3>
<p>Uncover the mystique of the ancient Inca ruins perched high in the Andes Mountains at Machu Picchu.</p>
</main>
<footer>
<div>
<p class="small">From</p>
<p class="price">€2,200</p>
</div>
<img src="icons/icon-arrow-right-color.svg" alt="Icon">
</footer>
</figcaption>
</figure>
</li>
<li>
<figure>
<a href="#"><img src="images/gallery-4.jpg" alt="Gallery image"></a>
<figcaption>
<main>
<p class="small">11-day trip</p>
<h3>Bali, <em>Indonesia</em></h3>
<p>Find tranquility on the idyllic island of Bali, with its lush landscapes, serene temples, and warm hospitality.</p>
</main>
<footer>
<div>
<p class="small">From</p>
<p class="price">€3,200</p>
</div>
<img src="icons/icon-arrow-right-color.svg" alt="Icon">
</footer>
</figcaption>
</figure>
</li>
<li>
<figure>
<a href="#"><img src="images/gallery-5.jpg" alt="Gallery image"></a>
<figcaption>
<main>
<p class="small">5-day trip</p>
<h3>Rio de Janeiro, <em>Brazil</em></h3>
<p>Experience the rhythm and energy of Rio de Janeiro, home to vibrant Carnival celebrations, iconic landmarks, and stunning beaches.</p>
</main>
<footer>
<div>
<p class="small">From</p>
<p class="price">€1,600</p>
</div>
<img src="icons/icon-arrow-right-color.svg" alt="Icon">
</footer>
</figcaption>
</figure>
</li>
<li>
<figure>
<a href="#"><img src="images/gallery-6.jpg" alt="Gallery image"></a>
<figcaption>
<main>
<p class="small">13-day trip</p>
<h3>Niagara Falls, <em>Canada</em></h3>
<p>Immerse yourself in the breathtaking cascades and embark on unforgettable adventures in this natural wonder.</p>
</main>
<footer>
<div>
<p class="small">From</p>
<p class="price">€3,000</p>
</div>
<img src="icons/icon-arrow-right-color.svg" alt="Icon">
</footer>
</figcaption>
</figure>
</li>
</ul>
</section>
<script>
// Air
</script>
</body>
</html>