@fifthbell/brokaw 0.1.56 → 0.1.58
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/components/Marquee.js +2 -2
- package/dist/components/live-program/components/MarqueeCurtain.js +2 -2
- package/dist/components/live-program/components/WorldClocks.js +1 -1
- package/dist/components/live-program/components/slides/ArticleSlide.js +1 -1
- package/dist/components/live-program/components/slides/CallsignSlide.js +1 -1
- package/dist/components/live-program/components/slides/LiveEventSlide.js +6 -6
- package/dist/components/live-program/segments/EarthquakeSegment.js +4 -4
- package/dist/components/live-program/segments/LiveEventSegment.js +1 -1
- package/dist/components/live-program/segments/MarketsSegment.js +4 -4
- package/dist/components/live-program/segments/WeatherSegment.js +3 -3
- package/dist/instagram-image-template.d.ts +1 -0
- package/dist/instagram-image-template.js +11 -18
- package/dist/live-program-page/index.html +1 -1
- package/dist/live-program-page/live-program.css +1 -1
- package/dist/live-program-page/live-program.js +3 -3
- package/dist/renderer.browser.js +0 -2
- package/dist/renderer.d.ts +1 -1
- package/dist/renderer.js +1 -1
- package/package.json +1 -1
- package/src/partial-deps.json +1 -2
- package/src/styles/compiled.css +1 -1
- package/src/templates/layouts/404.hbs +1 -1
- package/src/templates/layouts/link-in-bio.hbs +3 -3
- package/src/templates/partials/blocks/heading.hbs +3 -3
- package/src/templates/partials/blocks/live-update.hbs +1 -1
- package/src/templates/partials/components/article-main.hbs +21 -21
- package/src/templates/partials/components/breaking-news/live-updates-column.hbs +1 -1
- package/src/templates/partials/components/breaking-news.hbs +1 -1
- package/src/templates/partials/components/category/header.hbs +1 -1
- package/src/templates/partials/components/category/main-grid.hbs +5 -5
- package/src/templates/partials/components/category/more-grid.hbs +3 -3
- package/src/templates/partials/components/editorial-hero.hbs +6 -6
- package/src/templates/partials/components/headline.hbs +1 -1
- package/src/templates/partials/components/home/landing.hbs +25 -25
- package/src/templates/partials/components/home/more-stories.hbs +2 -2
- package/src/templates/partials/components/home/must-read.hbs +8 -8
- package/src/templates/partials/components/live-story/main.hbs +3 -3
- package/src/templates/partials/components/media/main.hbs +1 -1
- package/src/templates/partials/components/not-found/main.hbs +1 -1
- package/src/templates/partials/components/search/main.hbs +3 -3
- package/src/templates/partials/components/snack.hbs +1 -1
- package/src/templates/partials/components/spotlight-hero.hbs +6 -6
- package/src/templates/partials/components/trending.hbs +6 -10
- package/src/templates/partials/headers/header-main.hbs +20 -19
- package/src/templates/templates/instagram-image.hbs +14 -3
- package/src/templates/partials/footers/footer-minimal.hbs +0 -5
|
@@ -72,8 +72,8 @@ export function Marquee({ events, onCycleComplete, minPostsCount = 4, minAverage
|
|
|
72
72
|
}, children: sortedEvents.map((event) => (_jsxs("div", { style: { display: 'flex', alignItems: 'center' }, children: [_jsx("span", { style: {
|
|
73
73
|
color: '#ffffff',
|
|
74
74
|
fontSize: '2rem',
|
|
75
|
-
fontWeight: '
|
|
76
|
-
fontFamily: 'Encode Sans, sans-serif'
|
|
75
|
+
fontWeight: '700',
|
|
76
|
+
fontFamily: 'var(--font-encode, "Encode Sans", sans-serif)'
|
|
77
77
|
}, children: event.title }), _jsx("div", { style: {
|
|
78
78
|
marginLeft: '2rem',
|
|
79
79
|
marginRight: '2rem',
|
|
@@ -24,7 +24,7 @@ export function MarqueeCurtain({ onComplete }) {
|
|
|
24
24
|
}, children: [_jsx(BellRing, { size: 24, strokeWidth: 2, color: '#ffffff' }), _jsxs("span", { style: {
|
|
25
25
|
color: '#ffffff',
|
|
26
26
|
fontSize: '1.5rem',
|
|
27
|
-
fontWeight: '
|
|
28
|
-
fontFamily: '
|
|
27
|
+
fontWeight: '700',
|
|
28
|
+
fontFamily: 'var(--font-encode, "Encode Sans", sans-serif)'
|
|
29
29
|
}, children: ["This is fifth", _jsx("span", { style: { fontWeight: '700' }, children: "bell" }), "."] }), _jsx(BellRing, { size: 24, strokeWidth: 2, color: '#ffffff' })] }));
|
|
30
30
|
}
|
|
@@ -97,5 +97,5 @@ export function WorldClocks({ currentTime, timeOverride = null, language = 'en',
|
|
|
97
97
|
});
|
|
98
98
|
};
|
|
99
99
|
const cityLabel = TRANSLATABLE_CITY_KEYS.has(currentCity.city) ? t(`city.${currentCity.city}`, language) : currentCity.city;
|
|
100
|
-
return (_jsxs("div", { className: 'flex flex-col gap-1.5 transition-opacity duration-300', style: { opacity: isAnimating ? 0 : 1, width: `${widthPx}px` }, children: [_jsx("div", { className: 'text-white font-bold text-6xl tracking-tight leading-none text-center',
|
|
100
|
+
return (_jsxs("div", { className: 'flex flex-col gap-1.5 transition-opacity duration-300', style: { opacity: isAnimating ? 0 : 1, width: `${widthPx}px` }, children: [_jsx("div", { className: 'text-white font-bold font-encode text-6xl tracking-tight leading-none text-center', children: formatTime(currentCity.timezone) }), _jsx("div", { className: 'text-white/50 text-2xl font-bold font-encode tracking-wider leading-none uppercase text-center', children: cityLabel })] }));
|
|
101
101
|
}
|
|
@@ -28,5 +28,5 @@ export function ArticleSlide({ newsItem, progress }) {
|
|
|
28
28
|
console.error('Error getting average color', error);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
return (_jsxs("div", { className: 'absolute inset-0', children: [_jsx("div", { className: 'absolute inset-0', children: _jsx("img", { src: imageUrl, alt: '', crossOrigin: 'anonymous', onLoad: handleImageLoad, className: 'w-full h-full object-cover blur-xl scale-105' }, imageUrl) }), _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-24 relative bg-black/35 backdrop-blur-2xl', children: _jsxs("div", { className: 'animate-slide-up flex flex-col items-start', children: [newsItem.category && (_jsx("span", { className:
|
|
31
|
+
return (_jsxs("div", { className: 'absolute inset-0', children: [_jsx("div", { className: 'absolute inset-0', children: _jsx("img", { src: imageUrl, alt: '', crossOrigin: 'anonymous', onLoad: handleImageLoad, className: 'w-full h-full object-cover blur-xl scale-105' }, imageUrl) }), _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-24 relative bg-black/35 backdrop-blur-2xl', children: _jsxs("div", { className: 'animate-slide-up flex flex-col items-start', children: [newsItem.category && (_jsx("span", { className: 'text-white text-3xl font-bold uppercase tracking-wider mb-8 font-encode inline-block px-4 py-2', style: { backgroundColor: dominantColor }, children: newsItem.category })), _jsx("div", { className: 'w-16 h-1.5 bg-[#b21100] mb-8' }), _jsx("h1", { className: 'text-5xl font-bold leading-tight mb-8 tracking-tight line-clamp-6 font-encode [text-wrap:balance]', children: newsItem.headline }), _jsx("p", { className: 'text-4xl font-light leading-relaxed opacity-90 line-clamp-6 font-secondary', children: newsItem.summary })] }, newsItem.id) }), _jsx("div", { className: 'col-span-7 relative h-full flex items-center justify-center p-16 pb-40', children: _jsxs("div", { className: 'relative w-full aspect-video shadow-2xl overflow-hidden border-4 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: imageUrl, alt: newsItem.headline, className: 'w-full h-full object-cover', style: { animation: 'kenburns 20s infinite alternate' } }, imageUrl), _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: 'Article QR code', className: 'block w-32 h-32' }) }) })] }) })] })] }));
|
|
32
32
|
}
|
|
@@ -45,5 +45,5 @@ export function CallsignSlide({ currentTime: initialTime }) {
|
|
|
45
45
|
setDominantColor('#b21100');
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
-
return (_jsxs("div", { className: 'absolute inset-0 animate-slide-transition', children: [_jsx("div", { className: 'absolute inset-0', children: _jsx("img", { src: backgroundImage, alt: '', crossOrigin: 'anonymous', onLoad: handleImageLoad, className: 'w-full h-full object-cover blur-xl scale-105' }, backgroundImage) }), _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 h-full flex flex-col items-center justify-center', children: [_jsx("div", { className: 'bg-[#b21100] text-white p-12 shadow-2xl mb-16 animate-scale-in', style: { opacity: fullOpacity, transition: 'opacity 0.5s' }, children: _jsx(BellRing, { size: 256, strokeWidth: 2 }) }), _jsx("div", { className: 'absolute top-4 left-4', style: { opacity: smallOpacity, transition: 'opacity 0.5s' }, children: _jsx("div", { className: 'bg-[#b21100] text-white p-6 shadow-lg scale-50', children: _jsx(BellRing, { size: 128, strokeWidth: 2 }) }) }), _jsx("div", { className: 'flex flex-col items-center', style: { opacity: centerOpacity, transition: 'opacity 0.5s' } }), _jsx("div", { className: "text-white text-6xl font-bold tracking-wider animate-fade-in-delay font-['JetBrains_Mono']", style: { opacity: showTime ? 1 : 0, transition: 'opacity 0.5s' }, children: formatNyTime(displayTime) }), _jsxs("div", { className: 'text-white text-3xl opacity-75 mt-4 animate-fade-in-delay', style: { opacity: showTime ? 1 : 0, transition: 'opacity 0.5s' }, children: ["This is fifth", _jsx("span", { className: 'font-bold', children: "bell" }), "."] })] })] }));
|
|
48
|
+
return (_jsxs("div", { className: 'absolute inset-0 animate-slide-transition', children: [_jsx("div", { className: 'absolute inset-0', children: _jsx("img", { src: backgroundImage, alt: '', crossOrigin: 'anonymous', onLoad: handleImageLoad, className: 'w-full h-full object-cover blur-xl scale-105' }, backgroundImage) }), _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 h-full flex flex-col items-center justify-center', children: [_jsx("div", { className: 'bg-[#b21100] text-white p-12 shadow-2xl mb-16 animate-scale-in', style: { opacity: fullOpacity, transition: 'opacity 0.5s' }, children: _jsx(BellRing, { size: 256, strokeWidth: 2 }) }), _jsx("div", { className: 'absolute top-4 left-4', style: { opacity: smallOpacity, transition: 'opacity 0.5s' }, children: _jsx("div", { className: 'bg-[#b21100] text-white p-6 shadow-lg scale-50', children: _jsx(BellRing, { size: 128, strokeWidth: 2 }) }) }), _jsx("div", { className: 'flex flex-col items-center', style: { opacity: centerOpacity, transition: 'opacity 0.5s' } }), _jsx("div", { className: "text-white text-6xl font-bold tracking-wider animate-fade-in-delay font-['JetBrains_Mono']", style: { opacity: showTime ? 1 : 0, transition: 'opacity 0.5s' }, children: formatNyTime(displayTime) }), _jsxs("div", { className: 'text-white text-3xl font-bold font-encode opacity-75 mt-4 animate-fade-in-delay', style: { opacity: showTime ? 1 : 0, transition: 'opacity 0.5s' }, children: ["This is fifth", _jsx("span", { className: 'font-bold', children: "bell" }), "."] })] })] }));
|
|
49
49
|
}
|
|
@@ -25,9 +25,9 @@ function formatUpdateTime(update) {
|
|
|
25
25
|
function LatestUpdates({ updates, language }) {
|
|
26
26
|
const latest = useMemo(() => updates.slice(0, 5), [updates]);
|
|
27
27
|
if (latest.length === 0) {
|
|
28
|
-
return (_jsx("p", { className:
|
|
28
|
+
return (_jsx("p", { className: 'text-white/50 font-secondary text-xl', children: t('liveEvent.noUpdates', language) }));
|
|
29
29
|
}
|
|
30
|
-
return (_jsx("div", { className: 'flex flex-col gap-3', children: latest.map((update, i) => (_jsxs("div", { className: 'flex gap-3 items-start', children: [_jsx("div", { className: 'w-2 h-2 rounded-full bg-[#4FC3F7] flex-shrink-0 mt-2' }), _jsxs("div", { className: 'flex flex-col gap-0.5 min-w-0', children: [formatUpdateTime(update) && (_jsx("span", { className:
|
|
30
|
+
return (_jsx("div", { className: 'flex flex-col gap-3', children: latest.map((update, i) => (_jsxs("div", { className: 'flex gap-3 items-start', children: [_jsx("div", { className: 'w-2 h-2 rounded-full bg-[#4FC3F7] flex-shrink-0 mt-2' }), _jsxs("div", { className: 'flex flex-col gap-0.5 min-w-0', children: [formatUpdateTime(update) && (_jsx("span", { className: 'text-sm font-semibold text-[#0ea5e9] font-secondary', children: formatUpdateTime(update) })), update.html ? (_jsx("div", { className: 'text-white/90 text-lg leading-snug font-secondary [&_img]:hidden', children: update.html.replace(/<[^>]*>/g, '') })) : update.text ? (_jsx("p", { className: 'text-white/90 text-lg leading-snug font-secondary truncate', children: update.text })) : null] })] }, i))) }));
|
|
31
31
|
}
|
|
32
32
|
function ScrollingTimeline({ updates, language }) {
|
|
33
33
|
const [visibleStart, setVisibleStart] = useState(0);
|
|
@@ -54,9 +54,9 @@ function ScrollingTimeline({ updates, language }) {
|
|
|
54
54
|
return items;
|
|
55
55
|
}, [updates, visibleStart, displayCount]);
|
|
56
56
|
if (updates.length === 0) {
|
|
57
|
-
return (_jsx("div", { className: 'flex items-center justify-center h-full', children: _jsx("p", { className:
|
|
57
|
+
return (_jsx("div", { className: 'flex items-center justify-center h-full', children: _jsx("p", { className: 'text-white/50 font-secondary text-2xl', children: t('liveEvent.noUpdates', language) }) }));
|
|
58
58
|
}
|
|
59
|
-
return (_jsx("div", { className: 'flex flex-col justify-center gap-5 h-full', children: visibleUpdates.map((update, i) => (_jsxs("div", { className: 'flex gap-4 items-start animate-slide-up', children: [_jsx("div", { className: 'w-3 h-3 rounded-full bg-[#4FC3F7] flex-shrink-0 mt-1.5 shadow-[0_0_12px_rgba(79,195,247,0.5)]' }), _jsxs("div", { className: 'flex flex-col gap-1 min-w-0 flex-1', children: [formatUpdateTime(update) && (_jsx("span", { className:
|
|
59
|
+
return (_jsx("div", { className: 'flex flex-col justify-center gap-5 h-full', children: visibleUpdates.map((update, i) => (_jsxs("div", { className: 'flex gap-4 items-start animate-slide-up', children: [_jsx("div", { className: 'w-3 h-3 rounded-full bg-[#4FC3F7] flex-shrink-0 mt-1.5 shadow-[0_0_12px_rgba(79,195,247,0.5)]' }), _jsxs("div", { className: 'flex flex-col gap-1 min-w-0 flex-1', children: [formatUpdateTime(update) && (_jsx("span", { className: 'text-sm font-semibold text-[#4FC3F7] font-secondary tracking-wide', children: formatUpdateTime(update) })), update.html ? (_jsx("div", { className: 'text-white text-xl leading-snug font-secondary font-light [&_img]:hidden [&_a]:text-[#4FC3F7] [&_a]:underline', children: update.html.replace(/<[^>]*>/g, '') })) : update.text ? (_jsx("p", { className: 'text-white text-xl leading-snug font-secondary font-light line-clamp-2', children: update.text })) : null] })] }, `${visibleStart}-${i}`))) }));
|
|
60
60
|
}
|
|
61
61
|
export function LiveEventSlide({ event, progress, language }) {
|
|
62
62
|
const [dominantColor, setDominantColor] = useState('#b21100');
|
|
@@ -77,9 +77,9 @@ export function LiveEventSlide({ event, progress, language }) {
|
|
|
77
77
|
}
|
|
78
78
|
}, []);
|
|
79
79
|
if (isSports) {
|
|
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:
|
|
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-encode mb-4', children: "LIVE" }), _jsx("span", { className: 'text-white/80 text-2xl font-bold uppercase tracking-wider mb-2 font-encode', 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-encode [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-secondary 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:
|
|
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-encode mb-4', children: "LIVE" }), _jsx("span", { className: 'text-white/80 text-2xl font-bold uppercase tracking-wider mb-2 font-encode', 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-encode [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-secondary 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-bold uppercase tracking-[0.12em] font-encode', children: "LIVE UPDATES" })] }), _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' })] }));
|
|
@@ -87,9 +87,9 @@ function EarthquakeSlide({ earthquakes, progress, language }) {
|
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
89
|
if (earthquakes.length === 0) {
|
|
90
|
-
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', children: t('earthquakes.noData', language) }) })] }));
|
|
90
|
+
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 font-secondary', children: t('earthquakes.noData', language) }) })] }));
|
|
91
91
|
}
|
|
92
|
-
return (_jsxs("div", { className: 'absolute inset-0 animate-slide-transition', children: [_jsx("div", { className: 'absolute inset-0', children: _jsx("img", { src: backgroundImage, alt: '', crossOrigin: 'anonymous', onLoad: handleImageLoad, className: 'w-full h-full object-cover blur-xl scale-105' }, backgroundImage) }), _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 h-full flex flex-col justify-center px-24 py-24', children: [_jsxs("div", { className: 'mb-8 animate-slide-up', children: [_jsx("div", { className: 'w-32 h-2 bg-white mb-8' }), _jsxs("div", { className: 'flex items-center space-x-4 mb-4', children: [_jsx(AlertTriangle, { size: 56, className: 'text-orange-500', strokeWidth: 2 }), _jsx("h1", { className:
|
|
92
|
+
return (_jsxs("div", { className: 'absolute inset-0 animate-slide-transition', children: [_jsx("div", { className: 'absolute inset-0', children: _jsx("img", { src: backgroundImage, alt: '', crossOrigin: 'anonymous', onLoad: handleImageLoad, className: 'w-full h-full object-cover blur-xl scale-105' }, backgroundImage) }), _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 h-full flex flex-col justify-center px-24 py-24', children: [_jsxs("div", { className: 'mb-8 animate-slide-up', children: [_jsx("div", { className: 'w-32 h-2 bg-white mb-8' }), _jsxs("div", { className: 'flex items-center space-x-4 mb-4', children: [_jsx(AlertTriangle, { size: 56, className: 'text-orange-500', strokeWidth: 2 }), _jsx("h1", { className: 'text-5xl font-bold tracking-tight leading-tight font-encode', children: t('earthquakes.header', language) })] }), _jsx("p", { className: 'text-2xl font-light font-secondary opacity-90 leading-relaxed', children: t('earthquakes.subtitle', language) })] }), _jsx("div", { className: 'grid grid-cols-2 gap-6 animate-slide-up', children: earthquakes.map((quake, index) => {
|
|
93
93
|
const baseColor = getMagnitudeColor(quake.magnitude);
|
|
94
94
|
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(baseColor);
|
|
95
95
|
const rgb = result
|
|
@@ -107,11 +107,11 @@ function EarthquakeSlide({ earthquakes, progress, language }) {
|
|
|
107
107
|
}
|
|
108
108
|
const opacity = 0.15 + magnitudeIntensity * 0.35;
|
|
109
109
|
const backgroundColor = `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${opacity})`;
|
|
110
|
-
return (_jsxs("div", { className: 'grid grid-cols-[auto_1fr] gap-x-12 items-center p-6 backdrop-blur-sm rounded-lg border border-white/5', style: { animationDelay: `${index * 0.05}s`, backgroundColor }, children: [_jsx("div", { className: 'flex flex-col items-center', style: { width: '100px' }, children: _jsxs("div", { className: 'text-5xl font-bold leading-none', children: ["M", quake.magnitude.toFixed(1)] }) }), _jsxs("div", { className: 'flex flex-col justify-center min-w-0', children: [_jsx("h3", { className:
|
|
110
|
+
return (_jsxs("div", { className: 'grid grid-cols-[auto_1fr] gap-x-12 items-center p-6 backdrop-blur-sm rounded-lg border border-white/5', style: { animationDelay: `${index * 0.05}s`, backgroundColor }, children: [_jsx("div", { className: 'flex flex-col items-center', style: { width: '100px' }, children: _jsxs("div", { className: 'text-5xl font-bold leading-none', children: ["M", quake.magnitude.toFixed(1)] }) }), _jsxs("div", { className: 'flex flex-col justify-center min-w-0', children: [_jsx("h3", { className: 'text-3xl font-bold mb-2 line-clamp-2 leading-tight font-encode', title: quake.location, children: quake.location }), _jsxs("div", { className: 'grid grid-cols-2 gap-x-4 gap-y-1.5 text-xl font-secondary', children: [_jsxs("div", { className: 'flex items-center space-x-2', children: [_jsx(Clock, { size: 16, className: 'opacity-70 shrink-0' }), _jsx("span", { className: 'truncate', children: quake.time })] }), _jsxs("div", { className: 'flex items-center space-x-2', children: [_jsx(Layers, { size: 16, className: 'opacity-70 shrink-0' }), _jsxs("span", { className: 'truncate', children: [quake.depth, " ", t('earthquakes.depth', language)] })] }), _jsxs("div", { className: 'flex items-center space-x-2 opacity-80', children: [_jsx(MapPin, { size: 16, className: 'opacity-70 shrink-0' }), _jsxs("span", { className: 'truncate', children: [quake.lat.toFixed(2), "\u00B0, ", quake.lng.toFixed(2), "\u00B0"] })] }), quake.sources.length > 0 && (_jsxs("div", { className: 'flex items-center space-x-2 opacity-80', children: [_jsx(Link, { size: 16, className: 'opacity-70 shrink-0' }), _jsx("span", { className: 'truncate', children: quake.sources.join(', ') })] }))] })] })] }, quake.id));
|
|
111
111
|
}) }), _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}%` } }) })] })] }));
|
|
112
112
|
}
|
|
113
113
|
function EarthquakeLoadingSlide({ language }) {
|
|
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) }) })] }));
|
|
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 font-secondary animate-pulse', children: t('earthquakes.loading', language) }) })] }));
|
|
115
115
|
}
|
|
116
116
|
export function createEarthquakeSegment(earthquakes, onDataUpdate, language = 'en') {
|
|
117
117
|
return {
|
|
@@ -4,7 +4,7 @@ import { fetchLiveEvent } from './fetchLiveEvents.js';
|
|
|
4
4
|
import { t } from '../i18n.js';
|
|
5
5
|
function LiveEventSegmentRenderer({ event, progress, language }) {
|
|
6
6
|
if (!event) {
|
|
7
|
-
return (_jsx("div", { className: 'absolute inset-0 bg-black flex items-center justify-center', children: _jsx("p", { className:
|
|
7
|
+
return (_jsx("div", { className: 'absolute inset-0 bg-black flex items-center justify-center', children: _jsx("p", { className: 'text-white/50 text-2xl font-secondary', children: t('liveEvent.noLiveEvents', 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
|
}
|
|
@@ -47,17 +47,17 @@ function MarketSlide({ progress, marketData, language }) {
|
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
if (marketData.length === 0) {
|
|
50
|
-
return (_jsxs("div", { className: 'absolute inset-0', children: [_jsx("div", { className: 'absolute inset-0 opacity-75', style: { background: 'linear-gradient(to bottom right, #065f46, #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('markets.loading', language) }) })] }));
|
|
50
|
+
return (_jsxs("div", { className: 'absolute inset-0', children: [_jsx("div", { className: 'absolute inset-0 opacity-75', style: { background: 'linear-gradient(to bottom right, #065f46, #000000)' } }), _jsx("div", { className: 'relative z-10 h-full flex items-center justify-center', children: _jsx("div", { className: 'text-4xl font-light font-secondary animate-pulse', children: t('markets.loading', language) }) })] }));
|
|
51
51
|
}
|
|
52
|
-
return (_jsxs("div", { className: 'absolute inset-0 animate-slide-transition', children: [_jsx("div", { className: 'absolute inset-0', children: _jsx("img", { src: backgroundImage, alt: '', crossOrigin: 'anonymous', onLoad: handleImageLoad, className: 'w-full h-full object-cover blur-xl scale-105' }, backgroundImage) }), _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 h-full flex flex-col justify-center px-24', children: [_jsxs("div", { className: 'mb-12 animate-slide-up', children: [_jsx("div", { className: 'w-32 h-2 bg-white mb-12' }), _jsx("h1", { className:
|
|
52
|
+
return (_jsxs("div", { className: 'absolute inset-0 animate-slide-transition', children: [_jsx("div", { className: 'absolute inset-0', children: _jsx("img", { src: backgroundImage, alt: '', crossOrigin: 'anonymous', onLoad: handleImageLoad, className: 'w-full h-full object-cover blur-xl scale-105' }, backgroundImage) }), _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 h-full flex flex-col justify-center px-24', children: [_jsxs("div", { className: 'mb-12 animate-slide-up', children: [_jsx("div", { className: 'w-32 h-2 bg-white mb-12' }), _jsx("h1", { className: 'text-5xl font-bold tracking-tight mb-8 leading-tight font-encode', children: t('markets.header', language) }), _jsx("p", { className: 'text-3xl font-light font-secondary opacity-90 leading-relaxed', children: t('markets.subtitle', language) })] }), _jsx("div", { className: 'grid grid-cols-2 gap-4 animate-slide-up', children: marketData.map((stock, index) => {
|
|
53
53
|
const isPositive = stock.change >= 0;
|
|
54
54
|
const changeColor = isPositive ? 'text-green-400' : 'text-red-400';
|
|
55
55
|
const Icon = isPositive ? TrendingUp : TrendingDown;
|
|
56
56
|
const logIntensity = Math.log10(1 + Math.abs(stock.changePercent)) / Math.log10(1 + 100);
|
|
57
57
|
const opacity = 0.15 + Math.min(logIntensity, 1) * 0.35;
|
|
58
58
|
const backgroundColor = isPositive ? `rgba(34, 197, 94, ${opacity})` : `rgba(239, 68, 68, ${opacity})`;
|
|
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:
|
|
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}%` } }) })] })] }));
|
|
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-encode', children: stock.symbol }), _jsx("span", { className: 'text-2xl font-secondary opacity-70', children: stock.name })] }), _jsxs("div", { className: 'flex flex-col items-end', children: [_jsxs("div", { className: 'text-5xl font-bold mb-1 font-encode', 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
|
+
}) }), _jsx("div", { className: 'mt-6 mb-24 text-xl font-secondary 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
62
|
export function createMarketsSegment(marketData, onDataUpdate, language = 'en') {
|
|
63
63
|
return {
|
|
@@ -83,15 +83,15 @@ function WeatherSlide({ weatherData, progress, unit, language }) {
|
|
|
83
83
|
setDominantColor('#1e40af');
|
|
84
84
|
}
|
|
85
85
|
};
|
|
86
|
-
return (_jsxs("div", { className: 'absolute inset-0 animate-slide-transition', children: [backgroundImage && (_jsx("div", { className: 'absolute inset-0', children: _jsx("img", { src: backgroundImage, alt: '', crossOrigin: 'anonymous', onLoad: handleImageLoad, className: 'w-full h-full object-cover blur-xl scale-105' }, backgroundImage) })), _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 h-full flex flex-col justify-center px-24', children: [_jsxs("div", { className: 'mb-12 animate-slide-up', children: [_jsx("div", { className: 'w-32 h-2 bg-white mb-12' }), _jsx("h1", { className:
|
|
86
|
+
return (_jsxs("div", { className: 'absolute inset-0 animate-slide-transition', children: [backgroundImage && (_jsx("div", { className: 'absolute inset-0', children: _jsx("img", { src: backgroundImage, alt: '', crossOrigin: 'anonymous', onLoad: handleImageLoad, className: 'w-full h-full object-cover blur-xl scale-105' }, backgroundImage) })), _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 h-full flex flex-col justify-center px-24', children: [_jsxs("div", { className: 'mb-12 animate-slide-up', children: [_jsx("div", { className: 'w-32 h-2 bg-white mb-12' }), _jsx("h1", { className: 'text-5xl font-bold tracking-tight mb-8 leading-tight font-encode', children: t('weather.header', language) }), _jsx("p", { className: 'text-3xl font-light font-secondary opacity-90 leading-relaxed', children: t(`region.${weatherData.region}`, language) })] }), _jsx("div", { className: 'grid grid-cols-2 gap-8 animate-slide-up', children: weatherData.cities.map((city, index) => {
|
|
87
87
|
const temp = displayUnit === 'celsius' ? fahrenheitToCelsius(city.temp) : city.temp;
|
|
88
88
|
const high = displayUnit === 'celsius' ? fahrenheitToCelsius(city.high) : city.high;
|
|
89
89
|
const low = displayUnit === 'celsius' ? fahrenheitToCelsius(city.low) : city.low;
|
|
90
|
-
return (_jsxs("div", { className: 'flex items-center space-x-6 p-6 bg-white/10 backdrop-blur-sm rounded-lg', style: { animationDelay: `${index * 0.1}s` }, children: [_jsx("div", { className: 'shrink-0', children: getWeatherIcon(city.condition, 48) }), _jsxs("div", { className: 'flex-1', children: [_jsx("h3", { className:
|
|
90
|
+
return (_jsxs("div", { className: 'flex items-center space-x-6 p-6 bg-white/10 backdrop-blur-sm rounded-lg', style: { animationDelay: `${index * 0.1}s` }, children: [_jsx("div", { className: 'shrink-0', children: getWeatherIcon(city.condition, 48) }), _jsxs("div", { className: 'flex-1', children: [_jsx("h3", { className: 'text-3xl font-bold mb-2 font-encode', children: city.name }), _jsxs("span", { className: 'text-5xl font-bold transition-opacity duration-300 font-encode', style: { opacity: isTransitioning ? 0 : 1 }, children: [temp, unitLabel] })] }), _jsxs("div", { className: 'flex flex-col items-end space-y-1 font-secondary', children: [_jsxs("span", { className: 'text-2xl opacity-70 transition-opacity duration-300', style: { opacity: isTransitioning ? 0 : 0.7 }, children: [t('weather.high', language), " ", high, unitLabel] }), _jsxs("span", { className: 'text-2xl opacity-70 transition-opacity duration-300', style: { opacity: isTransitioning ? 0 : 0.7 }, children: [t('weather.low', language), " ", low, unitLabel] })] })] }, city.name));
|
|
91
91
|
}) }), _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}%` } }) })] })] }));
|
|
92
92
|
}
|
|
93
93
|
function WeatherLoadingSlide({ language }) {
|
|
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) }) })] }));
|
|
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 font-secondary animate-pulse', children: t('weather.loading', language) }) })] }));
|
|
95
95
|
}
|
|
96
96
|
export function createWeatherSegment(weatherData, onDataUpdate, language = 'en') {
|
|
97
97
|
return {
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import Handlebars from 'handlebars';
|
|
2
2
|
import qrcode from 'qrcode-generator';
|
|
3
|
+
function buildQrCodeHtml(url) {
|
|
4
|
+
const qr = qrcode(0, 'M');
|
|
5
|
+
qr.addData(url);
|
|
6
|
+
qr.make();
|
|
7
|
+
const qrSvg = qr.createSvgTag(5, 0);
|
|
8
|
+
return `<div class="qr-container"><div class="qr-code" aria-label="QR Code">${qrSvg}</div></div>`;
|
|
9
|
+
}
|
|
10
|
+
export function registerInstagramImageHelpers() {
|
|
11
|
+
Handlebars.registerHelper('instagramQrCode', (url) => buildQrCodeHtml(url));
|
|
12
|
+
}
|
|
13
|
+
registerInstagramImageHelpers();
|
|
3
14
|
function isNodeRuntime() {
|
|
4
15
|
return typeof process !== 'undefined' && typeof process.versions?.node === 'string';
|
|
5
16
|
}
|
|
@@ -20,23 +31,6 @@ async function loadTemplateSource() {
|
|
|
20
31
|
return module.default;
|
|
21
32
|
}
|
|
22
33
|
const template = Handlebars.compile(await loadTemplateSource());
|
|
23
|
-
function buildQrCodeHtml(url) {
|
|
24
|
-
const qr = qrcode(0, 'M');
|
|
25
|
-
qr.addData(url);
|
|
26
|
-
qr.make();
|
|
27
|
-
const qrSvg = qr.createSvgTag(5, 0);
|
|
28
|
-
return `<div class="qr-container"><div class="qr-code" aria-label="QR Code">${qrSvg}</div></div>`;
|
|
29
|
-
}
|
|
30
|
-
function buildLogoSvg() {
|
|
31
|
-
return `<div style="color: white; width: 140px; height: 119px; display: flex; align-items: center; justify-content: end;">
|
|
32
|
-
<svg width="61" height="61" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
33
|
-
<path d="M10.268 21a2 2 0 0 0 3.464 0"></path>
|
|
34
|
-
<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"></path>
|
|
35
|
-
<path d="M4 2C2.8 3.7 2 5.7 2 8"></path>
|
|
36
|
-
<path d="M22 8a10 10 0 0 0-2-6"></path>
|
|
37
|
-
</svg>
|
|
38
|
-
</div>`;
|
|
39
|
-
}
|
|
40
34
|
function resolveCategoryName(params) {
|
|
41
35
|
if (params.category) {
|
|
42
36
|
return params.category.toUpperCase();
|
|
@@ -53,6 +47,5 @@ export function buildInstagramImageHtml(params) {
|
|
|
53
47
|
title: params.title,
|
|
54
48
|
categoryName: resolveCategoryName(params),
|
|
55
49
|
qrCodeHtml,
|
|
56
|
-
logoSvg: buildLogoSvg(),
|
|
57
50
|
}).trim();
|
|
58
51
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>Live Program | fifthbell</title>
|
|
7
7
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
8
8
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
9
|
-
<link href="https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=EB+Garamond:ital,wght@0,400..800;1,400..800&family=Encode+Sans
|
|
9
|
+
<link href="https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=EB+Garamond:ital,wght@0,400..800;1,400..800&family=Encode+Sans:wght@100..900&family=Funnel+Display:wght@300..800&family=League+Gothic&family=Libre+Franklin:ital,wght@0,100..900;1,100..900&family=Outfit:wght@100..900&display=swap" rel="stylesheet" />
|
|
10
10
|
<script type="module" crossorigin src="./live-program.js"></script>
|
|
11
11
|
<link rel="stylesheet" crossorigin href="./live-program.css">
|
|
12
12
|
</head>
|