@modoitaliano/giorgia 0.1.110 → 0.1.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cronkite-manifest.json +1 -1
- package/dist/live-program-page/live-program-manifest.json +1 -1
- package/package.json +1 -1
- package/src/templates/partials/components/editorial-hero.hbs +9 -3
- package/src/templates/partials/components/home/landing.hbs +4 -2
- package/src/templates/partials/components/spotlight-hero.hbs +12 -3
- package/src/templates/partials/headers/header-main.hbs +46 -15
- package/src/templates/partials/shell/doc-start-standard.hbs +1 -1
package/package.json
CHANGED
|
@@ -39,13 +39,19 @@
|
|
|
39
39
|
<div class='carousel-background flex-1 w-full overflow-hidden bg-slate-100 dark:bg-slate-800 relative shadow-sm'>
|
|
40
40
|
{{#if slides}}
|
|
41
41
|
{{#each slides}}
|
|
42
|
-
<div class='carousel-slide {{#if @first}}active opacity-100{{else}}hidden opacity-0{{/if}} absolute inset-0
|
|
42
|
+
<div class='carousel-slide {{#if @first}}active opacity-100{{else}}hidden opacity-0{{/if}} absolute inset-0 transition-opacity duration-700'>
|
|
43
|
+
{{#if @first}}<img src='{{image}}' alt='{{alt}}' class='absolute inset-0 w-full h-full object-cover object-center'{{#if variants}} srcset='{{#each variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if width}}, {{image}} {{width}}w{{/if}}' sizes='(min-width: 1280px) 58vw, 100vw'{{/if}}{{#if width}}{{#if height}} width='{{width}}' height='{{height}}'{{/if}}{{/if}} fetchpriority='high' />{{else}}<img src='{{image}}' alt='{{alt}}' class='absolute inset-0 w-full h-full object-cover object-center'{{#if variants}} srcset='{{#each variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if width}}, {{image}} {{width}}w{{/if}}' sizes='(min-width: 1280px) 58vw, 100vw'{{/if}}{{#if width}}{{#if height}} width='{{width}}' height='{{height}}'{{/if}}{{/if}} loading='lazy' />{{/if}}
|
|
44
|
+
</div>
|
|
43
45
|
{{/each}}
|
|
44
46
|
{{else}}
|
|
45
47
|
{{#if hero.url}}
|
|
46
|
-
<div class='carousel-slide active opacity-100 absolute inset-0
|
|
48
|
+
<div class='carousel-slide active opacity-100 absolute inset-0 transition-opacity duration-700'>
|
|
49
|
+
<img src='{{hero.url}}' alt='{{hero.alt}}' class='absolute inset-0 w-full h-full object-cover object-center'{{#if hero.variants}} srcset='{{#each hero.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if hero.width}}, {{hero.url}} {{hero.width}}w{{/if}}' sizes='(min-width: 1280px) 58vw, 100vw'{{/if}}{{#if hero.width}}{{#if hero.height}} width='{{hero.width}}' height='{{hero.height}}'{{/if}}{{/if}} fetchpriority='high' />
|
|
50
|
+
</div>
|
|
47
51
|
{{else}}
|
|
48
|
-
<div class='carousel-slide active opacity-100 absolute inset-0
|
|
52
|
+
<div class='carousel-slide active opacity-100 absolute inset-0 transition-opacity duration-700'>
|
|
53
|
+
<img src='https://images.unsplash.com/photo-1586348943529-beaae6c28db9?w=1440&h=882&fit=crop' alt='' class='absolute inset-0 w-full h-full object-cover object-center' fetchpriority='high' />
|
|
54
|
+
</div>
|
|
49
55
|
{{/if}}
|
|
50
56
|
{{/if}}
|
|
51
57
|
</div>
|
|
@@ -47,8 +47,10 @@
|
|
|
47
47
|
<section class='lg:col-span-1 xl:col-span-4 flex flex-col h-full justify-between'>
|
|
48
48
|
{{#with homepageSlots.landing.card5}}
|
|
49
49
|
<div class='bg-black text-white mb-6 flex-grow flex flex-col'>
|
|
50
|
-
<div class='flex-grow min-h-[250px]
|
|
51
|
-
<
|
|
50
|
+
<div class='relative flex-grow min-h-[250px] overflow-hidden flex flex-col justify-end'>
|
|
51
|
+
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='absolute inset-0 w-full h-full object-cover object-center'{{#if featuredImage.variants}} srcset='{{#each featuredImage.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if featuredImage.width}}, {{featuredImage.url}} {{featuredImage.width}}w{{/if}}' sizes='(min-width: 1280px) 25vw, (min-width: 1024px) 40vw, 100vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} loading='lazy' />
|
|
52
|
+
<div class='absolute inset-0 pointer-events-none' style='background-image: linear-gradient(to top, rgba(0,0,0,1), rgba(0,0,0,0.7) 50%, transparent 100%);'></div>
|
|
53
|
+
<div class='relative px-4'>
|
|
52
54
|
<span class='bg-[#b21100] text-white px-3 py-2 text-xs tracking-[1px] font-bold uppercase inline-block mb-2'>{{#with (lookup categories 0)}}{{name}}{{/with}}</span>
|
|
53
55
|
<h2 class='text-2xl font-bold font-encode mb-2'>
|
|
54
56
|
<a href='{{url}}' class='hover:text-slate-300 transition-colors'>{{title}}</a>
|
|
@@ -2,12 +2,21 @@
|
|
|
2
2
|
<div class='carousel-background absolute inset-0 w-full h-full'>
|
|
3
3
|
{{#if slides}}
|
|
4
4
|
{{#each slides}}
|
|
5
|
-
<div class='carousel-slide {{#if @first}}active opacity-100{{else}}hidden opacity-0{{/if}} absolute inset-0
|
|
5
|
+
<div class='carousel-slide {{#if @first}}active opacity-100{{else}}hidden opacity-0{{/if}} absolute inset-0 transition-opacity duration-700'>
|
|
6
|
+
{{#if @first}}<img src='{{image}}' alt='{{alt}}' class='absolute inset-0 w-full h-full object-cover object-center'{{#if variants}} srcset='{{#each variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if width}}, {{image}} {{width}}w{{/if}}' sizes='100vw'{{/if}}{{#if width}}{{#if height}} width='{{width}}' height='{{height}}'{{/if}}{{/if}} fetchpriority='high' />{{else}}<img src='{{image}}' alt='{{alt}}' class='absolute inset-0 w-full h-full object-cover object-center'{{#if variants}} srcset='{{#each variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if width}}, {{image}} {{width}}w{{/if}}' sizes='100vw'{{/if}}{{#if width}}{{#if height}} width='{{width}}' height='{{height}}'{{/if}}{{/if}} loading='lazy' />{{/if}}
|
|
7
|
+
<div class='absolute inset-0 pointer-events-none' style='background-image: radial-gradient(71.75% 69.5% at 50% 47.39%, rgba(0, 0, 0, 0) 0%, #000000 100%);'></div>
|
|
8
|
+
</div>
|
|
6
9
|
{{/each}}
|
|
7
10
|
{{else if hero.url}}
|
|
8
|
-
<div class='carousel-slide active opacity-100 absolute inset-0
|
|
11
|
+
<div class='carousel-slide active opacity-100 absolute inset-0 transition-opacity duration-700'>
|
|
12
|
+
<img src='{{hero.url}}' alt='{{hero.alt}}' class='absolute inset-0 w-full h-full object-cover object-center'{{#if hero.variants}} srcset='{{#each hero.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if hero.width}}, {{hero.url}} {{hero.width}}w{{/if}}' sizes='100vw'{{/if}}{{#if hero.width}}{{#if hero.height}} width='{{hero.width}}' height='{{hero.height}}'{{/if}}{{/if}} fetchpriority='high' />
|
|
13
|
+
<div class='absolute inset-0 pointer-events-none' style='background-image: radial-gradient(71.75% 69.5% at 50% 47.39%, rgba(0, 0, 0, 0) 0%, #000000 100%);'></div>
|
|
14
|
+
</div>
|
|
9
15
|
{{else}}
|
|
10
|
-
<div class='carousel-slide active opacity-100 absolute inset-0
|
|
16
|
+
<div class='carousel-slide active opacity-100 absolute inset-0 transition-opacity duration-700'>
|
|
17
|
+
<img src='https://images.unsplash.com/photo-1586348943529-beaae6c28db9?w=1440&h=882&fit=crop' alt='' class='absolute inset-0 w-full h-full object-cover object-center' fetchpriority='high' />
|
|
18
|
+
<div class='absolute inset-0 pointer-events-none' style='background-image: radial-gradient(71.75% 69.5% at 50% 47.39%, rgba(0, 0, 0, 0) 0%, #000000 100%);'></div>
|
|
19
|
+
</div>
|
|
11
20
|
{{/if}}
|
|
12
21
|
</div>
|
|
13
22
|
|
|
@@ -155,18 +155,18 @@
|
|
|
155
155
|
|
|
156
156
|
<header class='radio-header relative z-50 isolate h-[424px] overflow-visible bg-[#ed0076] text-white lg:h-[494px]' style='view-transition-name: site-header;'>
|
|
157
157
|
<div class='absolute inset-0 overflow-hidden' aria-hidden='true'>
|
|
158
|
-
<div data-radio-slide class='is-active absolute inset-0 scale-105 bg-cover bg-center blur-[2px]' style='background-image: url(https://macondostack-alcantara-assets.s3.amazonaws.com/artwork/
|
|
159
|
-
<div data-radio-slide class='absolute inset-0 scale-105 bg-cover bg-center blur-[2px]'
|
|
160
|
-
<div data-radio-slide class='absolute inset-0 scale-105 bg-cover bg-center blur-[2px]'
|
|
161
|
-
<div data-radio-slide class='absolute inset-0 scale-105 bg-cover bg-center blur-[2px]'
|
|
162
|
-
<div data-radio-slide class='absolute inset-0 scale-105 bg-cover bg-center blur-[2px]'
|
|
163
|
-
<div data-radio-slide class='absolute inset-0 scale-105 bg-cover bg-center blur-[2px]'
|
|
164
|
-
<div data-radio-slide class='absolute inset-0 scale-105 bg-cover bg-center blur-[2px]'
|
|
165
|
-
<div data-radio-slide class='absolute inset-0 scale-105 bg-cover bg-center blur-[2px]'
|
|
166
|
-
<div data-radio-slide class='absolute inset-0 scale-105 bg-cover bg-center blur-[2px]'
|
|
167
|
-
<div data-radio-slide class='absolute inset-0 scale-105 bg-cover bg-center blur-[2px]'
|
|
168
|
-
<div data-radio-slide class='absolute inset-0 scale-105 bg-cover bg-center blur-[2px]'
|
|
169
|
-
<div data-radio-slide class='absolute inset-0 scale-105 bg-cover bg-center blur-[2px]'
|
|
158
|
+
<div data-radio-slide class='is-active absolute inset-0 scale-105 bg-cover bg-center blur-[2px]' style='background-image: url(https://macondostack-alcantara-assets.s3.amazonaws.com/artwork/header-1600/compressed_dsc03263-64a92d8e-97a3-4489-bab8-fcc3f44deac6.avif); opacity: 1; transition: opacity 1200ms ease-in-out;'></div>
|
|
159
|
+
<div data-radio-slide class='absolute inset-0 scale-105 bg-cover bg-center blur-[2px]' data-bg='https://macondostack-alcantara-assets.s3.amazonaws.com/artwork/header-1600/compressed_dsc03438-91d37874-cc48-40df-91ef-25ed7cf10531.avif' style='opacity: 0; transition: opacity 1200ms ease-in-out;'></div>
|
|
160
|
+
<div data-radio-slide class='absolute inset-0 scale-105 bg-cover bg-center blur-[2px]' data-bg='https://macondostack-alcantara-assets.s3.amazonaws.com/artwork/header-1600/compressed_dsc03530-e2afbb0a-a55d-48a6-803b-42f2d2f06f05.avif' style='opacity: 0; transition: opacity 1200ms ease-in-out;'></div>
|
|
161
|
+
<div data-radio-slide class='absolute inset-0 scale-105 bg-cover bg-center blur-[2px]' data-bg='https://macondostack-alcantara-assets.s3.amazonaws.com/artwork/header-1600/compressed_dsc03559-9b3b796a-cff6-41a9-8f17-5f5f309fe2ae.avif' style='opacity: 0; transition: opacity 1200ms ease-in-out;'></div>
|
|
162
|
+
<div data-radio-slide class='absolute inset-0 scale-105 bg-cover bg-center blur-[2px]' data-bg='https://macondostack-alcantara-assets.s3.amazonaws.com/artwork/header-1600/compressed_dsc03615-b9a8d46d-c533-4481-a58b-3b89421cae7a.avif' style='opacity: 0; transition: opacity 1200ms ease-in-out;'></div>
|
|
163
|
+
<div data-radio-slide class='absolute inset-0 scale-105 bg-cover bg-center blur-[2px]' data-bg='https://macondostack-alcantara-assets.s3.amazonaws.com/artwork/header-1600/compressed_dsc01713-8a4dbf77-00ba-4045-9b45-32a2fd9f77ae.avif' style='opacity: 0; transition: opacity 1200ms ease-in-out;'></div>
|
|
164
|
+
<div data-radio-slide class='absolute inset-0 scale-105 bg-cover bg-center blur-[2px]' data-bg='https://macondostack-alcantara-assets.s3.amazonaws.com/artwork/header-1600/compressed_dsc01759-3eebe4ca-f7de-4316-ae44-a5920be4f960.avif' style='opacity: 0; transition: opacity 1200ms ease-in-out;'></div>
|
|
165
|
+
<div data-radio-slide class='absolute inset-0 scale-105 bg-cover bg-center blur-[2px]' data-bg='https://macondostack-alcantara-assets.s3.amazonaws.com/artwork/header-1600/compressed_dsc01836-2d771594-6a55-4ea7-9fec-33ca190bee67.avif' style='opacity: 0; transition: opacity 1200ms ease-in-out;'></div>
|
|
166
|
+
<div data-radio-slide class='absolute inset-0 scale-105 bg-cover bg-center blur-[2px]' data-bg='https://macondostack-alcantara-assets.s3.amazonaws.com/artwork/header-1600/compressed_dsc06730-fda567cd-350a-40d8-bccd-1e75429d82fa.avif' style='opacity: 0; transition: opacity 1200ms ease-in-out;'></div>
|
|
167
|
+
<div data-radio-slide class='absolute inset-0 scale-105 bg-cover bg-center blur-[2px]' data-bg='https://macondostack-alcantara-assets.s3.amazonaws.com/artwork/header-1600/compressed_dsc05911-c0b81f38-f613-46a5-9a94-9fccd5a934f9.avif' style='opacity: 0; transition: opacity 1200ms ease-in-out;'></div>
|
|
168
|
+
<div data-radio-slide class='absolute inset-0 scale-105 bg-cover bg-center blur-[2px]' data-bg='https://macondostack-alcantara-assets.s3.amazonaws.com/artwork/header-1600/compressed_dsc02290-cdb90e9f-669d-4401-86f9-e884e513eda8.avif' style='opacity: 0; transition: opacity 1200ms ease-in-out;'></div>
|
|
169
|
+
<div data-radio-slide class='absolute inset-0 scale-105 bg-cover bg-center blur-[2px]' data-bg='https://macondostack-alcantara-assets.s3.amazonaws.com/artwork/header-1600/compressed_dsc01841-c370f4d2-c738-4786-9bb0-263b6d0ab0f2.avif' style='opacity: 0; transition: opacity 1200ms ease-in-out;'></div>
|
|
170
170
|
<div
|
|
171
171
|
class='absolute inset-0'
|
|
172
172
|
style='background: rgba(10, 18, 52, 0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);'
|
|
@@ -462,16 +462,47 @@
|
|
|
462
462
|
|
|
463
463
|
<script>
|
|
464
464
|
(() => {
|
|
465
|
+
// Only the first slide's image is in the markup. The others carry it in
|
|
466
|
+
// data-bg and are fetched one at a time, just before they are shown, and
|
|
467
|
+
// not at all where the rotation does not run (reduced motion, data saver,
|
|
468
|
+
// a slow connection) or while the tab is hidden.
|
|
465
469
|
const slides = [...document.querySelectorAll('[data-radio-slide]')];
|
|
466
|
-
|
|
470
|
+
const connection = navigator.connection;
|
|
471
|
+
const slowConnection = !!connection && (connection.saveData === true || /(^|-)2g$/.test(connection.effectiveType || ''));
|
|
472
|
+
if (slides.length < 2 || slowConnection || window.matchMedia('(prefers-reduced-motion: reduce)').matches) return;
|
|
473
|
+
|
|
474
|
+
const ready = (index) => {
|
|
475
|
+
const slide = slides[index];
|
|
476
|
+
if (slide.style.backgroundImage) return Promise.resolve(true);
|
|
477
|
+
return new Promise((resolve) => {
|
|
478
|
+
const image = new Image();
|
|
479
|
+
image.onload = () => {
|
|
480
|
+
slide.style.backgroundImage = 'url("' + slide.dataset.bg + '")';
|
|
481
|
+
resolve(true);
|
|
482
|
+
};
|
|
483
|
+
image.onerror = () => resolve(false);
|
|
484
|
+
image.src = slide.dataset.bg;
|
|
485
|
+
});
|
|
486
|
+
};
|
|
467
487
|
|
|
468
488
|
let activeSlide = 0;
|
|
469
|
-
|
|
489
|
+
let preparing = false;
|
|
490
|
+
const next = () => (activeSlide + 1) % slides.length;
|
|
491
|
+
const prepareNext = () => {
|
|
492
|
+
if (preparing || document.hidden) return Promise.resolve(false);
|
|
493
|
+
preparing = true;
|
|
494
|
+
return ready(next()).finally(() => { preparing = false; });
|
|
495
|
+
};
|
|
496
|
+
|
|
497
|
+
window.addEventListener('load', () => { window.setTimeout(prepareNext, 4000); }, { once: true });
|
|
498
|
+
window.setInterval(async () => {
|
|
499
|
+
if (document.hidden || !(await prepareNext())) return;
|
|
470
500
|
slides[activeSlide].style.opacity = '0';
|
|
471
501
|
slides[activeSlide].classList.remove('is-active');
|
|
472
|
-
activeSlide = (
|
|
502
|
+
activeSlide = next();
|
|
473
503
|
slides[activeSlide].style.opacity = '1';
|
|
474
504
|
slides[activeSlide].classList.add('is-active');
|
|
505
|
+
window.setTimeout(prepareNext, 1500);
|
|
475
506
|
}, 6500);
|
|
476
507
|
})();
|
|
477
508
|
</script>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<link href='/content/styles/giorgia.css' rel='stylesheet' />
|
|
10
10
|
{{#if (eq layout 'homepage')}}
|
|
11
11
|
{{#if hero.url}}
|
|
12
|
-
<link rel='preload' as='image' href='{{hero.url}}' fetchpriority='high' />
|
|
12
|
+
<link rel='preload' as='image' href='{{hero.url}}'{{#if hero.variants}} imagesrcset='{{#each hero.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if hero.width}}, {{hero.url}} {{hero.width}}w{{/if}}' imagesizes='100vw'{{/if}} fetchpriority='high' />
|
|
13
13
|
{{/if}}
|
|
14
14
|
{{else}}
|
|
15
15
|
{{#if featuredImage.url}}
|