@modoitaliano/giorgia 0.1.109 → 0.1.111
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/README.md +4 -0
- package/dist/cronkite-manifest.json +1 -1
- package/dist/live-program-page/live-program-manifest.json +1 -1
- package/dist/schemas/canonical-document.schema.json +60 -4
- package/dist/types/canonical-document-schema.generated.d.ts +116 -0
- package/dist/types/canonical-document-schema.generated.js +116 -0
- package/dist/types/canonical-document.generated.d.ts +32 -0
- package/package.json +1 -1
- package/src/templates/layouts/link-in-bio.hbs +1 -1
- package/src/templates/partials/blocks/image.hbs +1 -1
- package/src/templates/partials/blocks/live-update.hbs +1 -1
- package/src/templates/partials/components/article-main.hbs +2 -8
- package/src/templates/partials/components/category/main-grid.hbs +3 -2
- package/src/templates/partials/components/category/more-grid.hbs +1 -1
- package/src/templates/partials/components/home/landing.hbs +4 -2
- package/src/templates/partials/components/home/must-read.hbs +3 -3
- package/src/templates/partials/components/live-story/main.hbs +5 -28
- package/src/templates/partials/components/snack.hbs +6 -2
- package/src/templates/partials/headers/header-main.hbs +46 -15
- package/src/templates/partials/shell/doc-start-standard.hbs +1 -1
package/README.md
CHANGED
|
@@ -194,6 +194,10 @@ The TV graphics components live in `src/components/live-program/tv/`: `ModoItali
|
|
|
194
194
|
|
|
195
195
|
TV images ship in the bundle under `modoitaliano/tv/` and are referenced bundle-relative through `MODOITALIANO_ASSETS.tv` (`src/components/live-program/assets.ts`), so they load when the bundle is served from a sub-path. Only `reloj.png`, the `ClockWidget` plate (byte-identical to `gaulatti/alcantara` `frontend/public/reloj.png` at `f13ee4d`, sha256 `3b62d40e…ce04823`), is carried; `ClockWidget` sets it as an inline `backgroundImage` so Vite does not resolve it at build time. Alcantara's three ModoRadio marks (`bug-sm.svg`, `bug-big.svg`, `reloj-modoradio_full_negro.svg`) are retired from Giorgia and are not bundled: `LogoWidget` draws only a scene-supplied `logoUrl` and draws nothing without one (so `CronicaLayout`, which passes none, shows no logo), and `RelojClone` draws its analogue clock without the wordmark plate beneath it. `src/live-program-bundle.test.ts` builds the bundle with the real config and checks that none of the retired marks or their names are in the output and that the manifest lists `reloj.png` with its sha256.
|
|
196
196
|
|
|
197
|
+
## Image variants
|
|
198
|
+
|
|
199
|
+
`featuredImage`, and the image blocks of a body, may carry the original's `width` and `height` (integers, pixels) and `variants`, an array of `{ url, width, height }` sorted by width ascending and holding only variants that exist. All three are optional and the original `url` is unchanged. When `variants` is present the templates emit `srcset` (the variants plus the original, when its width is known) and `sizes` for the slot, with `width` and `height` set; when it is absent they emit the original `url` exactly as before. Images below the fold are `loading='lazy'`; the lead image of a page is not, and carries `fetchpriority='high'`. The markup is written out at each image (Cronkite's contract lets a template name a partial only once, so a shared partial cannot serve a template with several images). Unknown extra fields are ignored. CSS background images (the editorial hero and the landing story card) cannot use `srcset` and still load the original.
|
|
200
|
+
|
|
197
201
|
## Publish flow
|
|
198
202
|
|
|
199
203
|
- CI validates typecheck, unit tests, and package build on pull requests and `main` pushes.
|
|
@@ -74,7 +74,21 @@
|
|
|
74
74
|
"properties": {
|
|
75
75
|
"url": { "type": "string", "minLength": 1 },
|
|
76
76
|
"alt": { "type": "string" },
|
|
77
|
-
"caption": { "type": "string" }
|
|
77
|
+
"caption": { "type": "string" },
|
|
78
|
+
"width": { "type": "integer", "minimum": 1 },
|
|
79
|
+
"height": { "type": "integer", "minimum": 1 },
|
|
80
|
+
"variants": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"items": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"properties": {
|
|
85
|
+
"url": { "type": "string", "minLength": 1 },
|
|
86
|
+
"width": { "type": "integer", "minimum": 1 },
|
|
87
|
+
"height": { "type": "integer", "minimum": 1 }
|
|
88
|
+
},
|
|
89
|
+
"required": ["url", "width", "height"]
|
|
90
|
+
}
|
|
91
|
+
}
|
|
78
92
|
},
|
|
79
93
|
"required": ["url", "alt"]
|
|
80
94
|
},
|
|
@@ -374,7 +388,21 @@
|
|
|
374
388
|
"properties": {
|
|
375
389
|
"url": { "type": "string", "minLength": 1 },
|
|
376
390
|
"alt": { "type": "string" },
|
|
377
|
-
"caption": { "type": "string" }
|
|
391
|
+
"caption": { "type": "string" },
|
|
392
|
+
"width": { "type": "integer", "minimum": 1 },
|
|
393
|
+
"height": { "type": "integer", "minimum": 1 },
|
|
394
|
+
"variants": {
|
|
395
|
+
"type": "array",
|
|
396
|
+
"items": {
|
|
397
|
+
"type": "object",
|
|
398
|
+
"properties": {
|
|
399
|
+
"url": { "type": "string", "minLength": 1 },
|
|
400
|
+
"width": { "type": "integer", "minimum": 1 },
|
|
401
|
+
"height": { "type": "integer", "minimum": 1 }
|
|
402
|
+
},
|
|
403
|
+
"required": ["url", "width", "height"]
|
|
404
|
+
}
|
|
405
|
+
}
|
|
378
406
|
},
|
|
379
407
|
"required": ["url", "alt"]
|
|
380
408
|
},
|
|
@@ -627,7 +655,21 @@
|
|
|
627
655
|
"properties": {
|
|
628
656
|
"url": { "type": "string", "minLength": 1 },
|
|
629
657
|
"alt": { "type": "string" },
|
|
630
|
-
"caption": { "type": "string" }
|
|
658
|
+
"caption": { "type": "string" },
|
|
659
|
+
"width": { "type": "integer", "minimum": 1 },
|
|
660
|
+
"height": { "type": "integer", "minimum": 1 },
|
|
661
|
+
"variants": {
|
|
662
|
+
"type": "array",
|
|
663
|
+
"items": {
|
|
664
|
+
"type": "object",
|
|
665
|
+
"properties": {
|
|
666
|
+
"url": { "type": "string", "minLength": 1 },
|
|
667
|
+
"width": { "type": "integer", "minimum": 1 },
|
|
668
|
+
"height": { "type": "integer", "minimum": 1 }
|
|
669
|
+
},
|
|
670
|
+
"required": ["url", "width", "height"]
|
|
671
|
+
}
|
|
672
|
+
}
|
|
631
673
|
},
|
|
632
674
|
"required": ["url", "alt"]
|
|
633
675
|
},
|
|
@@ -927,7 +969,21 @@
|
|
|
927
969
|
"properties": {
|
|
928
970
|
"url": { "type": "string", "minLength": 1 },
|
|
929
971
|
"alt": { "type": "string" },
|
|
930
|
-
"caption": { "type": "string" }
|
|
972
|
+
"caption": { "type": "string" },
|
|
973
|
+
"width": { "type": "integer", "minimum": 1 },
|
|
974
|
+
"height": { "type": "integer", "minimum": 1 },
|
|
975
|
+
"variants": {
|
|
976
|
+
"type": "array",
|
|
977
|
+
"items": {
|
|
978
|
+
"type": "object",
|
|
979
|
+
"properties": {
|
|
980
|
+
"url": { "type": "string", "minLength": 1 },
|
|
981
|
+
"width": { "type": "integer", "minimum": 1 },
|
|
982
|
+
"height": { "type": "integer", "minimum": 1 }
|
|
983
|
+
},
|
|
984
|
+
"required": ["url", "width", "height"]
|
|
985
|
+
}
|
|
986
|
+
}
|
|
931
987
|
},
|
|
932
988
|
"required": ["url", "alt"]
|
|
933
989
|
},
|
|
@@ -121,6 +121,35 @@ export declare const canonicalDocumentSchema: {
|
|
|
121
121
|
readonly caption: {
|
|
122
122
|
readonly type: "string";
|
|
123
123
|
};
|
|
124
|
+
readonly width: {
|
|
125
|
+
readonly type: "integer";
|
|
126
|
+
readonly minimum: 1;
|
|
127
|
+
};
|
|
128
|
+
readonly height: {
|
|
129
|
+
readonly type: "integer";
|
|
130
|
+
readonly minimum: 1;
|
|
131
|
+
};
|
|
132
|
+
readonly variants: {
|
|
133
|
+
readonly type: "array";
|
|
134
|
+
readonly items: {
|
|
135
|
+
readonly type: "object";
|
|
136
|
+
readonly properties: {
|
|
137
|
+
readonly url: {
|
|
138
|
+
readonly type: "string";
|
|
139
|
+
readonly minLength: 1;
|
|
140
|
+
};
|
|
141
|
+
readonly width: {
|
|
142
|
+
readonly type: "integer";
|
|
143
|
+
readonly minimum: 1;
|
|
144
|
+
};
|
|
145
|
+
readonly height: {
|
|
146
|
+
readonly type: "integer";
|
|
147
|
+
readonly minimum: 1;
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
readonly required: readonly ["url", "width", "height"];
|
|
151
|
+
};
|
|
152
|
+
};
|
|
124
153
|
};
|
|
125
154
|
readonly required: readonly ["url", "alt"];
|
|
126
155
|
};
|
|
@@ -591,6 +620,35 @@ export declare const canonicalDocumentSchema: {
|
|
|
591
620
|
readonly caption: {
|
|
592
621
|
readonly type: "string";
|
|
593
622
|
};
|
|
623
|
+
readonly width: {
|
|
624
|
+
readonly type: "integer";
|
|
625
|
+
readonly minimum: 1;
|
|
626
|
+
};
|
|
627
|
+
readonly height: {
|
|
628
|
+
readonly type: "integer";
|
|
629
|
+
readonly minimum: 1;
|
|
630
|
+
};
|
|
631
|
+
readonly variants: {
|
|
632
|
+
readonly type: "array";
|
|
633
|
+
readonly items: {
|
|
634
|
+
readonly type: "object";
|
|
635
|
+
readonly properties: {
|
|
636
|
+
readonly url: {
|
|
637
|
+
readonly type: "string";
|
|
638
|
+
readonly minLength: 1;
|
|
639
|
+
};
|
|
640
|
+
readonly width: {
|
|
641
|
+
readonly type: "integer";
|
|
642
|
+
readonly minimum: 1;
|
|
643
|
+
};
|
|
644
|
+
readonly height: {
|
|
645
|
+
readonly type: "integer";
|
|
646
|
+
readonly minimum: 1;
|
|
647
|
+
};
|
|
648
|
+
};
|
|
649
|
+
readonly required: readonly ["url", "width", "height"];
|
|
650
|
+
};
|
|
651
|
+
};
|
|
594
652
|
};
|
|
595
653
|
readonly required: readonly ["url", "alt"];
|
|
596
654
|
};
|
|
@@ -972,6 +1030,35 @@ export declare const canonicalDocumentSchema: {
|
|
|
972
1030
|
readonly caption: {
|
|
973
1031
|
readonly type: "string";
|
|
974
1032
|
};
|
|
1033
|
+
readonly width: {
|
|
1034
|
+
readonly type: "integer";
|
|
1035
|
+
readonly minimum: 1;
|
|
1036
|
+
};
|
|
1037
|
+
readonly height: {
|
|
1038
|
+
readonly type: "integer";
|
|
1039
|
+
readonly minimum: 1;
|
|
1040
|
+
};
|
|
1041
|
+
readonly variants: {
|
|
1042
|
+
readonly type: "array";
|
|
1043
|
+
readonly items: {
|
|
1044
|
+
readonly type: "object";
|
|
1045
|
+
readonly properties: {
|
|
1046
|
+
readonly url: {
|
|
1047
|
+
readonly type: "string";
|
|
1048
|
+
readonly minLength: 1;
|
|
1049
|
+
};
|
|
1050
|
+
readonly width: {
|
|
1051
|
+
readonly type: "integer";
|
|
1052
|
+
readonly minimum: 1;
|
|
1053
|
+
};
|
|
1054
|
+
readonly height: {
|
|
1055
|
+
readonly type: "integer";
|
|
1056
|
+
readonly minimum: 1;
|
|
1057
|
+
};
|
|
1058
|
+
};
|
|
1059
|
+
readonly required: readonly ["url", "width", "height"];
|
|
1060
|
+
};
|
|
1061
|
+
};
|
|
975
1062
|
};
|
|
976
1063
|
readonly required: readonly ["url", "alt"];
|
|
977
1064
|
};
|
|
@@ -1442,6 +1529,35 @@ export declare const canonicalDocumentSchema: {
|
|
|
1442
1529
|
readonly caption: {
|
|
1443
1530
|
readonly type: "string";
|
|
1444
1531
|
};
|
|
1532
|
+
readonly width: {
|
|
1533
|
+
readonly type: "integer";
|
|
1534
|
+
readonly minimum: 1;
|
|
1535
|
+
};
|
|
1536
|
+
readonly height: {
|
|
1537
|
+
readonly type: "integer";
|
|
1538
|
+
readonly minimum: 1;
|
|
1539
|
+
};
|
|
1540
|
+
readonly variants: {
|
|
1541
|
+
readonly type: "array";
|
|
1542
|
+
readonly items: {
|
|
1543
|
+
readonly type: "object";
|
|
1544
|
+
readonly properties: {
|
|
1545
|
+
readonly url: {
|
|
1546
|
+
readonly type: "string";
|
|
1547
|
+
readonly minLength: 1;
|
|
1548
|
+
};
|
|
1549
|
+
readonly width: {
|
|
1550
|
+
readonly type: "integer";
|
|
1551
|
+
readonly minimum: 1;
|
|
1552
|
+
};
|
|
1553
|
+
readonly height: {
|
|
1554
|
+
readonly type: "integer";
|
|
1555
|
+
readonly minimum: 1;
|
|
1556
|
+
};
|
|
1557
|
+
};
|
|
1558
|
+
readonly required: readonly ["url", "width", "height"];
|
|
1559
|
+
};
|
|
1560
|
+
};
|
|
1445
1561
|
};
|
|
1446
1562
|
readonly required: readonly ["url", "alt"];
|
|
1447
1563
|
};
|
|
@@ -129,6 +129,35 @@ export const canonicalDocumentSchema = {
|
|
|
129
129
|
caption: {
|
|
130
130
|
type: "string",
|
|
131
131
|
},
|
|
132
|
+
width: {
|
|
133
|
+
type: "integer",
|
|
134
|
+
minimum: 1,
|
|
135
|
+
},
|
|
136
|
+
height: {
|
|
137
|
+
type: "integer",
|
|
138
|
+
minimum: 1,
|
|
139
|
+
},
|
|
140
|
+
variants: {
|
|
141
|
+
type: "array",
|
|
142
|
+
items: {
|
|
143
|
+
type: "object",
|
|
144
|
+
properties: {
|
|
145
|
+
url: {
|
|
146
|
+
type: "string",
|
|
147
|
+
minLength: 1,
|
|
148
|
+
},
|
|
149
|
+
width: {
|
|
150
|
+
type: "integer",
|
|
151
|
+
minimum: 1,
|
|
152
|
+
},
|
|
153
|
+
height: {
|
|
154
|
+
type: "integer",
|
|
155
|
+
minimum: 1,
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
required: ["url", "width", "height"],
|
|
159
|
+
},
|
|
160
|
+
},
|
|
132
161
|
},
|
|
133
162
|
required: ["url", "alt"],
|
|
134
163
|
},
|
|
@@ -634,6 +663,35 @@ export const canonicalDocumentSchema = {
|
|
|
634
663
|
caption: {
|
|
635
664
|
type: "string",
|
|
636
665
|
},
|
|
666
|
+
width: {
|
|
667
|
+
type: "integer",
|
|
668
|
+
minimum: 1,
|
|
669
|
+
},
|
|
670
|
+
height: {
|
|
671
|
+
type: "integer",
|
|
672
|
+
minimum: 1,
|
|
673
|
+
},
|
|
674
|
+
variants: {
|
|
675
|
+
type: "array",
|
|
676
|
+
items: {
|
|
677
|
+
type: "object",
|
|
678
|
+
properties: {
|
|
679
|
+
url: {
|
|
680
|
+
type: "string",
|
|
681
|
+
minLength: 1,
|
|
682
|
+
},
|
|
683
|
+
width: {
|
|
684
|
+
type: "integer",
|
|
685
|
+
minimum: 1,
|
|
686
|
+
},
|
|
687
|
+
height: {
|
|
688
|
+
type: "integer",
|
|
689
|
+
minimum: 1,
|
|
690
|
+
},
|
|
691
|
+
},
|
|
692
|
+
required: ["url", "width", "height"],
|
|
693
|
+
},
|
|
694
|
+
},
|
|
637
695
|
},
|
|
638
696
|
required: ["url", "alt"],
|
|
639
697
|
},
|
|
@@ -1037,6 +1095,35 @@ export const canonicalDocumentSchema = {
|
|
|
1037
1095
|
caption: {
|
|
1038
1096
|
type: "string",
|
|
1039
1097
|
},
|
|
1098
|
+
width: {
|
|
1099
|
+
type: "integer",
|
|
1100
|
+
minimum: 1,
|
|
1101
|
+
},
|
|
1102
|
+
height: {
|
|
1103
|
+
type: "integer",
|
|
1104
|
+
minimum: 1,
|
|
1105
|
+
},
|
|
1106
|
+
variants: {
|
|
1107
|
+
type: "array",
|
|
1108
|
+
items: {
|
|
1109
|
+
type: "object",
|
|
1110
|
+
properties: {
|
|
1111
|
+
url: {
|
|
1112
|
+
type: "string",
|
|
1113
|
+
minLength: 1,
|
|
1114
|
+
},
|
|
1115
|
+
width: {
|
|
1116
|
+
type: "integer",
|
|
1117
|
+
minimum: 1,
|
|
1118
|
+
},
|
|
1119
|
+
height: {
|
|
1120
|
+
type: "integer",
|
|
1121
|
+
minimum: 1,
|
|
1122
|
+
},
|
|
1123
|
+
},
|
|
1124
|
+
required: ["url", "width", "height"],
|
|
1125
|
+
},
|
|
1126
|
+
},
|
|
1040
1127
|
},
|
|
1041
1128
|
required: ["url", "alt"],
|
|
1042
1129
|
},
|
|
@@ -1542,6 +1629,35 @@ export const canonicalDocumentSchema = {
|
|
|
1542
1629
|
caption: {
|
|
1543
1630
|
type: "string",
|
|
1544
1631
|
},
|
|
1632
|
+
width: {
|
|
1633
|
+
type: "integer",
|
|
1634
|
+
minimum: 1,
|
|
1635
|
+
},
|
|
1636
|
+
height: {
|
|
1637
|
+
type: "integer",
|
|
1638
|
+
minimum: 1,
|
|
1639
|
+
},
|
|
1640
|
+
variants: {
|
|
1641
|
+
type: "array",
|
|
1642
|
+
items: {
|
|
1643
|
+
type: "object",
|
|
1644
|
+
properties: {
|
|
1645
|
+
url: {
|
|
1646
|
+
type: "string",
|
|
1647
|
+
minLength: 1,
|
|
1648
|
+
},
|
|
1649
|
+
width: {
|
|
1650
|
+
type: "integer",
|
|
1651
|
+
minimum: 1,
|
|
1652
|
+
},
|
|
1653
|
+
height: {
|
|
1654
|
+
type: "integer",
|
|
1655
|
+
minimum: 1,
|
|
1656
|
+
},
|
|
1657
|
+
},
|
|
1658
|
+
required: ["url", "width", "height"],
|
|
1659
|
+
},
|
|
1660
|
+
},
|
|
1545
1661
|
},
|
|
1546
1662
|
required: ["url", "alt"],
|
|
1547
1663
|
},
|
|
@@ -35,6 +35,14 @@ export type CronkiteCanonicalDocument = {
|
|
|
35
35
|
url: string;
|
|
36
36
|
alt: string;
|
|
37
37
|
caption?: string;
|
|
38
|
+
width?: number;
|
|
39
|
+
height?: number;
|
|
40
|
+
variants?: {
|
|
41
|
+
url: string;
|
|
42
|
+
width: number;
|
|
43
|
+
height: number;
|
|
44
|
+
[k: string]: unknown;
|
|
45
|
+
}[];
|
|
38
46
|
[k: string]: unknown;
|
|
39
47
|
};
|
|
40
48
|
media?: {
|
|
@@ -199,6 +207,14 @@ export type CronkiteCanonicalDocument = {
|
|
|
199
207
|
url: string;
|
|
200
208
|
alt: string;
|
|
201
209
|
caption?: string;
|
|
210
|
+
width?: number;
|
|
211
|
+
height?: number;
|
|
212
|
+
variants?: {
|
|
213
|
+
url: string;
|
|
214
|
+
width: number;
|
|
215
|
+
height: number;
|
|
216
|
+
[k: string]: unknown;
|
|
217
|
+
}[];
|
|
202
218
|
[k: string]: unknown;
|
|
203
219
|
};
|
|
204
220
|
updatedAt?: string;
|
|
@@ -323,6 +339,14 @@ export type CronkiteCanonicalDocument = {
|
|
|
323
339
|
url: string;
|
|
324
340
|
alt: string;
|
|
325
341
|
caption?: string;
|
|
342
|
+
width?: number;
|
|
343
|
+
height?: number;
|
|
344
|
+
variants?: {
|
|
345
|
+
url: string;
|
|
346
|
+
width: number;
|
|
347
|
+
height: number;
|
|
348
|
+
[k: string]: unknown;
|
|
349
|
+
}[];
|
|
326
350
|
[k: string]: unknown;
|
|
327
351
|
};
|
|
328
352
|
media?: {
|
|
@@ -487,6 +511,14 @@ export type CronkiteCanonicalDocument = {
|
|
|
487
511
|
url: string;
|
|
488
512
|
alt: string;
|
|
489
513
|
caption?: string;
|
|
514
|
+
width?: number;
|
|
515
|
+
height?: number;
|
|
516
|
+
variants?: {
|
|
517
|
+
url: string;
|
|
518
|
+
width: number;
|
|
519
|
+
height: number;
|
|
520
|
+
[k: string]: unknown;
|
|
521
|
+
}[];
|
|
490
522
|
[k: string]: unknown;
|
|
491
523
|
};
|
|
492
524
|
updatedAt?: string;
|
package/package.json
CHANGED
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
<a class='card' href='{{url}}' aria-label='Leer artículo: {{title}}'>
|
|
200
200
|
{{#if featuredImage.url}}
|
|
201
201
|
<div class='card-bg'>
|
|
202
|
-
<img src='{{featuredImage.url}}' alt='{{#if featuredImage.
|
|
202
|
+
{{#if featuredImage.alt}}<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}'{{#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: 640px) 33vw, 100vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} loading='lazy' />{{else}}<img src='{{featuredImage.url}}' alt='{{title}}'{{#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: 640px) 33vw, 100vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} loading='lazy' />{{/if}}
|
|
203
203
|
</div>
|
|
204
204
|
{{/if}}
|
|
205
205
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<figure class='my-8'>
|
|
2
|
-
<img src='{{url}}' alt='{{alt}}' class='w-full h-auto object-cover' />
|
|
2
|
+
<img src='{{this.url}}' alt='{{alt}}' class='w-full h-auto object-cover'{{#if this.variants}} srcset='{{#each this.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if this.width}}, {{this.url}} {{this.width}}w{{/if}}' sizes='(min-width: 1024px) 66vw, 100vw'{{/if}}{{#if this.width}}{{#if this.height}} width='{{this.width}}' height='{{this.height}}'{{/if}}{{/if}} loading='lazy' />
|
|
3
3
|
{{#if caption}}
|
|
4
4
|
<figcaption class='text-sm text-slate-500 dark:text-slate-400 mt-2'>{{caption}}</figcaption>
|
|
5
5
|
{{/if}}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<div class='mt-3 grid grid-cols-1 sm:grid-cols-2 gap-3'>
|
|
12
12
|
{{#each media}}
|
|
13
13
|
<figure class='overflow-hidden rounded-lg border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-900'>
|
|
14
|
-
<img src='{{url}}' alt='{{alt}}' class='w-full h-auto object-cover' loading='lazy' />
|
|
14
|
+
<img src='{{this.url}}' alt='{{alt}}' class='w-full h-auto object-cover'{{#if this.variants}} srcset='{{#each this.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if this.width}}, {{this.url}} {{this.width}}w{{/if}}' sizes='(min-width: 1024px) 66vw, 100vw'{{/if}}{{#if this.width}}{{#if this.height}} width='{{this.width}}' height='{{this.height}}'{{/if}}{{/if}} loading='lazy' />
|
|
15
15
|
{{#if caption}}
|
|
16
16
|
<figcaption class='px-3 py-2 text-xs text-slate-500 dark:text-slate-400'>
|
|
17
17
|
{{caption}}
|
|
@@ -2,14 +2,7 @@
|
|
|
2
2
|
<div class='col-span-12 lg:col-span-4'>
|
|
3
3
|
{{#if featuredImage}}
|
|
4
4
|
<div class='mb-6 overflow-hidden aspect-video bg-slate-100'>
|
|
5
|
-
<img
|
|
6
|
-
src='{{featuredImage.url}}'
|
|
7
|
-
alt='{{featuredImage.alt}}'
|
|
8
|
-
class='w-full h-full object-cover'
|
|
9
|
-
fetchpriority='high'
|
|
10
|
-
loading='eager'
|
|
11
|
-
decoding='async'
|
|
12
|
-
/>
|
|
5
|
+
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover'{{#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: 1024px) 33vw, 100vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} fetchpriority='high' loading='eager' decoding='async' />
|
|
13
6
|
</div>
|
|
14
7
|
{{/if}}
|
|
15
8
|
|
|
@@ -90,6 +83,7 @@
|
|
|
90
83
|
url=url
|
|
91
84
|
title=title
|
|
92
85
|
image=featuredImage.url
|
|
86
|
+
imageSource=featuredImage
|
|
93
87
|
alt=featuredImage.alt
|
|
94
88
|
categories=categories
|
|
95
89
|
excerpt=excerpt
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
{{#with (lookup articles 0)}}
|
|
4
4
|
<article class='mb-8'>
|
|
5
5
|
<a href='{{url}}' class='block mb-4 overflow-hidden aspect-video bg-slate-100'>
|
|
6
|
-
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover transition-transform duration-500 hover:scale-105' />
|
|
6
|
+
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover transition-transform duration-500 hover:scale-105'{{#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: 1024px) 66vw, 100vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} />
|
|
7
7
|
</a>
|
|
8
8
|
|
|
9
9
|
<div class='flex items-center text-xs font-bold uppercase tracking-wider text-[#8f0d00] mb-3'>
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
{{#each (slice articles 1 3)}}
|
|
24
24
|
<article class='group'>
|
|
25
25
|
<a href='{{url}}' class='block mb-4 overflow-hidden aspect-[3/2] bg-slate-100'>
|
|
26
|
-
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover transition-transform duration-500 group-hover:scale-105' />
|
|
26
|
+
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover transition-transform duration-500 group-hover:scale-105'{{#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: 768px) 33vw, 100vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} loading='lazy' />
|
|
27
27
|
</a>
|
|
28
28
|
<div class='space-y-2'>
|
|
29
29
|
<span class='text-xs font-bold text-[#8f0d00] uppercase tracking-wider'>{{#with (lookup categories 0)}}{{name}}{{/with}}</span>
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
url=url
|
|
45
45
|
title=title
|
|
46
46
|
image=featuredImage.url
|
|
47
|
+
imageSource=featuredImage
|
|
47
48
|
alt=featuredImage.alt
|
|
48
49
|
readTime=(formatDate updatedAt)
|
|
49
50
|
showExcerpt=false
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
{{#each (slice articles 13 25)}}
|
|
8
8
|
<article class='group flex flex-col h-full'>
|
|
9
9
|
<a href='{{url}}' class='block mb-3 overflow-hidden aspect-[3/2] bg-slate-100'>
|
|
10
|
-
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover transition-transform duration-500 group-hover:scale-105' />
|
|
10
|
+
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover transition-transform duration-500 group-hover:scale-105'{{#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: 1024px) 33vw, (min-width: 768px) 50vw, 100vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} loading='lazy' />
|
|
11
11
|
</a>
|
|
12
12
|
<div class='flex-1 flex flex-col'>
|
|
13
13
|
<div class='flex items-center text-xs font-bold uppercase tracking-wider text-[#8f0d00] mb-2'>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
{{#with homepageSlots.landing.headline1}}
|
|
4
4
|
<section class='lg:col-span-12 xl:col-span-8 flex flex-col'>
|
|
5
5
|
<a href='{{url}}' class='relative flex-shrink-0 block'>
|
|
6
|
-
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-[400px] object-cover rounded' fetchpriority='high' />
|
|
6
|
+
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-[400px] object-cover rounded'{{#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) 33vw, (min-width: 1024px) 75vw, 100vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} fetchpriority='high' />
|
|
7
7
|
</a>
|
|
8
8
|
|
|
9
9
|
<div class='mt-4 flex-grow flex flex-col'>
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
excerpt=excerpt
|
|
28
28
|
showExcerpt=false
|
|
29
29
|
image=featuredImage.url
|
|
30
|
+
imageSource=featuredImage
|
|
30
31
|
alt=featuredImage.alt
|
|
31
32
|
readTime=(formatDate updatedAt)
|
|
32
33
|
imageSize='w-24 h-24'
|
|
@@ -64,7 +65,7 @@
|
|
|
64
65
|
{{#with homepageSlots.landing.headline6}}
|
|
65
66
|
<div class='flex flex-col'>
|
|
66
67
|
<a href='{{url}}' class='mb-4 flex-shrink-0 h-[180px] block'>
|
|
67
|
-
<img src='{{featuredImage.url}}'
|
|
68
|
+
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover rounded'{{#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}}{{else}} width='500' height='200'{{/if}} loading='lazy' />
|
|
68
69
|
</a>
|
|
69
70
|
<div class='flex items-center text-slate-500 dark:text-slate-400 text-sm mb-2'>
|
|
70
71
|
<span class='uppercase font-bold'>{{#with (lookup categories 0)}}{{name}}{{/with}}</span>
|
|
@@ -94,6 +95,7 @@
|
|
|
94
95
|
url=url
|
|
95
96
|
title=title
|
|
96
97
|
image=featuredImage.url
|
|
98
|
+
imageSource=featuredImage
|
|
97
99
|
alt=featuredImage.alt
|
|
98
100
|
readTime=(formatDate updatedAt)
|
|
99
101
|
showExcerpt=false
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
{{#with homepageSlots.mustRead.lead}}
|
|
9
9
|
<article class='grid grid-cols-1 md:grid-cols-2 gap-6 items-start'>
|
|
10
10
|
<a href='{{url}}' class='block aspect-video overflow-hidden bg-slate-100'>
|
|
11
|
-
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover transition-transform duration-500 hover:scale-105' />
|
|
11
|
+
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover transition-transform duration-500 hover:scale-105'{{#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: 768px) 50vw, 100vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} loading='lazy' />
|
|
12
12
|
</a>
|
|
13
13
|
<div class='space-y-3'>
|
|
14
14
|
<div class='flex items-center text-xs font-bold uppercase tracking-wider text-[#8f0d00]'>
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<div class='col-span-1'>
|
|
29
29
|
<article class='group'>
|
|
30
30
|
<a href='{{url}}' class='block mb-4 overflow-hidden aspect-[3/2] bg-slate-100'>
|
|
31
|
-
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover transition-transform duration-500 group-hover:scale-105' />
|
|
31
|
+
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover transition-transform duration-500 group-hover:scale-105'{{#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: 768px) 25vw, 50vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} loading='lazy' />
|
|
32
32
|
</a>
|
|
33
33
|
<div class='space-y-2'>
|
|
34
34
|
<span class='text-xs font-bold text-[#8f0d00] uppercase tracking-wider'>{{#with (lookup categories 0)}}{{name}}{{/with}}</span>
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
<div class='col-span-1'>
|
|
45
45
|
<article class='group'>
|
|
46
46
|
<a href='{{url}}' class='block mb-4 overflow-hidden aspect-[3/2] bg-slate-100'>
|
|
47
|
-
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover transition-transform duration-500 group-hover:scale-105' />
|
|
47
|
+
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover transition-transform duration-500 group-hover:scale-105'{{#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: 768px) 25vw, 50vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} loading='lazy' />
|
|
48
48
|
</a>
|
|
49
49
|
<div class='space-y-2'>
|
|
50
50
|
<span class='text-xs font-bold text-[#004d99] uppercase tracking-wider'>{{#with (lookup categories 0)}}{{name}}{{/with}}</span>
|
|
@@ -4,12 +4,7 @@
|
|
|
4
4
|
{{#if featuredImage.url}}
|
|
5
5
|
<section class='relative w-full overflow-hidden'>
|
|
6
6
|
<div class='hidden lg:block absolute inset-0 pointer-events-none' aria-hidden='true'>
|
|
7
|
-
<img
|
|
8
|
-
src='{{featuredImage.url}}'
|
|
9
|
-
alt=''
|
|
10
|
-
class='w-full h-full object-cover scale-125 opacity-90'
|
|
11
|
-
style='filter: blur(16px);'
|
|
12
|
-
/>
|
|
7
|
+
<img src='{{featuredImage.url}}' alt='' class='w-full h-full object-cover scale-125 opacity-90' style='filter: blur(16px);'{{#if featuredImage.variants}} srcset='{{#each featuredImage.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if featuredImage.width}}, {{featuredImage.url}} {{featuredImage.width}}w{{/if}}' sizes='100vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} loading='lazy' />
|
|
13
8
|
</div>
|
|
14
9
|
|
|
15
10
|
<div class='relative max-w-screen-xl mx-auto px-0 lg:px-6 xl:px-8'>
|
|
@@ -20,23 +15,11 @@
|
|
|
20
15
|
{{#if media}}
|
|
21
16
|
<div data-carousel='live-story-hero' class='relative'>
|
|
22
17
|
<div class='carousel-slide active opacity-100 transition-opacity duration-700'>
|
|
23
|
-
<img
|
|
24
|
-
src='{{featuredImage.url}}'
|
|
25
|
-
alt='{{featuredImage.alt}}'
|
|
26
|
-
class='w-full h-auto object-cover object-center'
|
|
27
|
-
style='max-height:520px;'
|
|
28
|
-
fetchpriority='high'
|
|
29
|
-
/>
|
|
18
|
+
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-auto object-cover object-center' style='max-height:520px;'{{#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) 1200px, 100vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} fetchpriority='high' />
|
|
30
19
|
</div>
|
|
31
20
|
{{#each media}}
|
|
32
21
|
<div class='carousel-slide hidden opacity-0 transition-opacity duration-700'>
|
|
33
|
-
<img
|
|
34
|
-
src='{{url}}'
|
|
35
|
-
alt='{{alt}}'
|
|
36
|
-
class='w-full h-auto object-cover object-center'
|
|
37
|
-
style='max-height:520px;'
|
|
38
|
-
loading='lazy'
|
|
39
|
-
/>
|
|
22
|
+
<img src='{{this.url}}' alt='{{alt}}' class='w-full h-auto object-cover object-center' style='max-height:520px;'{{#if this.variants}} srcset='{{#each this.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if this.width}}, {{this.url}} {{this.width}}w{{/if}}' sizes='(min-width: 1280px) 1200px, 100vw'{{/if}}{{#if this.width}}{{#if this.height}} width='{{this.width}}' height='{{this.height}}'{{/if}}{{/if}} loading='lazy' />
|
|
40
23
|
</div>
|
|
41
24
|
{{/each}}
|
|
42
25
|
<div class='absolute inset-x-0 bottom-4 z-20 flex items-center justify-center gap-2'>
|
|
@@ -54,13 +37,7 @@
|
|
|
54
37
|
</button>
|
|
55
38
|
</div>
|
|
56
39
|
{{else}}
|
|
57
|
-
<img
|
|
58
|
-
src='{{featuredImage.url}}'
|
|
59
|
-
alt='{{featuredImage.alt}}'
|
|
60
|
-
class='w-full h-auto object-cover object-center'
|
|
61
|
-
style='max-height:520px;'
|
|
62
|
-
fetchpriority='high'
|
|
63
|
-
/>
|
|
40
|
+
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-auto object-cover object-center' style='max-height:520px;'{{#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) 1200px, 100vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} fetchpriority='high' />
|
|
64
41
|
{{/if}}
|
|
65
42
|
</figure>
|
|
66
43
|
</div>
|
|
@@ -145,7 +122,7 @@
|
|
|
145
122
|
<div class='mt-4 grid grid-cols-1 sm:grid-cols-2 gap-3'>
|
|
146
123
|
{{#each media}}
|
|
147
124
|
<figure class='overflow-hidden rounded-lg border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-900'>
|
|
148
|
-
<img src='{{url}}' alt='{{alt}}' class='w-full h-auto object-cover' loading='lazy' />
|
|
125
|
+
<img src='{{this.url}}' alt='{{alt}}' class='w-full h-auto object-cover'{{#if this.variants}} srcset='{{#each this.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if this.width}}, {{this.url}} {{this.width}}w{{/if}}' sizes='(min-width: 1024px) 66vw, 100vw'{{/if}}{{#if this.width}}{{#if this.height}} width='{{this.width}}' height='{{this.height}}'{{/if}}{{/if}} loading='lazy' />
|
|
149
126
|
{{#if caption}}
|
|
150
127
|
<figcaption class='px-3 py-2 text-xs text-slate-500 dark:text-slate-400'>
|
|
151
128
|
{{caption}}
|
|
@@ -22,11 +22,15 @@
|
|
|
22
22
|
{{#unless (eq showImage false)}}
|
|
23
23
|
{{#if image}}
|
|
24
24
|
<a href='{{url}}' class='{{#if imageSize}}{{imageSize}}{{else}}w-32 h-24{{/if}} flex-shrink-0 block'>
|
|
25
|
-
|
|
25
|
+
{{#if imageSource}}
|
|
26
|
+
<img src='{{imageSource.url}}' alt='{{alt}}' class='w-full h-full object-cover rounded{{#if imageClasses}} {{imageClasses}}{{/if}}'{{#if imageSource.variants}} srcset='{{#each imageSource.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if imageSource.width}}, {{imageSource.url}} {{imageSource.width}}w{{/if}}' sizes='128px'{{/if}}{{#if imageSource.width}}{{#if imageSource.height}} width='{{imageSource.width}}' height='{{imageSource.height}}'{{/if}}{{/if}} loading='lazy' />
|
|
27
|
+
{{else}}
|
|
28
|
+
<img src='{{image}}' alt='{{alt}}' class='w-full h-full object-cover rounded {{#if imageClasses}}{{imageClasses}}{{/if}}' loading='lazy' />
|
|
29
|
+
{{/if}}
|
|
26
30
|
</a>
|
|
27
31
|
{{else if featuredImage.url}}
|
|
28
32
|
<a href='{{url}}' class='{{#if imageSize}}{{imageSize}}{{else}}w-32 h-24{{/if}} flex-shrink-0 block'>
|
|
29
|
-
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover rounded
|
|
33
|
+
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover rounded{{#if imageClasses}} {{imageClasses}}{{/if}}'{{#if featuredImage.variants}} srcset='{{#each featuredImage.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if featuredImage.width}}, {{featuredImage.url}} {{featuredImage.width}}w{{/if}}' sizes='128px'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} loading='lazy' />
|
|
30
34
|
</a>
|
|
31
35
|
{{/if}}
|
|
32
36
|
{{/unless}}
|
|
@@ -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>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
{{/if}}
|
|
14
14
|
{{else}}
|
|
15
15
|
{{#if featuredImage.url}}
|
|
16
|
-
<link rel='preload' as='image' href='{{featuredImage.url}}' fetchpriority='high' />
|
|
16
|
+
<link rel='preload' as='image' href='{{featuredImage.url}}'{{#if featuredImage.variants}} imagesrcset='{{#each featuredImage.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if featuredImage.width}}, {{featuredImage.url}} {{featuredImage.width}}w{{/if}}' imagesizes='100vw'{{/if}} fetchpriority='high' />
|
|
17
17
|
{{/if}}
|
|
18
18
|
{{/if}}
|
|
19
19
|
<meta name='description' content='{{#if seo.metaDescription}}{{seo.metaDescription}}{{else}}{{excerpt}}{{/if}}' />
|