@gaulatti/giorgia 0.1.91 → 0.1.95
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/renderer.core.js
CHANGED
|
@@ -7,11 +7,7 @@ const layoutCache = new Map();
|
|
|
7
7
|
let runtimeStyles = '';
|
|
8
8
|
const removedBlockTypes = new Set(['truthSocial', 'truthsocial', 'truth-social', 'truth_social']);
|
|
9
9
|
const defaultSocialImageUrl = 'https://cdn.modoitaliano.fm/assets/default-og.jpg';
|
|
10
|
-
const
|
|
11
|
-
en: 'ModoItaliano - Breaking News & Current Events',
|
|
12
|
-
es: 'ModoItaliano - Música italiana, noticias y lanzamientos',
|
|
13
|
-
it: 'ModoItaliano - Ultime notizie e attualità'
|
|
14
|
-
};
|
|
10
|
+
const homepageTitle = 'ModoItaliano - Música italiana, noticias y lanzamientos';
|
|
15
11
|
function normalizePathInput(value) {
|
|
16
12
|
if (typeof value !== 'string')
|
|
17
13
|
return '';
|
|
@@ -258,8 +254,7 @@ function registerHelpers() {
|
|
|
258
254
|
return 'ModoItaliano';
|
|
259
255
|
const page = doc;
|
|
260
256
|
if (page.layout === 'homepage') {
|
|
261
|
-
|
|
262
|
-
return siteTitlesByLanguage[language];
|
|
257
|
+
return homepageTitle;
|
|
263
258
|
}
|
|
264
259
|
if (page.layout === 'category-page') {
|
|
265
260
|
const categoryName = page.categories?.[0]?.name?.trim();
|
package/package.json
CHANGED
|
@@ -26,7 +26,9 @@
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.radio-weather-bar {
|
|
29
|
-
background: linear-gradient(90deg, rgba(10, 18, 52, 0.
|
|
29
|
+
background: linear-gradient(90deg, rgba(10, 18, 52, 0.78), rgba(49, 45, 46, 0.4));
|
|
30
|
+
-webkit-backdrop-filter: blur(7px);
|
|
31
|
+
backdrop-filter: blur(7px);
|
|
30
32
|
border-top: 2px solid #ed0076;
|
|
31
33
|
box-shadow: inset 0 -1px rgba(255, 255, 255, 0.12);
|
|
32
34
|
color: #fff;
|
|
@@ -106,9 +108,17 @@
|
|
|
106
108
|
to { opacity: 1; transform: translateY(0); }
|
|
107
109
|
}
|
|
108
110
|
|
|
111
|
+
.radio-now-playing-swap { animation: radio-now-playing-swap 420ms ease-out; }
|
|
112
|
+
|
|
113
|
+
@keyframes radio-now-playing-swap {
|
|
114
|
+
from { opacity: 0; transform: translateY(8px) scale(0.985); }
|
|
115
|
+
to { opacity: 1; transform: translateY(0) scale(1); }
|
|
116
|
+
}
|
|
117
|
+
|
|
109
118
|
@media (prefers-reduced-motion: reduce) {
|
|
110
119
|
[data-radio-slide].is-active { animation: none; transform: scale(1.05); }
|
|
111
120
|
.radio-weather-swap { animation: none; }
|
|
121
|
+
.radio-now-playing-swap { animation: none; }
|
|
112
122
|
}
|
|
113
123
|
|
|
114
124
|
@media (max-width: 639px) {
|
|
@@ -185,6 +195,7 @@
|
|
|
185
195
|
{{#each (slice navigation.categories 0 6)}}
|
|
186
196
|
<a href='/{{slug}}' class='whitespace-nowrap transition hover:text-white/65 focus:outline-none focus:underline'>{{name}}</a>
|
|
187
197
|
{{/each}}
|
|
198
|
+
<a href='/quienes-somos' class='whitespace-nowrap transition hover:text-white/65 focus:outline-none focus:underline'>Quienes somos</a>
|
|
188
199
|
</nav>
|
|
189
200
|
|
|
190
201
|
<div id='radio-menu' class='pointer-events-none absolute inset-x-9 top-25.75 z-[70] origin-top scale-y-95 rounded-sm bg-[#b00058]/95 p-7 opacity-0 shadow-2xl backdrop-blur-md transition duration-200' hidden>
|
|
@@ -199,6 +210,7 @@
|
|
|
199
210
|
{{#each navigation.categories}}
|
|
200
211
|
<a href='/{{slug}}' class='text-sm font-bold transition hover:text-white/65'>{{name}}</a>
|
|
201
212
|
{{/each}}
|
|
213
|
+
<a href='/quienes-somos' class='text-sm font-bold transition hover:text-white/65'>Quienes somos</a>
|
|
202
214
|
</nav>
|
|
203
215
|
</div>
|
|
204
216
|
{{/unless}}
|
|
@@ -218,7 +230,7 @@
|
|
|
218
230
|
</div>
|
|
219
231
|
<img data-now-playing-artwork alt='' class='hidden h-full w-full object-cover' />
|
|
220
232
|
<div class='absolute inset-x-0 bottom-0 h-[42%] bg-linear-to-t from-black/80 to-transparent'></div>
|
|
221
|
-
<div class='absolute bottom-3.75 left-3.75 right-16.25'>
|
|
233
|
+
<div data-now-playing-copy class='absolute bottom-3.75 left-3.75 right-16.25'>
|
|
222
234
|
<p class='flex items-center gap-2 text-[10px] font-bold uppercase tracking-wide text-white/80'><span class='h-2 w-2 rounded-full bg-cyan-300'></span><span data-now-playing-status>En directo</span></p>
|
|
223
235
|
<h2 data-now-playing-title class='radio-display mt-1 line-clamp-1 text-2xl font-semibold uppercase leading-none tracking-[0.02em] text-white'>ModoItaliano</h2>
|
|
224
236
|
<p data-now-playing-artist class='radio-display mt-1 line-clamp-1 text-xl font-medium uppercase leading-none tracking-[0.02em] text-white/85'>Radio en vivo</p>
|
|
@@ -365,13 +365,15 @@
|
|
|
365
365
|
var status = root.querySelector('[data-now-playing-status]');
|
|
366
366
|
var title = root.querySelector('[data-now-playing-title]');
|
|
367
367
|
var artist = root.querySelector('[data-now-playing-artist]');
|
|
368
|
-
|
|
368
|
+
var copy = root.querySelector('[data-now-playing-copy]');
|
|
369
|
+
if (!endpoint || !(artwork instanceof HTMLImageElement) || !(brand instanceof HTMLElement) || !(status instanceof HTMLElement) || !(title instanceof HTMLElement) || !(artist instanceof HTMLElement) || !(copy instanceof HTMLElement)) return;
|
|
369
370
|
|
|
370
371
|
var fallback = {
|
|
371
372
|
title: (title.textContent || '').trim() || 'ModoItaliano',
|
|
372
373
|
artist: (artist.textContent || '').trim() || 'Radio en vivo',
|
|
373
374
|
isPlaceholder: true
|
|
374
375
|
};
|
|
376
|
+
var lastSignature = JSON.stringify([fallback.title, fallback.artist, '', true]);
|
|
375
377
|
|
|
376
378
|
function setText(element, value, fallbackValue) {
|
|
377
379
|
element.textContent = typeof value === 'string' && value.trim() ? value.trim() : fallbackValue;
|
|
@@ -391,11 +393,22 @@
|
|
|
391
393
|
brand.classList.add('hidden');
|
|
392
394
|
}
|
|
393
395
|
|
|
396
|
+
function animateUpdate() {
|
|
397
|
+
artwork.classList.remove('radio-now-playing-swap');
|
|
398
|
+
brand.classList.remove('radio-now-playing-swap');
|
|
399
|
+
copy.classList.remove('radio-now-playing-swap');
|
|
400
|
+
void root.offsetWidth;
|
|
401
|
+
(brand.classList.contains('hidden') ? artwork : brand).classList.add('radio-now-playing-swap');
|
|
402
|
+
copy.classList.add('radio-now-playing-swap');
|
|
403
|
+
}
|
|
404
|
+
|
|
394
405
|
function applyNowPlaying(item) {
|
|
395
406
|
var displayTitle = typeof item.title === 'string' && item.title.trim() ? item.title.trim() : fallback.title;
|
|
396
407
|
var displayArtist = typeof item.artist === 'string' && item.artist.trim() ? item.artist.trim() : fallback.artist;
|
|
397
408
|
var artworkUrl = typeof item.artworkUrl === 'string' ? item.artworkUrl.trim() : '';
|
|
398
409
|
var isPlaceholder = item.isPlaceholder === true;
|
|
410
|
+
var nextSignature = JSON.stringify([displayTitle, displayArtist, artworkUrl, isPlaceholder]);
|
|
411
|
+
var changed = nextSignature !== lastSignature;
|
|
399
412
|
|
|
400
413
|
setText(title, displayTitle, fallback.title);
|
|
401
414
|
setText(artist, displayArtist, fallback.artist);
|
|
@@ -407,6 +420,9 @@
|
|
|
407
420
|
showBrand();
|
|
408
421
|
}
|
|
409
422
|
|
|
423
|
+
if (changed) animateUpdate();
|
|
424
|
+
lastSignature = nextSignature;
|
|
425
|
+
|
|
410
426
|
window.__brokawNowPlaying = item;
|
|
411
427
|
document.dispatchEvent(new CustomEvent('brokaw:now-playing', { detail: item }));
|
|
412
428
|
}
|
|
@@ -438,7 +454,7 @@
|
|
|
438
454
|
|
|
439
455
|
root.dataset.nowPlayingBound = 'true';
|
|
440
456
|
fetchNowPlaying();
|
|
441
|
-
window.setInterval(fetchNowPlaying,
|
|
457
|
+
window.setInterval(fetchNowPlaying, 5000);
|
|
442
458
|
}
|
|
443
459
|
|
|
444
460
|
function initAllNowPlaying() {
|