@gaulatti/giorgia 0.1.78 → 0.1.80
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/components/live-program/LiveProgram.js +3 -3
- package/dist/components/live-program/components/WorldClocks.js +1 -1
- package/dist/components/live-program/components/slides/LiveEventSlide.js +1 -1
- package/dist/components/live-program/events.js +1 -1
- package/dist/components/live-program/i18n.js +2 -2
- package/dist/components/live-program/segments/ArticlesSegment.js +18 -18
- package/dist/components/live-program/segments/EarthquakeSegment.js +3 -3
- package/dist/components/live-program/segments/LiveEventSegment.js +1 -1
- package/dist/components/live-program/segments/MarketsSegment.js +1 -1
- package/dist/components/live-program/segments/WeatherSegment.js +1 -1
- package/dist/components/live-program/segments/fetchLiveEvents.js +4 -4
- package/dist/live-program-page/live-program.css +1 -1
- package/dist/live-program-page/live-program.js +3 -3
- package/dist/outlet-config.d.ts +8 -10
- package/dist/outlet-config.js +8 -10
- package/dist/renderer.core.js +21 -15
- package/package.json +1 -1
- package/src/styles/compiled.css +1 -1
- package/src/templates/layouts/link-in-bio.hbs +2 -2
- package/src/templates/partials/blocks/instagram.hbs +1 -1
- package/src/templates/partials/blocks/live-update.hbs +1 -1
- package/src/templates/partials/blocks/spotify.hbs +1 -1
- package/src/templates/partials/blocks/tiktok.hbs +2 -2
- package/src/templates/partials/blocks/x.hbs +3 -3
- package/src/templates/partials/blocks/youtube.hbs +1 -1
- package/src/templates/partials/components/article-main.hbs +10 -10
- package/src/templates/partials/components/breaking-news/live-updates-column.hbs +2 -2
- package/src/templates/partials/components/breaking-news.hbs +2 -2
- package/src/templates/partials/components/coming-soon/main.hbs +0 -4
- package/src/templates/partials/components/editorial-hero.hbs +7 -7
- package/src/templates/partials/components/home/landing.hbs +1 -1
- package/src/templates/partials/components/home/more-stories.hbs +1 -1
- package/src/templates/partials/components/home/must-read.hbs +1 -1
- package/src/templates/partials/components/live-story/main.hbs +9 -9
- package/src/templates/partials/components/media/main.hbs +16 -16
- package/src/templates/partials/components/not-found/main.hbs +5 -5
- package/src/templates/partials/components/search/main.hbs +18 -18
- package/src/templates/partials/components/spotlight-hero.hbs +4 -4
- package/src/templates/partials/components/ui/breadcrumb.hbs +1 -1
- package/src/templates/partials/components/ui/loading-spinner.hbs +1 -1
- package/src/templates/partials/components/ui/pagination.hbs +7 -7
- package/src/templates/partials/footers/footer-full.hbs +4 -4
- package/src/templates/partials/headers/header-main.hbs +3 -3
- package/src/templates/partials/shell/doc-end.hbs +1 -1
- package/src/templates/partials/shell/doc-start-404.hbs +2 -2
|
@@ -10,7 +10,7 @@ import { CallsignSlide } from './components/slides/CallsignSlide.js';
|
|
|
10
10
|
import { slideStyles } from './components/slides/slideStyles.js';
|
|
11
11
|
import { fetchEvents, getCachedEvents, hasEventChanges } from './events.js';
|
|
12
12
|
import { createArticlesSegment, createEarthquakeSegment, createLiveEventSegment, createMarketsSegment, createWeatherSegment, fetchArticles, fetchEarthquakes, fetchLiveEvent, fetchMarketData, fetchWeatherData, usePlaylistEngine } from './segments/index.js';
|
|
13
|
-
const DEFAULT_LANGUAGE_ROTATION = ['
|
|
13
|
+
const DEFAULT_LANGUAGE_ROTATION = ['es'];
|
|
14
14
|
const DEFAULT_CALLSIGN_PRELAUNCH_UNTIL_NYC = '2026-01-02T21:30:00';
|
|
15
15
|
const MODOITALIANO_COMPONENT_TYPE_CONTENT = 'modoitaliano-content';
|
|
16
16
|
const MODOITALIANO_COMPONENT_TYPE_MARQUEE = 'modoitaliano-marquee';
|
|
@@ -100,7 +100,7 @@ function normalizeLanguageRotation(value) {
|
|
|
100
100
|
if (!Array.isArray(value)) {
|
|
101
101
|
return [...DEFAULT_LANGUAGE_ROTATION];
|
|
102
102
|
}
|
|
103
|
-
const allowed = new Set(['
|
|
103
|
+
const allowed = new Set(['es']);
|
|
104
104
|
const filtered = value.filter((item) => typeof item === 'string' && allowed.has(item));
|
|
105
105
|
return filtered.length > 0 ? filtered : [...DEFAULT_LANGUAGE_ROTATION];
|
|
106
106
|
}
|
|
@@ -269,7 +269,7 @@ export default function LiveProgram({ embedded = false, sceneMetadata, activeCom
|
|
|
269
269
|
const config = useMemo(() => extractConfigFromMetadata(effectiveSceneMetadata), [effectiveSceneMetadata]);
|
|
270
270
|
const layerAvailability = useMemo(() => resolveModoItalianoLayerAvailability(activeComponents), [activeComponents]);
|
|
271
271
|
const languageRotation = config.languageRotation;
|
|
272
|
-
const currentLanguage = languageRotation[languageIndex] ?? languageRotation[0] ?? '
|
|
272
|
+
const currentLanguage = languageRotation[languageIndex] ?? languageRotation[0] ?? 'es';
|
|
273
273
|
const resolvedApiBaseUrl = apiBaseUrl?.replace(/\/+$/, '') ||
|
|
274
274
|
(() => {
|
|
275
275
|
if (typeof window === 'undefined')
|
|
@@ -38,7 +38,7 @@ function shuffleArray(array) {
|
|
|
38
38
|
}
|
|
39
39
|
return shuffled;
|
|
40
40
|
}
|
|
41
|
-
export function WorldClocks({ currentTime, timeOverride = null, language = '
|
|
41
|
+
export function WorldClocks({ currentTime, timeOverride = null, language = 'es', cities, rotateIntervalMs = 7000, transitionDurationMs = 300, shuffleCities = true, widthPx = 200 }) {
|
|
42
42
|
const activeCities = cities && cities.length > 0 ? cities : DEFAULT_WORLD_CLOCK_CITIES;
|
|
43
43
|
const [time, setTime] = useState(currentTime || new Date());
|
|
44
44
|
const [cityPool, setCityPool] = useState(() => (shuffleCities ? shuffleArray(activeCities) : [...activeCities]));
|
|
@@ -79,7 +79,7 @@ export function LiveEventSlide({ event, progress, language }) {
|
|
|
79
79
|
if (isSports) {
|
|
80
80
|
return (_jsxs("div", { className: 'absolute inset-0', children: [_jsx("div", { className: 'absolute inset-0', children: _jsx("img", { src: event.image, alt: '', crossOrigin: 'anonymous', onLoad: handleImageLoad, className: 'w-full h-full object-cover blur-xl scale-105' }, event.image) }), _jsx("div", { className: 'absolute inset-0 opacity-75 mix-blend-multiply transition-all duration-1000', style: { background: `linear-gradient(to bottom right, ${dominantColor}, #000000)` } }), _jsx("div", { className: 'absolute inset-0 bg-[radial-gradient(circle_at_30%_30%,rgba(255,255,255,0.1),transparent_60%)]' }), _jsxs("div", { className: 'relative z-10 grid grid-cols-12 h-full', children: [_jsx("div", { className: 'col-span-5 flex flex-col justify-center p-16 relative bg-black/35 backdrop-blur-2xl', children: _jsxs("div", { className: 'animate-slide-up flex flex-col items-start', children: [_jsx("span", { className: "inline-flex items-center px-4 py-1.5 bg-[#cc0000] text-white text-xl font-bold tracking-[0.08em] uppercase font-['Barlow_Condensed'] mb-4", children: "LIVE" }), _jsx("span", { className: "text-white/80 text-2xl font-semibold uppercase tracking-wider mb-2 font-['Barlow_Condensed']", children: event.category }), _jsx("div", { className: 'w-16 h-1.5 bg-[#b21100] mb-6' }), _jsx("h1", { className: "text-4xl font-bold leading-tight mb-4 tracking-tight line-clamp-5 font-['Barlow_Condensed'] [text-wrap:balance] text-white", children: event.title }), event.excerpt && (_jsx("p", { className: "text-2xl font-light leading-relaxed opacity-80 line-clamp-3 font-['Barlow'] text-white mb-6", children: event.excerpt })), _jsx(LatestUpdates, { updates: event.updates, language: language })] }) }), _jsx("div", { className: 'col-span-7 relative h-full flex items-center justify-center p-12 pb-32', children: _jsxs("div", { className: 'relative w-full max-w-lg flex flex-col gap-4', children: [_jsxs("div", { className: 'relative aspect-video shadow-2xl overflow-hidden border border-white/10', children: [_jsx("div", { className: 'absolute top-0 left-0 h-1 bg-white/30 w-full z-20', children: _jsx("div", { className: 'h-full bg-white transition-all duration-100 ease-linear', style: { width: `${progress}%` } }) }), _jsx("img", { src: event.image, alt: event.alt, className: 'w-full h-full object-cover', style: { animation: 'kenburns 20s infinite alternate' }, crossOrigin: 'anonymous' }, event.image)] }), sofascoreWidgetUrl && (_jsx("div", { className: 'w-full overflow-hidden border border-white/10 bg-black/40', children: _jsx("iframe", { width: '100%', height: '180', src: sofascoreWidgetUrl, title: 'SofaScore Attack Momentum', frameBorder: '0', scrolling: 'no', loading: 'lazy', referrerPolicy: 'no-referrer-when-downgrade', style: { border: 0 } }) })), _jsx("div", { className: 'absolute bottom-4 right-4 z-30', children: _jsx("div", { className: 'p-2 rounded-sm backdrop-blur-md shadow-2xl', style: { backgroundColor: 'rgba(0,0,0,0.4)' }, children: _jsx("img", { src: qrCodeUrl, alt: 'QR code', className: 'block w-24 h-24' }) }) })] }) })] })] }));
|
|
81
81
|
}
|
|
82
|
-
return (_jsxs("div", { className: 'absolute inset-0', children: [_jsx("div", { className: 'absolute inset-0', children: _jsx("img", { src: event.image, alt: '', crossOrigin: 'anonymous', onLoad: handleImageLoad, className: 'w-full h-full object-cover blur-xl scale-105' }, event.image) }), _jsx("div", { className: 'absolute inset-0 opacity-80 mix-blend-multiply transition-all duration-1000', style: { background: `linear-gradient(to bottom right, ${dominantColor}, #000000)` } }), _jsx("div", { className: 'absolute inset-0 bg-[radial-gradient(circle_at_30%_30%,rgba(255,255,255,0.1),transparent_60%)]' }), _jsxs("div", { className: 'relative z-10 grid grid-cols-12 h-full', children: [_jsx("div", { className: 'col-span-5 flex flex-col justify-center p-16 relative bg-black/35 backdrop-blur-2xl', children: _jsxs("div", { className: 'animate-slide-up flex flex-col items-start', children: [_jsx("span", { className: "inline-flex items-center px-4 py-1.5 bg-[#cc0000] text-white text-xl font-bold tracking-[0.08em] uppercase font-['Barlow_Condensed'] mb-4", children: "
|
|
82
|
+
return (_jsxs("div", { className: 'absolute inset-0', children: [_jsx("div", { className: 'absolute inset-0', children: _jsx("img", { src: event.image, alt: '', crossOrigin: 'anonymous', onLoad: handleImageLoad, className: 'w-full h-full object-cover blur-xl scale-105' }, event.image) }), _jsx("div", { className: 'absolute inset-0 opacity-80 mix-blend-multiply transition-all duration-1000', style: { background: `linear-gradient(to bottom right, ${dominantColor}, #000000)` } }), _jsx("div", { className: 'absolute inset-0 bg-[radial-gradient(circle_at_30%_30%,rgba(255,255,255,0.1),transparent_60%)]' }), _jsxs("div", { className: 'relative z-10 grid grid-cols-12 h-full', children: [_jsx("div", { className: 'col-span-5 flex flex-col justify-center p-16 relative bg-black/35 backdrop-blur-2xl', children: _jsxs("div", { className: 'animate-slide-up flex flex-col items-start', children: [_jsx("span", { className: "inline-flex items-center px-4 py-1.5 bg-[#cc0000] text-white text-xl font-bold tracking-[0.08em] uppercase font-['Barlow_Condensed'] mb-4", children: "EN VIVO" }), _jsx("span", { className: "text-white/80 text-2xl font-semibold uppercase tracking-wider mb-2 font-['Barlow_Condensed']", children: event.category }), _jsx("div", { className: 'w-16 h-1.5 bg-[#b21100] mb-6' }), _jsx("h1", { className: "text-4xl font-bold leading-tight mb-4 tracking-tight line-clamp-5 font-['Barlow_Condensed'] [text-wrap:balance] text-white", children: event.title }), event.excerpt && (_jsx("p", { className: "text-2xl font-light leading-relaxed opacity-80 line-clamp-3 font-['Barlow'] text-white", children: event.excerpt }))] }) }), _jsxs("div", { className: 'col-span-7 relative h-full flex flex-col justify-center p-16 pl-12', children: [_jsxs("div", { className: 'flex items-start gap-4 mb-8', children: [_jsx("div", { className: 'bg-[#b21100] text-white px-4 py-2 shadow-lg', children: _jsx(SecondBellIcon, { size: 32 }) }), _jsx("h2", { className: "text-white/60 text-2xl font-semibold uppercase tracking-[0.12em] font-['Barlow_Condensed']", children: "ACTUALIZACIONES EN VIVO" })] }), _jsx(ScrollingTimeline, { updates: event.updates, language: language }), _jsx("div", { className: 'absolute bottom-8 right-8 z-30', children: _jsx("div", { className: 'p-2 rounded-sm backdrop-blur-md shadow-2xl', style: { backgroundColor: 'rgba(0,0,0,0.4)' }, children: _jsx("img", { src: qrCodeUrl, alt: 'QR code', className: 'block w-24 h-24' }) }) })] })] })] }));
|
|
83
83
|
}
|
|
84
84
|
function SecondBellIcon({ size }) {
|
|
85
85
|
return (_jsxs("svg", { width: size, height: size, viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: '2', strokeLinecap: 'round', strokeLinejoin: 'round', children: [_jsx("path", { d: 'M10.268 21a2 2 0 0 0 3.464 0' }), _jsx("path", { d: 'M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326' }), _jsx("path", { d: 'M4 2C2.8 3.7 2 5.7 2 8' }), _jsx("path", { d: 'M22 8a10 10 0 0 0-2-6' })] }));
|
|
@@ -291,7 +291,7 @@ export function t(key, language, replacements) {
|
|
|
291
291
|
console.warn(`Translation missing for key: ${key}`);
|
|
292
292
|
return key;
|
|
293
293
|
}
|
|
294
|
-
let text = translation[language] || translation.
|
|
294
|
+
let text = translation[language] || translation.es || key;
|
|
295
295
|
if (replacements) {
|
|
296
296
|
Object.entries(replacements).forEach(([placeholder, value]) => {
|
|
297
297
|
text = text.replace(`{${placeholder}}`, String(value));
|
|
@@ -299,7 +299,7 @@ export function t(key, language, replacements) {
|
|
|
299
299
|
}
|
|
300
300
|
return text;
|
|
301
301
|
}
|
|
302
|
-
export const LANGUAGE_ROTATION = ['
|
|
302
|
+
export const LANGUAGE_ROTATION = ['es'];
|
|
303
303
|
export function getNextLanguageIndex(currentIndex) {
|
|
304
304
|
return (currentIndex + 1) % LANGUAGE_ROTATION.length;
|
|
305
305
|
}
|
|
@@ -5,42 +5,42 @@ import { t } from '../i18n.js';
|
|
|
5
5
|
const MOCK_ARTICLES = [
|
|
6
6
|
{
|
|
7
7
|
id: '1',
|
|
8
|
-
headline: '
|
|
9
|
-
summary: '
|
|
8
|
+
headline: 'La cumbre climática mundial alcanza un acuerdo histórico',
|
|
9
|
+
summary: 'Los líderes mundiales acordaron nuevas y ambiciosas metas para reducir las emisiones de carbono, un paso importante en la lucha contra el cambio climático.',
|
|
10
10
|
imageUrl: 'https://picsum.photos/seed/news1/1920/1080',
|
|
11
|
-
category: '
|
|
11
|
+
category: 'Medio ambiente',
|
|
12
12
|
url: 'https://modoitaliano.fm/climate-summit-agreement'
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
id: '2',
|
|
16
|
-
headline: '
|
|
17
|
-
summary: '
|
|
16
|
+
headline: 'Anuncian un avance en la computación cuántica',
|
|
17
|
+
summary: 'Investigadores alcanzaron un hito en la computación cuántica que podría transformar el procesamiento de datos y las tecnologías de cifrado.',
|
|
18
18
|
imageUrl: 'https://picsum.photos/seed/news2/1920/1080',
|
|
19
|
-
category: '
|
|
19
|
+
category: 'Tecnología',
|
|
20
20
|
url: 'https://modoitaliano.fm/quantum-computing-breakthrough'
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
id: '3',
|
|
24
|
-
headline: '
|
|
25
|
-
summary: '
|
|
24
|
+
headline: 'Un nuevo hallazgo arqueológico reescribe la historia antigua',
|
|
25
|
+
summary: 'Arqueólogos desenterraron objetos que cuestionan lo que sabemos sobre las civilizaciones antiguas y sus capacidades tecnológicas.',
|
|
26
26
|
imageUrl: 'https://picsum.photos/seed/news3/1920/1080',
|
|
27
|
-
category: '
|
|
27
|
+
category: 'Ciencia',
|
|
28
28
|
url: 'https://modoitaliano.fm/archaeological-discovery'
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
id: '4',
|
|
32
|
-
headline: '
|
|
33
|
-
summary: 'NASA
|
|
32
|
+
headline: 'Extienden la misión de la Estación Espacial Internacional',
|
|
33
|
+
summary: 'La NASA y sus socios internacionales anunciaron una extensión de las operaciones de la EEI para continuar la investigación científica en órbita.',
|
|
34
34
|
imageUrl: 'https://picsum.photos/seed/news4/1920/1080',
|
|
35
|
-
category: '
|
|
35
|
+
category: 'Espacio',
|
|
36
36
|
url: 'https://modoitaliano.fm/iss-mission-extended'
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
id: '5',
|
|
40
|
-
headline: '
|
|
41
|
-
summary: '
|
|
40
|
+
headline: 'La energía renovable supera a los combustibles fósiles',
|
|
41
|
+
summary: 'Por primera vez, las fuentes renovables generaron más electricidad que los combustibles fósiles tradicionales a nivel mundial.',
|
|
42
42
|
imageUrl: 'https://picsum.photos/seed/news5/1920/1080',
|
|
43
|
-
category: '
|
|
43
|
+
category: 'Energía',
|
|
44
44
|
url: 'https://modoitaliano.fm/renewable-energy-milestone'
|
|
45
45
|
}
|
|
46
46
|
];
|
|
@@ -67,12 +67,12 @@ function buildArticlePath(article, language) {
|
|
|
67
67
|
const primaryCategorySlug = article.categories?.[0]?.slug?.trim();
|
|
68
68
|
return (explicitUrl ||
|
|
69
69
|
(primaryCategorySlug
|
|
70
|
-
? language === '
|
|
70
|
+
? language === 'es'
|
|
71
71
|
? `/${primaryCategorySlug}/${bareSlug.replace(/^\//, '')}`
|
|
72
72
|
: `/${language}/${primaryCategorySlug}/${bareSlug.replace(/^\//, '')}`
|
|
73
73
|
: normalizePath(bareSlug || article.canonicalUrl || '/')));
|
|
74
74
|
}
|
|
75
|
-
export async function fetchArticles(language = '
|
|
75
|
+
export async function fetchArticles(language = 'es') {
|
|
76
76
|
try {
|
|
77
77
|
const response = await fetch(`https://cdn.modoitaliano.fm/content/homepage-current-${language}.json?_=${Date.now()}`, {
|
|
78
78
|
cache: 'no-store'
|
|
@@ -137,7 +137,7 @@ function ArticlesSegmentRenderer({ items, itemIndex, progress, language }) {
|
|
|
137
137
|
const previousItem = items[displayedIndex % items.length];
|
|
138
138
|
return (_jsxs("div", { className: 'relative w-full h-full', children: [isTransitioning && previousItem && (_jsx("div", { className: 'absolute inset-0', children: _jsx(ArticleSlide, { newsItem: previousItem, progress: 100 }) })), _jsx("div", { className: `absolute inset-0 ${isTransitioning ? 'animate-slide-transition' : ''}`, children: _jsx(ArticleSlide, { newsItem: currentItem, progress: progress }) })] }));
|
|
139
139
|
}
|
|
140
|
-
export function createArticlesSegment(articles, onDataUpdate, language = '
|
|
140
|
+
export function createArticlesSegment(articles, onDataUpdate, language = 'es') {
|
|
141
141
|
return {
|
|
142
142
|
id: 'articles',
|
|
143
143
|
label: t('segment.articles', language),
|
|
@@ -4,7 +4,7 @@ import { AlertTriangle, Clock, Layers, Link, MapPin } from 'lucide-react';
|
|
|
4
4
|
import { FastAverageColor } from 'fast-average-color';
|
|
5
5
|
import { MODOITALIANO_ASSETS } from '../assets.js';
|
|
6
6
|
import { t } from '../i18n.js';
|
|
7
|
-
function formatTimeAgo(timestamp, language = '
|
|
7
|
+
function formatTimeAgo(timestamp, language = 'es') {
|
|
8
8
|
const now = Date.now();
|
|
9
9
|
const diffMs = now - timestamp;
|
|
10
10
|
const diffHours = Math.floor(diffMs / (1000 * 60 * 60));
|
|
@@ -21,7 +21,7 @@ function formatTimeAgo(timestamp, language = 'en') {
|
|
|
21
21
|
}
|
|
22
22
|
return t('earthquakes.timeAgo.justNow', language);
|
|
23
23
|
}
|
|
24
|
-
export async function fetchEarthquakes(language = '
|
|
24
|
+
export async function fetchEarthquakes(language = 'es') {
|
|
25
25
|
try {
|
|
26
26
|
const response = await fetch(`https://api.monitor.gaulatti.com/earthquakes?_=${Date.now()}`);
|
|
27
27
|
if (!response.ok) {
|
|
@@ -113,7 +113,7 @@ function EarthquakeSlide({ earthquakes, progress, language }) {
|
|
|
113
113
|
function EarthquakeLoadingSlide({ language }) {
|
|
114
114
|
return (_jsxs("div", { className: 'absolute inset-0', children: [_jsx("div", { className: 'absolute inset-0 opacity-75', style: { background: 'linear-gradient(to bottom right, #7c2d12, #000000)' } }), _jsx("div", { className: 'relative z-10 h-full flex items-center justify-center', children: _jsx("div", { className: 'text-4xl font-light animate-pulse', children: t('earthquakes.loading', language) }) })] }));
|
|
115
115
|
}
|
|
116
|
-
export function createEarthquakeSegment(earthquakes, onDataUpdate, language = '
|
|
116
|
+
export function createEarthquakeSegment(earthquakes, onDataUpdate, language = 'es') {
|
|
117
117
|
return {
|
|
118
118
|
id: 'earthquakes',
|
|
119
119
|
label: t('segment.earthquakes', language),
|
|
@@ -8,7 +8,7 @@ function LiveEventSegmentRenderer({ event, progress, language }) {
|
|
|
8
8
|
}
|
|
9
9
|
return (_jsx("div", { className: 'relative w-full h-full', children: _jsx(LiveEventSlide, { event: event, progress: progress, language: language }, event.title) }));
|
|
10
10
|
}
|
|
11
|
-
export function createLiveEventSegment(liveEvent, onDataUpdate, language = '
|
|
11
|
+
export function createLiveEventSegment(liveEvent, onDataUpdate, language = 'es') {
|
|
12
12
|
return {
|
|
13
13
|
id: 'live-event',
|
|
14
14
|
label: t('segment.liveEvent', language),
|
|
@@ -59,7 +59,7 @@ function MarketSlide({ progress, marketData, language }) {
|
|
|
59
59
|
return (_jsxs("div", { className: 'grid grid-cols-2 gap-x-12 items-center p-6 backdrop-blur-sm rounded-lg border border-white/5', style: { animationDelay: `${index * 0.05}s`, backgroundColor }, children: [_jsxs("div", { className: 'flex flex-col', children: [_jsx("span", { className: "text-4xl font-bold mb-1 font-['Barlow_Condensed']", children: stock.symbol }), _jsx("span", { className: 'text-2xl opacity-70', children: stock.name })] }), _jsxs("div", { className: 'flex flex-col items-end', children: [_jsxs("div", { className: "text-5xl font-bold mb-1 font-['Barlow_Condensed']", children: ["$", stock.price.toFixed(2)] }), _jsxs("div", { className: `flex items-center space-x-2 ${changeColor}`, children: [_jsx(Icon, { size: 24, strokeWidth: 2 }), _jsxs("span", { className: 'text-3xl font-bold', children: [isPositive ? '+' : '', stock.change.toFixed(2)] }), _jsxs("span", { className: 'text-2xl opacity-80', children: ["(", isPositive ? '+' : '', stock.changePercent.toFixed(2), "%)"] })] })] })] }, stock.symbol));
|
|
60
60
|
}) }), _jsx("div", { className: 'mt-6 mb-24 text-xl opacity-60 animate-fade-in-delay', children: _jsx("p", { children: t('markets.lastUpdate', language, { time: getLastUpdateTime() }) }) }), _jsx("div", { className: 'absolute bottom-24 left-24 right-24 h-1 bg-white/30', children: _jsx("div", { className: 'h-full bg-white transition-all duration-100 ease-linear', style: { width: `${progress}%` } }) })] })] }));
|
|
61
61
|
}
|
|
62
|
-
export function createMarketsSegment(marketData, onDataUpdate, language = '
|
|
62
|
+
export function createMarketsSegment(marketData, onDataUpdate, language = 'es') {
|
|
63
63
|
return {
|
|
64
64
|
id: 'markets',
|
|
65
65
|
label: t('segment.markets', language),
|
|
@@ -93,7 +93,7 @@ function WeatherSlide({ weatherData, progress, unit, language }) {
|
|
|
93
93
|
function WeatherLoadingSlide({ language }) {
|
|
94
94
|
return (_jsxs("div", { className: 'absolute inset-0', children: [_jsx("div", { className: 'absolute inset-0 opacity-75', style: { background: 'linear-gradient(to bottom right, #1e40af, #000000)' } }), _jsx("div", { className: 'relative z-10 h-full flex items-center justify-center', children: _jsx("div", { className: 'text-4xl font-light animate-pulse', children: t('weather.loading', language) }) })] }));
|
|
95
95
|
}
|
|
96
|
-
export function createWeatherSegment(weatherData, onDataUpdate, language = '
|
|
96
|
+
export function createWeatherSegment(weatherData, onDataUpdate, language = 'es') {
|
|
97
97
|
return {
|
|
98
98
|
id: 'weather',
|
|
99
99
|
label: t('segment.weather', language),
|
|
@@ -12,7 +12,7 @@ function extractUpdatesFromAuburnaleEvent(updates) {
|
|
|
12
12
|
}
|
|
13
13
|
return {
|
|
14
14
|
timestamp: u.timestamp,
|
|
15
|
-
text: text || '
|
|
15
|
+
text: text || 'Actualización disponible',
|
|
16
16
|
};
|
|
17
17
|
});
|
|
18
18
|
}
|
|
@@ -30,7 +30,7 @@ async function fetchFromAuburnale(language) {
|
|
|
30
30
|
if (!event)
|
|
31
31
|
return null;
|
|
32
32
|
return {
|
|
33
|
-
category: event.categories?.[0]?.name || '
|
|
33
|
+
category: event.categories?.[0]?.name || 'EVENTO',
|
|
34
34
|
title: event.title,
|
|
35
35
|
excerpt: '',
|
|
36
36
|
image: event.featuredImage?.url || '',
|
|
@@ -45,7 +45,7 @@ async function fetchFromAuburnale(language) {
|
|
|
45
45
|
return null;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
export async function fetchLiveEvent(language = '
|
|
48
|
+
export async function fetchLiveEvent(language = 'es') {
|
|
49
49
|
try {
|
|
50
50
|
const response = await fetch(`https://cdn.modoitaliano.fm/content/homepage-current-${language}.json?_=${Date.now()}`, { cache: 'no-store' });
|
|
51
51
|
if (!response.ok) {
|
|
@@ -57,7 +57,7 @@ export async function fetchLiveEvent(language = 'en') {
|
|
|
57
57
|
return fetchFromAuburnale(language);
|
|
58
58
|
}
|
|
59
59
|
return {
|
|
60
|
-
category: main.category || '
|
|
60
|
+
category: main.category || 'EN VIVO',
|
|
61
61
|
title: main.title,
|
|
62
62
|
excerpt: main.excerpt,
|
|
63
63
|
image: main.image || '',
|