@@ -45,7 +45,7 @@ const description = "Product designer in Lisbon, Portugal. Wants to design inter
45
45
</header >
46
46
<section class =" init" >
47
47
<div class =" reel" >
48
- <div class =" description card showreel " >
48
+ <div class =" showreel card" >
49
49
<video width =" 1920" height =" 1080" autoplay muted loop src =" videos/showreel.mp4" >
50
50
Showcase of examples of my work.
51
51
</video >
@@ -220,19 +220,41 @@ section.gallery {
220
220
221
221
/* Showreel */
222
222
223
- .showreel {
223
+ .showreel.card {
224
224
position: relative;
225
+ width: var(--slideDescWidth);
226
+ max-width: var(--slideDescContentWidth);
227
+ height: fit-content;
228
+ aspect-ratio: 16 / 9;
229
+ padding: var(--slidePadding);
230
+ margin-left: var(--slideMargin);
231
+ border-radius: var(--slidePadding);
232
+ clip-path: var(--clipBevel);
225
233
background-color: white;
226
234
}
227
- .showreel video {
235
+ @supports not (aspect-ratio: 16 / 9) {
236
+ .showreel.card::before {
237
+ float: left;
238
+ padding-top: 56.25%;
239
+ content: "";
240
+ }
241
+ .showreel.card::after {
242
+ display: block;
243
+ content: "";
244
+ clear: both;
245
+ }
246
+ }
247
+ .showreel.card video {
228
248
position: absolute;
229
249
display: block;
230
- top: 50%;
231
- left: 50%;
232
- height: 100%;
250
+ top: 0;
251
+ right: 0;
252
+ bottom: 0;
253
+ left: 0;
233
254
width: 100%;
234
- transform: translate(-50%, -50%) ;
255
+ height: 100% ;
235
256
object-fit: cover;
257
+ transform: scale(0.875);
236
258
}
237
259
238
260
/* Link Card */
@@ -250,7 +272,7 @@ section.gallery {
250
272
@supports not (aspect-ratio: 3 / 4) {
251
273
.link.card::before {
252
274
float: left;
253
- padding-top: 100 %;
275
+ padding-top: 75 %;
254
276
content: "";
255
277
}
256
278
.link.card::after {
@@ -394,6 +416,7 @@ section.gallery {
394
416
.link.card {
395
417
width: calc(var(--slideLinkWidth) / 2);
396
418
}
419
+
397
420
}
398
421
@media (pointer: coarse) and (max-width: 50em) {
399
422
.gallery .nav {
@@ -403,6 +426,46 @@ section.gallery {
403
426
display: inline;
404
427
}
405
428
}
429
+ @media (max-width: 50em) {
430
+ .showreel.card {
431
+ aspect-ratio: 4 / 3;
432
+ }
433
+ @supports not (aspect-ratio: 4 / 3) {
434
+ .showreel.card::before {
435
+ float: left;
436
+ padding-top: 75%;
437
+ content: "";
438
+ }
439
+ .showreel.card::after {
440
+ display: block;
441
+ content: "";
442
+ clear: both;
443
+ }
444
+ }
445
+ .showreel.card video {
446
+ transform: scale(0.9375);
447
+ }
448
+ }
449
+ @media (max-width: 30em) {
450
+ .showreel.card {
451
+ aspect-ratio: 1 / 1;
452
+ }
453
+ @supports not (aspect-ratio: 1 / 1) {
454
+ .showreel.card::before {
455
+ float: left;
456
+ padding-top: 100%;
457
+ content: "";
458
+ }
459
+ .showreel.card::after {
460
+ display: block;
461
+ content: "";
462
+ clear: both;
463
+ }
464
+ }
465
+ .showreel.card video {
466
+ transform: scale(1);
467
+ }
468
+ }
406
469
@media (max-width: 30em) and (min-height: 40em) {
407
470
.description.card {
408
471
min-height: calc(70vh - var(--slideMarginTotal) - var(--slidePaddingTotal));
@@ -414,16 +477,6 @@ section.gallery {
414
477
min-height: calc((70vh - var(--slideMarginTotal) - var(--slidePaddingTotal)) / 2);
415
478
}
416
479
}
417
- @media (max-width: 40em) {
418
- .showreel video {
419
- height: 80%;
420
- }
421
- }
422
- @media (max-width: 30em) {
423
- .showreel video {
424
- height: 75%;
425
- }
426
- }
427
480
428
481
</style >
429
482
0 commit comments