@gaulatti/giorgia 0.1.57
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/LICENSE +21 -0
- package/README.md +45 -0
- package/dist/carousels.d.ts +1 -0
- package/dist/carousels.js +65 -0
- package/dist/components/live-program/LiveProgram.d.ts +9 -0
- package/dist/components/live-program/LiveProgram.js +751 -0
- package/dist/components/live-program/assets.d.ts +14 -0
- package/dist/components/live-program/assets.js +14 -0
- package/dist/components/live-program/components/Marquee.d.ts +16 -0
- package/dist/components/live-program/components/Marquee.js +88 -0
- package/dist/components/live-program/components/MarqueeCurtain.d.ts +5 -0
- package/dist/components/live-program/components/MarqueeCurtain.js +30 -0
- package/dist/components/live-program/components/WorldClocks.d.ts +19 -0
- package/dist/components/live-program/components/WorldClocks.js +101 -0
- package/dist/components/live-program/components/slides/ArticleSlide.d.ts +14 -0
- package/dist/components/live-program/components/slides/ArticleSlide.js +32 -0
- package/dist/components/live-program/components/slides/CallsignSlide.d.ts +6 -0
- package/dist/components/live-program/components/slides/CallsignSlide.js +49 -0
- package/dist/components/live-program/components/slides/LiveEventSlide.d.ts +9 -0
- package/dist/components/live-program/components/slides/LiveEventSlide.js +86 -0
- package/dist/components/live-program/components/slides/slideStyles.d.ts +1 -0
- package/dist/components/live-program/components/slides/slideStyles.js +64 -0
- package/dist/components/live-program/events.d.ts +34 -0
- package/dist/components/live-program/events.js +167 -0
- package/dist/components/live-program/hooks/useSSE.d.ts +11 -0
- package/dist/components/live-program/hooks/useSSE.js +107 -0
- package/dist/components/live-program/i18n.d.ts +4 -0
- package/dist/components/live-program/i18n.js +305 -0
- package/dist/components/live-program/segments/ArticlesSegment.d.ts +6 -0
- package/dist/components/live-program/segments/ArticlesSegment.js +160 -0
- package/dist/components/live-program/segments/EarthquakeSegment.d.ts +16 -0
- package/dist/components/live-program/segments/EarthquakeSegment.js +130 -0
- package/dist/components/live-program/segments/LiveEventSegment.d.ts +4 -0
- package/dist/components/live-program/segments/LiveEventSegment.js +27 -0
- package/dist/components/live-program/segments/MarketsSegment.d.ts +12 -0
- package/dist/components/live-program/segments/MarketsSegment.js +76 -0
- package/dist/components/live-program/segments/WeatherSegment.d.ts +15 -0
- package/dist/components/live-program/segments/WeatherSegment.js +119 -0
- package/dist/components/live-program/segments/fetchLiveEvents.d.ts +20 -0
- package/dist/components/live-program/segments/fetchLiveEvents.js +76 -0
- package/dist/components/live-program/segments/index.d.ts +8 -0
- package/dist/components/live-program/segments/index.js +8 -0
- package/dist/components/live-program/segments/types.d.ts +23 -0
- package/dist/components/live-program/segments/types.js +1 -0
- package/dist/components/live-program/segments/usePlaylistEngine.d.ts +9 -0
- package/dist/components/live-program/segments/usePlaylistEngine.js +108 -0
- package/dist/components/live-program/utils/broadcastTime.d.ts +12 -0
- package/dist/components/live-program/utils/broadcastTime.js +33 -0
- package/dist/fonts/LDIcapOFNxEwR-Bd1O9uYNmnUQomAgE25imKSbHhROjLsZBWTSrQGD_jZtU.ttf +0 -0
- package/dist/fonts/LDIcapOFNxEwR-Bd1O9uYNmnUQomAgE25imKSbHhROjLsZBWTSrQGFPjZtU.ttf +0 -0
- package/dist/fonts/LDIcapOFNxEwR-Bd1O9uYNmnUQomAgE25imKSbHhROjLsZBWTSrQGGHiZtU.ttf +0 -0
- package/dist/fonts/LDIcapOFNxEwR-Bd1O9uYNmnUQomAgE25imKSbHhROjLsZBWTSrQGGHjZtU.ttf +0 -0
- package/dist/fonts/LDIcapOFNxEwR-Bd1O9uYNmnUQomAgE25imKSbHhROjLsZBWTSrQGIbkZtU.ttf +0 -0
- package/dist/fonts/LDIcapOFNxEwR-Bd1O9uYNmnUQomAgE25imKSbHhROjLsZBWTSrQGL_kZtU.ttf +0 -0
- package/dist/fonts/LDIcapOFNxEwR-Bd1O9uYNmnUQomAgE25imKSbHhROjLsZBWTSrQGMjkZtU.ttf +0 -0
- package/dist/fonts/LDIcapOFNxEwR-Bd1O9uYNmnUQomAgE25imKSbHhROjLsZBWTSrQGOHjZtU.ttf +0 -0
- package/dist/fonts/LDIcapOFNxEwR-Bd1O9uYNmnUQomAgE25imKSbHhROjLsZBWTSrQGOHkZtU.ttf +0 -0
- package/dist/fonts/SlGDmQSNjdsmc35JDF1K5E55YMjF_7DPuGi-2fRUAw.ttf +0 -0
- package/dist/fonts/SlGDmQSNjdsmc35JDF1K5E55YMjF_7DPuGi-6_RUAw.ttf +0 -0
- package/dist/fonts/SlGDmQSNjdsmc35JDF1K5E55YMjF_7DPuGi-DPNUAw.ttf +0 -0
- package/dist/fonts/SlGDmQSNjdsmc35JDF1K5E55YMjF_7DPuGi-NfNUAw.ttf +0 -0
- package/dist/fonts/SlGDmQSNjdsmc35JDF1K5E55YMjF_7DPuGi-a_NUAw.ttf +0 -0
- package/dist/fonts/SlGFmQSNjdsmc35JDF1K5GRwUjcdlttVFm-rI7c8R496.ttf +0 -0
- package/dist/fonts/SlGFmQSNjdsmc35JDF1K5GRwUjcdlttVFm-rI7dbR496.ttf +0 -0
- package/dist/fonts/SlGFmQSNjdsmc35JDF1K5GRwUjcdlttVFm-rI7diR496.ttf +0 -0
- package/dist/fonts/SlGFmQSNjdsmc35JDF1K5GRwUjcdlttVFm-rI7e8QI96.ttf +0 -0
- package/dist/fonts/SlGFmQSNjdsmc35JDF1K5GRwUjcdlttVFm-rI7eOQI96.ttf +0 -0
- package/dist/fonts/TK3_WkUHHAIjg75cFRf3bXL8LICs13FvgUE.ttf +0 -0
- package/dist/fonts/TK3_WkUHHAIjg75cFRf3bXL8LICs169vgUE.ttf +0 -0
- package/dist/fonts/TK3_WkUHHAIjg75cFRf3bXL8LICs18NvgUE.ttf +0 -0
- package/dist/fonts/TK3_WkUHHAIjg75cFRf3bXL8LICs1_FvgUE.ttf +0 -0
- package/dist/fonts/TK3_WkUHHAIjg75cFRf3bXL8LICs1xZogUE.ttf +0 -0
- package/dist/fonts/TK3_WkUHHAIjg75cFRf3bXL8LICs1y9ogUE.ttf +0 -0
- package/dist/fonts/fonts.css +378 -0
- package/dist/fonts/j8_16_LD37rqfuwxyIuaZhE6cRXOLtm2gfTGgQ.ttf +0 -0
- package/dist/fonts/j8_46_LD37rqfuwxyIuaZhE6cRXOLtm2gfT-BYipBw.ttf +0 -0
- package/dist/fonts/j8_46_LD37rqfuwxyIuaZhE6cRXOLtm2gfT-IYmpBw.ttf +0 -0
- package/dist/fonts/j8_46_LD37rqfuwxyIuaZhE6cRXOLtm2gfT-PYqpBw.ttf +0 -0
- package/dist/fonts/j8_46_LD37rqfuwxyIuaZhE6cRXOLtm2gfT-WYupBw.ttf +0 -0
- package/dist/fonts/jizMREVItHgc8qDIbSTKq4XkRiUawTk7f45UM9y05oYiRNDM.ttf +0 -0
- package/dist/fonts/jizMREVItHgc8qDIbSTKq4XkRiUawTk7f45UM9y05oZ8RNDM.ttf +0 -0
- package/dist/fonts/jizMREVItHgc8qDIbSTKq4XkRiUawTk7f45UM9y05oZ8RdDM.ttf +0 -0
- package/dist/fonts/jizMREVItHgc8qDIbSTKq4XkRiUawTk7f45UM9y05oZORNDM.ttf +0 -0
- package/dist/fonts/jizMREVItHgc8qDIbSTKq4XkRiUawTk7f45UM9y05oabQ9DM.ttf +0 -0
- package/dist/fonts/jizMREVItHgc8qDIbSTKq4XkRiUawTk7f45UM9y05oaiQ9DM.ttf +0 -0
- package/dist/fonts/jizMREVItHgc8qDIbSTKq4XkRiUawTk7f45UM9y05ob8Q9DM.ttf +0 -0
- package/dist/fonts/jizMREVItHgc8qDIbSTKq4XkRiUawTk7f45UM9y05ob8RNDM.ttf +0 -0
- package/dist/fonts/jizMREVItHgc8qDIbSTKq4XkRiUawTk7f45UM9y05obVQ9DM.ttf +0 -0
- package/dist/fonts/jizOREVItHgc8qDIbSTKq4XkRg8T88bjFuXOnduh8MKUBw.ttf +0 -0
- package/dist/fonts/jizOREVItHgc8qDIbSTKq4XkRg8T88bjFuXOnduhHMWUBw.ttf +0 -0
- package/dist/fonts/jizOREVItHgc8qDIbSTKq4XkRg8T88bjFuXOnduhLsSUBw.ttf +0 -0
- package/dist/fonts/jizOREVItHgc8qDIbSTKq4XkRg8T88bjFuXOnduhLsWUBw.ttf +0 -0
- package/dist/fonts/jizOREVItHgc8qDIbSTKq4XkRg8T88bjFuXOnduhcMWUBw.ttf +0 -0
- package/dist/fonts/jizOREVItHgc8qDIbSTKq4XkRg8T88bjFuXOnduhh8KUBw.ttf +0 -0
- package/dist/fonts/jizOREVItHgc8qDIbSTKq4XkRg8T88bjFuXOnduhrsKUBw.ttf +0 -0
- package/dist/fonts/jizOREVItHgc8qDIbSTKq4XkRg8T88bjFuXOnduhrsWUBw.ttf +0 -0
- package/dist/fonts/jizOREVItHgc8qDIbSTKq4XkRg8T88bjFuXOnduhycKUBw.ttf +0 -0
- package/dist/homepage-distributor.d.ts +55 -0
- package/dist/homepage-distributor.js +68 -0
- package/dist/instagram-image-template.d.ts +9 -0
- package/dist/instagram-image-template.js +51 -0
- package/dist/live-program/main.d.ts +1 -0
- package/dist/live-program/main.js +10 -0
- package/dist/live-program-page/fifthbell/audio/pipes.ogg +0 -0
- package/dist/live-program-page/fifthbell/images/berlin.jpg +0 -0
- package/dist/live-program-page/fifthbell/images/fifthbell.png +0 -0
- package/dist/live-program-page/fifthbell/images/nyc.jpg +0 -0
- package/dist/live-program-page/fifthbell/images/nyse.jpg +0 -0
- package/dist/live-program-page/fifthbell/images/santiago.jpg +0 -0
- package/dist/live-program-page/fifthbell/images/seismograph.jpg +0 -0
- package/dist/live-program-page/fifthbell/images/tokyo.jpg +0 -0
- package/dist/live-program-page/index.html +16 -0
- package/dist/live-program-page/live-program.css +3 -0
- package/dist/live-program-page/live-program.js +76 -0
- package/dist/outlet-config.d.ts +29 -0
- package/dist/outlet-config.js +29 -0
- package/dist/renderer.browser.d.ts +2 -0
- package/dist/renderer.browser.js +132 -0
- package/dist/renderer.core.d.ts +9 -0
- package/dist/renderer.core.js +354 -0
- package/dist/renderer.d.ts +6 -0
- package/dist/renderer.js +4 -0
- package/dist/renderer.node.d.ts +16 -0
- package/dist/renderer.node.js +166 -0
- package/dist/types/canonical-article.d.ts +249 -0
- package/dist/types/canonical-article.js +236 -0
- package/dist/utils/sofascore.d.ts +3 -0
- package/dist/utils/sofascore.js +31 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/package.json +89 -0
- package/src/partial-deps.json +53 -0
- package/src/styles/compiled.css +2 -0
- package/src/templates/layouts/404.hbs +5 -0
- package/src/templates/layouts/article-page.hbs +5 -0
- package/src/templates/layouts/category-page.hbs +5 -0
- package/src/templates/layouts/homepage.hbs +5 -0
- package/src/templates/layouts/link-in-bio.hbs +226 -0
- package/src/templates/layouts/live-story.hbs +5 -0
- package/src/templates/layouts/media-page.hbs +5 -0
- package/src/templates/layouts/search-page.hbs +5 -0
- package/src/templates/partials/blocks/audio.hbs +12 -0
- package/src/templates/partials/blocks/data-table.hbs +23 -0
- package/src/templates/partials/blocks/divider.hbs +1 -0
- package/src/templates/partials/blocks/heading.hbs +9 -0
- package/src/templates/partials/blocks/image.hbs +6 -0
- package/src/templates/partials/blocks/info-box.hbs +8 -0
- package/src/templates/partials/blocks/instagram.hbs +28 -0
- package/src/templates/partials/blocks/key-points.hbs +8 -0
- package/src/templates/partials/blocks/list.hbs +13 -0
- package/src/templates/partials/blocks/live-update.hbs +24 -0
- package/src/templates/partials/blocks/pull-quote.hbs +6 -0
- package/src/templates/partials/blocks/rich-text.hbs +1 -0
- package/src/templates/partials/blocks/tiktok.hbs +15 -0
- package/src/templates/partials/blocks/x.hbs +74 -0
- package/src/templates/partials/blocks/youtube.hbs +12 -0
- package/src/templates/partials/components/article-main.hbs +159 -0
- package/src/templates/partials/components/breaking-news/live-updates-column.hbs +29 -0
- package/src/templates/partials/components/breaking-news.hbs +56 -0
- package/src/templates/partials/components/category/header.hbs +5 -0
- package/src/templates/partials/components/category/main-grid.hbs +55 -0
- package/src/templates/partials/components/category/main.hbs +7 -0
- package/src/templates/partials/components/category/more-grid.hbs +26 -0
- package/src/templates/partials/components/editorial-hero.hbs +73 -0
- package/src/templates/partials/components/headline.hbs +15 -0
- package/src/templates/partials/components/hero-editorial.hbs +1 -0
- package/src/templates/partials/components/hero.hbs +1 -0
- package/src/templates/partials/components/home/landing.hbs +111 -0
- package/src/templates/partials/components/home/main.hbs +63 -0
- package/src/templates/partials/components/home/more-stories.hbs +23 -0
- package/src/templates/partials/components/home/must-read.hbs +77 -0
- package/src/templates/partials/components/live-story/main.hbs +229 -0
- package/src/templates/partials/components/media/main.hbs +220 -0
- package/src/templates/partials/components/not-found/main.hbs +28 -0
- package/src/templates/partials/components/search/main.hbs +420 -0
- package/src/templates/partials/components/snack.hbs +92 -0
- package/src/templates/partials/components/spotlight-hero.hbs +59 -0
- package/src/templates/partials/components/trending.hbs +14 -0
- package/src/templates/partials/components/ui/accordion.hbs +30 -0
- package/src/templates/partials/components/ui/breadcrumb.hbs +16 -0
- package/src/templates/partials/components/ui/icon-button.hbs +19 -0
- package/src/templates/partials/components/ui/loading-spinner.hbs +27 -0
- package/src/templates/partials/components/ui/pagination.hbs +56 -0
- package/src/templates/partials/components/ui/scroll-area.hbs +12 -0
- package/src/templates/partials/components/ui/status-badge.hbs +21 -0
- package/src/templates/partials/footers/footer-full.hbs +79 -0
- package/src/templates/partials/footers/footer-minimal.hbs +5 -0
- package/src/templates/partials/headers/header-main.hbs +400 -0
- package/src/templates/partials/headers/header-minimal.hbs +16 -0
- package/src/templates/partials/nav/nav-categories.hbs +5 -0
- package/src/templates/partials/shell/doc-end.hbs +282 -0
- package/src/templates/partials/shell/doc-start-404.hbs +41 -0
- package/src/templates/partials/shell/doc-start-standard.hbs +86 -0
- package/src/templates/templates/instagram-image.hbs +175 -0
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: 'EB Garamond';
|
|
3
|
+
font-style: italic;
|
|
4
|
+
font-weight: 400;
|
|
5
|
+
font-display: swap;
|
|
6
|
+
src: url(https://cdn.fifthbell.com/content/fonts/SlGFmQSNjdsmc35JDF1K5GRwUjcdlttVFm-rI7e8QI96.ttf) format('truetype');
|
|
7
|
+
}
|
|
8
|
+
@font-face {
|
|
9
|
+
font-family: 'EB Garamond';
|
|
10
|
+
font-style: italic;
|
|
11
|
+
font-weight: 500;
|
|
12
|
+
font-display: swap;
|
|
13
|
+
src: url(https://cdn.fifthbell.com/content/fonts/SlGFmQSNjdsmc35JDF1K5GRwUjcdlttVFm-rI7eOQI96.ttf) format('truetype');
|
|
14
|
+
}
|
|
15
|
+
@font-face {
|
|
16
|
+
font-family: 'EB Garamond';
|
|
17
|
+
font-style: italic;
|
|
18
|
+
font-weight: 600;
|
|
19
|
+
font-display: swap;
|
|
20
|
+
src: url(https://cdn.fifthbell.com/content/fonts/SlGFmQSNjdsmc35JDF1K5GRwUjcdlttVFm-rI7diR496.ttf) format('truetype');
|
|
21
|
+
}
|
|
22
|
+
@font-face {
|
|
23
|
+
font-family: 'EB Garamond';
|
|
24
|
+
font-style: italic;
|
|
25
|
+
font-weight: 700;
|
|
26
|
+
font-display: swap;
|
|
27
|
+
src: url(https://cdn.fifthbell.com/content/fonts/SlGFmQSNjdsmc35JDF1K5GRwUjcdlttVFm-rI7dbR496.ttf) format('truetype');
|
|
28
|
+
}
|
|
29
|
+
@font-face {
|
|
30
|
+
font-family: 'EB Garamond';
|
|
31
|
+
font-style: italic;
|
|
32
|
+
font-weight: 800;
|
|
33
|
+
font-display: swap;
|
|
34
|
+
src: url(https://cdn.fifthbell.com/content/fonts/SlGFmQSNjdsmc35JDF1K5GRwUjcdlttVFm-rI7c8R496.ttf) format('truetype');
|
|
35
|
+
}
|
|
36
|
+
@font-face {
|
|
37
|
+
font-family: 'EB Garamond';
|
|
38
|
+
font-style: normal;
|
|
39
|
+
font-weight: 400;
|
|
40
|
+
font-display: swap;
|
|
41
|
+
src: url(https://cdn.fifthbell.com/content/fonts/SlGDmQSNjdsmc35JDF1K5E55YMjF_7DPuGi-6_RUAw.ttf) format('truetype');
|
|
42
|
+
}
|
|
43
|
+
@font-face {
|
|
44
|
+
font-family: 'EB Garamond';
|
|
45
|
+
font-style: normal;
|
|
46
|
+
font-weight: 500;
|
|
47
|
+
font-display: swap;
|
|
48
|
+
src: url(https://cdn.fifthbell.com/content/fonts/SlGDmQSNjdsmc35JDF1K5E55YMjF_7DPuGi-2fRUAw.ttf) format('truetype');
|
|
49
|
+
}
|
|
50
|
+
@font-face {
|
|
51
|
+
font-family: 'EB Garamond';
|
|
52
|
+
font-style: normal;
|
|
53
|
+
font-weight: 600;
|
|
54
|
+
font-display: swap;
|
|
55
|
+
src: url(https://cdn.fifthbell.com/content/fonts/SlGDmQSNjdsmc35JDF1K5E55YMjF_7DPuGi-NfNUAw.ttf) format('truetype');
|
|
56
|
+
}
|
|
57
|
+
@font-face {
|
|
58
|
+
font-family: 'EB Garamond';
|
|
59
|
+
font-style: normal;
|
|
60
|
+
font-weight: 700;
|
|
61
|
+
font-display: swap;
|
|
62
|
+
src: url(https://cdn.fifthbell.com/content/fonts/SlGDmQSNjdsmc35JDF1K5E55YMjF_7DPuGi-DPNUAw.ttf) format('truetype');
|
|
63
|
+
}
|
|
64
|
+
@font-face {
|
|
65
|
+
font-family: 'EB Garamond';
|
|
66
|
+
font-style: normal;
|
|
67
|
+
font-weight: 800;
|
|
68
|
+
font-display: swap;
|
|
69
|
+
src: url(https://cdn.fifthbell.com/content/fonts/SlGDmQSNjdsmc35JDF1K5E55YMjF_7DPuGi-a_NUAw.ttf) format('truetype');
|
|
70
|
+
}
|
|
71
|
+
@font-face {
|
|
72
|
+
font-family: 'Encode Sans';
|
|
73
|
+
font-style: normal;
|
|
74
|
+
font-weight: 100;
|
|
75
|
+
font-stretch: normal;
|
|
76
|
+
font-display: swap;
|
|
77
|
+
src: url(https://cdn.fifthbell.com/content/fonts/LDIcapOFNxEwR-Bd1O9uYNmnUQomAgE25imKSbHhROjLsZBWTSrQGGHiZtU.ttf) format('truetype');
|
|
78
|
+
}
|
|
79
|
+
@font-face {
|
|
80
|
+
font-family: 'Encode Sans';
|
|
81
|
+
font-style: normal;
|
|
82
|
+
font-weight: 200;
|
|
83
|
+
font-stretch: normal;
|
|
84
|
+
font-display: swap;
|
|
85
|
+
src: url(https://cdn.fifthbell.com/content/fonts/LDIcapOFNxEwR-Bd1O9uYNmnUQomAgE25imKSbHhROjLsZBWTSrQGOHjZtU.ttf) format('truetype');
|
|
86
|
+
}
|
|
87
|
+
@font-face {
|
|
88
|
+
font-family: 'Encode Sans';
|
|
89
|
+
font-style: normal;
|
|
90
|
+
font-weight: 300;
|
|
91
|
+
font-stretch: normal;
|
|
92
|
+
font-display: swap;
|
|
93
|
+
src: url(https://cdn.fifthbell.com/content/fonts/LDIcapOFNxEwR-Bd1O9uYNmnUQomAgE25imKSbHhROjLsZBWTSrQGD_jZtU.ttf) format('truetype');
|
|
94
|
+
}
|
|
95
|
+
@font-face {
|
|
96
|
+
font-family: 'Encode Sans';
|
|
97
|
+
font-style: normal;
|
|
98
|
+
font-weight: 400;
|
|
99
|
+
font-stretch: normal;
|
|
100
|
+
font-display: swap;
|
|
101
|
+
src: url(https://cdn.fifthbell.com/content/fonts/LDIcapOFNxEwR-Bd1O9uYNmnUQomAgE25imKSbHhROjLsZBWTSrQGGHjZtU.ttf) format('truetype');
|
|
102
|
+
}
|
|
103
|
+
@font-face {
|
|
104
|
+
font-family: 'Encode Sans';
|
|
105
|
+
font-style: normal;
|
|
106
|
+
font-weight: 500;
|
|
107
|
+
font-stretch: normal;
|
|
108
|
+
font-display: swap;
|
|
109
|
+
src: url(https://cdn.fifthbell.com/content/fonts/LDIcapOFNxEwR-Bd1O9uYNmnUQomAgE25imKSbHhROjLsZBWTSrQGFPjZtU.ttf) format('truetype');
|
|
110
|
+
}
|
|
111
|
+
@font-face {
|
|
112
|
+
font-family: 'Encode Sans';
|
|
113
|
+
font-style: normal;
|
|
114
|
+
font-weight: 600;
|
|
115
|
+
font-stretch: normal;
|
|
116
|
+
font-display: swap;
|
|
117
|
+
src: url(https://cdn.fifthbell.com/content/fonts/LDIcapOFNxEwR-Bd1O9uYNmnUQomAgE25imKSbHhROjLsZBWTSrQGL_kZtU.ttf) format('truetype');
|
|
118
|
+
}
|
|
119
|
+
@font-face {
|
|
120
|
+
font-family: 'Encode Sans';
|
|
121
|
+
font-style: normal;
|
|
122
|
+
font-weight: 700;
|
|
123
|
+
font-stretch: normal;
|
|
124
|
+
font-display: swap;
|
|
125
|
+
src: url(https://cdn.fifthbell.com/content/fonts/LDIcapOFNxEwR-Bd1O9uYNmnUQomAgE25imKSbHhROjLsZBWTSrQGIbkZtU.ttf) format('truetype');
|
|
126
|
+
}
|
|
127
|
+
@font-face {
|
|
128
|
+
font-family: 'Encode Sans';
|
|
129
|
+
font-style: normal;
|
|
130
|
+
font-weight: 800;
|
|
131
|
+
font-stretch: normal;
|
|
132
|
+
font-display: swap;
|
|
133
|
+
src: url(https://cdn.fifthbell.com/content/fonts/LDIcapOFNxEwR-Bd1O9uYNmnUQomAgE25imKSbHhROjLsZBWTSrQGOHkZtU.ttf) format('truetype');
|
|
134
|
+
}
|
|
135
|
+
@font-face {
|
|
136
|
+
font-family: 'Encode Sans';
|
|
137
|
+
font-style: normal;
|
|
138
|
+
font-weight: 900;
|
|
139
|
+
font-stretch: normal;
|
|
140
|
+
font-display: swap;
|
|
141
|
+
src: url(https://cdn.fifthbell.com/content/fonts/LDIcapOFNxEwR-Bd1O9uYNmnUQomAgE25imKSbHhROjLsZBWTSrQGMjkZtU.ttf) format('truetype');
|
|
142
|
+
}
|
|
143
|
+
@font-face {
|
|
144
|
+
font-family: 'Libre Franklin';
|
|
145
|
+
font-style: italic;
|
|
146
|
+
font-weight: 100;
|
|
147
|
+
font-display: swap;
|
|
148
|
+
src: url(https://cdn.fifthbell.com/content/fonts/jizMREVItHgc8qDIbSTKq4XkRiUawTk7f45UM9y05oZ8RdDM.ttf) format('truetype');
|
|
149
|
+
}
|
|
150
|
+
@font-face {
|
|
151
|
+
font-family: 'Libre Franklin';
|
|
152
|
+
font-style: italic;
|
|
153
|
+
font-weight: 200;
|
|
154
|
+
font-display: swap;
|
|
155
|
+
src: url(https://cdn.fifthbell.com/content/fonts/jizMREVItHgc8qDIbSTKq4XkRiUawTk7f45UM9y05ob8RNDM.ttf) format('truetype');
|
|
156
|
+
}
|
|
157
|
+
@font-face {
|
|
158
|
+
font-family: 'Libre Franklin';
|
|
159
|
+
font-style: italic;
|
|
160
|
+
font-weight: 300;
|
|
161
|
+
font-display: swap;
|
|
162
|
+
src: url(https://cdn.fifthbell.com/content/fonts/jizMREVItHgc8qDIbSTKq4XkRiUawTk7f45UM9y05oYiRNDM.ttf) format('truetype');
|
|
163
|
+
}
|
|
164
|
+
@font-face {
|
|
165
|
+
font-family: 'Libre Franklin';
|
|
166
|
+
font-style: italic;
|
|
167
|
+
font-weight: 400;
|
|
168
|
+
font-display: swap;
|
|
169
|
+
src: url(https://cdn.fifthbell.com/content/fonts/jizMREVItHgc8qDIbSTKq4XkRiUawTk7f45UM9y05oZ8RNDM.ttf) format('truetype');
|
|
170
|
+
}
|
|
171
|
+
@font-face {
|
|
172
|
+
font-family: 'Libre Franklin';
|
|
173
|
+
font-style: italic;
|
|
174
|
+
font-weight: 500;
|
|
175
|
+
font-display: swap;
|
|
176
|
+
src: url(https://cdn.fifthbell.com/content/fonts/jizMREVItHgc8qDIbSTKq4XkRiUawTk7f45UM9y05oZORNDM.ttf) format('truetype');
|
|
177
|
+
}
|
|
178
|
+
@font-face {
|
|
179
|
+
font-family: 'Libre Franklin';
|
|
180
|
+
font-style: italic;
|
|
181
|
+
font-weight: 600;
|
|
182
|
+
font-display: swap;
|
|
183
|
+
src: url(https://cdn.fifthbell.com/content/fonts/jizMREVItHgc8qDIbSTKq4XkRiUawTk7f45UM9y05oaiQ9DM.ttf) format('truetype');
|
|
184
|
+
}
|
|
185
|
+
@font-face {
|
|
186
|
+
font-family: 'Libre Franklin';
|
|
187
|
+
font-style: italic;
|
|
188
|
+
font-weight: 700;
|
|
189
|
+
font-display: swap;
|
|
190
|
+
src: url(https://cdn.fifthbell.com/content/fonts/jizMREVItHgc8qDIbSTKq4XkRiUawTk7f45UM9y05oabQ9DM.ttf) format('truetype');
|
|
191
|
+
}
|
|
192
|
+
@font-face {
|
|
193
|
+
font-family: 'Libre Franklin';
|
|
194
|
+
font-style: italic;
|
|
195
|
+
font-weight: 800;
|
|
196
|
+
font-display: swap;
|
|
197
|
+
src: url(https://cdn.fifthbell.com/content/fonts/jizMREVItHgc8qDIbSTKq4XkRiUawTk7f45UM9y05ob8Q9DM.ttf) format('truetype');
|
|
198
|
+
}
|
|
199
|
+
@font-face {
|
|
200
|
+
font-family: 'Libre Franklin';
|
|
201
|
+
font-style: italic;
|
|
202
|
+
font-weight: 900;
|
|
203
|
+
font-display: swap;
|
|
204
|
+
src: url(https://cdn.fifthbell.com/content/fonts/jizMREVItHgc8qDIbSTKq4XkRiUawTk7f45UM9y05obVQ9DM.ttf) format('truetype');
|
|
205
|
+
}
|
|
206
|
+
@font-face {
|
|
207
|
+
font-family: 'Libre Franklin';
|
|
208
|
+
font-style: normal;
|
|
209
|
+
font-weight: 100;
|
|
210
|
+
font-display: swap;
|
|
211
|
+
src: url(https://cdn.fifthbell.com/content/fonts/jizOREVItHgc8qDIbSTKq4XkRg8T88bjFuXOnduhLsSUBw.ttf) format('truetype');
|
|
212
|
+
}
|
|
213
|
+
@font-face {
|
|
214
|
+
font-family: 'Libre Franklin';
|
|
215
|
+
font-style: normal;
|
|
216
|
+
font-weight: 200;
|
|
217
|
+
font-display: swap;
|
|
218
|
+
src: url(https://cdn.fifthbell.com/content/fonts/jizOREVItHgc8qDIbSTKq4XkRg8T88bjFuXOnduhrsWUBw.ttf) format('truetype');
|
|
219
|
+
}
|
|
220
|
+
@font-face {
|
|
221
|
+
font-family: 'Libre Franklin';
|
|
222
|
+
font-style: normal;
|
|
223
|
+
font-weight: 300;
|
|
224
|
+
font-display: swap;
|
|
225
|
+
src: url(https://cdn.fifthbell.com/content/fonts/jizOREVItHgc8qDIbSTKq4XkRg8T88bjFuXOnduhcMWUBw.ttf) format('truetype');
|
|
226
|
+
}
|
|
227
|
+
@font-face {
|
|
228
|
+
font-family: 'Libre Franklin';
|
|
229
|
+
font-style: normal;
|
|
230
|
+
font-weight: 400;
|
|
231
|
+
font-display: swap;
|
|
232
|
+
src: url(https://cdn.fifthbell.com/content/fonts/jizOREVItHgc8qDIbSTKq4XkRg8T88bjFuXOnduhLsWUBw.ttf) format('truetype');
|
|
233
|
+
}
|
|
234
|
+
@font-face {
|
|
235
|
+
font-family: 'Libre Franklin';
|
|
236
|
+
font-style: normal;
|
|
237
|
+
font-weight: 500;
|
|
238
|
+
font-display: swap;
|
|
239
|
+
src: url(https://cdn.fifthbell.com/content/fonts/jizOREVItHgc8qDIbSTKq4XkRg8T88bjFuXOnduhHMWUBw.ttf) format('truetype');
|
|
240
|
+
}
|
|
241
|
+
@font-face {
|
|
242
|
+
font-family: 'Libre Franklin';
|
|
243
|
+
font-style: normal;
|
|
244
|
+
font-weight: 600;
|
|
245
|
+
font-display: swap;
|
|
246
|
+
src: url(https://cdn.fifthbell.com/content/fonts/jizOREVItHgc8qDIbSTKq4XkRg8T88bjFuXOnduh8MKUBw.ttf) format('truetype');
|
|
247
|
+
}
|
|
248
|
+
@font-face {
|
|
249
|
+
font-family: 'Libre Franklin';
|
|
250
|
+
font-style: normal;
|
|
251
|
+
font-weight: 700;
|
|
252
|
+
font-display: swap;
|
|
253
|
+
src: url(https://cdn.fifthbell.com/content/fonts/jizOREVItHgc8qDIbSTKq4XkRg8T88bjFuXOnduhycKUBw.ttf) format('truetype');
|
|
254
|
+
}
|
|
255
|
+
@font-face {
|
|
256
|
+
font-family: 'Libre Franklin';
|
|
257
|
+
font-style: normal;
|
|
258
|
+
font-weight: 800;
|
|
259
|
+
font-display: swap;
|
|
260
|
+
src: url(https://cdn.fifthbell.com/content/fonts/jizOREVItHgc8qDIbSTKq4XkRg8T88bjFuXOnduhrsKUBw.ttf) format('truetype');
|
|
261
|
+
}
|
|
262
|
+
@font-face {
|
|
263
|
+
font-family: 'Libre Franklin';
|
|
264
|
+
font-style: normal;
|
|
265
|
+
font-weight: 900;
|
|
266
|
+
font-display: swap;
|
|
267
|
+
src: url(https://cdn.fifthbell.com/content/fonts/jizOREVItHgc8qDIbSTKq4XkRg8T88bjFuXOnduhh8KUBw.ttf) format('truetype');
|
|
268
|
+
}
|
|
269
|
+
@font-face {
|
|
270
|
+
font-family: 'Oswald';
|
|
271
|
+
font-style: normal;
|
|
272
|
+
font-weight: 200;
|
|
273
|
+
font-display: swap;
|
|
274
|
+
src: url(https://cdn.fifthbell.com/content/fonts/TK3_WkUHHAIjg75cFRf3bXL8LICs13FvgUE.ttf) format('truetype');
|
|
275
|
+
}
|
|
276
|
+
@font-face {
|
|
277
|
+
font-family: 'Oswald';
|
|
278
|
+
font-style: normal;
|
|
279
|
+
font-weight: 300;
|
|
280
|
+
font-display: swap;
|
|
281
|
+
src: url(https://cdn.fifthbell.com/content/fonts/TK3_WkUHHAIjg75cFRf3bXL8LICs169vgUE.ttf) format('truetype');
|
|
282
|
+
}
|
|
283
|
+
@font-face {
|
|
284
|
+
font-family: 'Oswald';
|
|
285
|
+
font-style: normal;
|
|
286
|
+
font-weight: 400;
|
|
287
|
+
font-display: swap;
|
|
288
|
+
src: url(https://cdn.fifthbell.com/content/fonts/TK3_WkUHHAIjg75cFRf3bXL8LICs1_FvgUE.ttf) format('truetype');
|
|
289
|
+
}
|
|
290
|
+
@font-face {
|
|
291
|
+
font-family: 'Oswald';
|
|
292
|
+
font-style: normal;
|
|
293
|
+
font-weight: 500;
|
|
294
|
+
font-display: swap;
|
|
295
|
+
src: url(https://cdn.fifthbell.com/content/fonts/TK3_WkUHHAIjg75cFRf3bXL8LICs18NvgUE.ttf) format('truetype');
|
|
296
|
+
}
|
|
297
|
+
@font-face {
|
|
298
|
+
font-family: 'Oswald';
|
|
299
|
+
font-style: normal;
|
|
300
|
+
font-weight: 600;
|
|
301
|
+
font-display: swap;
|
|
302
|
+
src: url(https://cdn.fifthbell.com/content/fonts/TK3_WkUHHAIjg75cFRf3bXL8LICs1y9ogUE.ttf) format('truetype');
|
|
303
|
+
}
|
|
304
|
+
@font-face {
|
|
305
|
+
font-family: 'Oswald';
|
|
306
|
+
font-style: normal;
|
|
307
|
+
font-weight: 700;
|
|
308
|
+
font-display: swap;
|
|
309
|
+
src: url(https://cdn.fifthbell.com/content/fonts/TK3_WkUHHAIjg75cFRf3bXL8LICs1xZogUE.ttf) format('truetype');
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
@font-face {
|
|
313
|
+
font-family: 'Encode Sans';
|
|
314
|
+
font-style: normal;
|
|
315
|
+
font-weight: 400;
|
|
316
|
+
font-stretch: normal;
|
|
317
|
+
font-display: swap;
|
|
318
|
+
src: url(https://cdn.fifthbell.com/content/fonts/LDIcapOFNxEwR-Bd1O9uYNmnUQomAgE25imKSbHhROjLsZBWTSrQGGHjZtU.ttf) format('truetype');
|
|
319
|
+
}
|
|
320
|
+
@font-face {
|
|
321
|
+
font-family: 'Encode Sans';
|
|
322
|
+
font-style: normal;
|
|
323
|
+
font-weight: 500;
|
|
324
|
+
font-stretch: normal;
|
|
325
|
+
font-display: swap;
|
|
326
|
+
src: url(https://cdn.fifthbell.com/content/fonts/LDIcapOFNxEwR-Bd1O9uYNmnUQomAgE25imKSbHhROjLsZBWTSrQGFPjZtU.ttf) format('truetype');
|
|
327
|
+
}
|
|
328
|
+
@font-face {
|
|
329
|
+
font-family: 'Encode Sans';
|
|
330
|
+
font-style: normal;
|
|
331
|
+
font-weight: 600;
|
|
332
|
+
font-stretch: normal;
|
|
333
|
+
font-display: swap;
|
|
334
|
+
src: url(https://cdn.fifthbell.com/content/fonts/LDIcapOFNxEwR-Bd1O9uYNmnUQomAgE25imKSbHhROjLsZBWTSrQGL_kZtU.ttf) format('truetype');
|
|
335
|
+
}
|
|
336
|
+
@font-face {
|
|
337
|
+
font-family: 'Encode Sans';
|
|
338
|
+
font-style: normal;
|
|
339
|
+
font-weight: 700;
|
|
340
|
+
font-stretch: normal;
|
|
341
|
+
font-display: swap;
|
|
342
|
+
src: url(https://cdn.fifthbell.com/content/fonts/LDIcapOFNxEwR-Bd1O9uYNmnUQomAgE25imKSbHhROjLsZBWTSrQGIbkZtU.ttf) format('truetype');
|
|
343
|
+
}
|
|
344
|
+
@font-face {
|
|
345
|
+
font-family: 'Encode Sans Condensed';
|
|
346
|
+
font-style: normal;
|
|
347
|
+
font-weight: 400;
|
|
348
|
+
font-display: swap;
|
|
349
|
+
src: url(https://cdn.fifthbell.com/content/fonts/j8_16_LD37rqfuwxyIuaZhE6cRXOLtm2gfTGgQ.ttf) format('truetype');
|
|
350
|
+
}
|
|
351
|
+
@font-face {
|
|
352
|
+
font-family: 'Encode Sans Condensed';
|
|
353
|
+
font-style: normal;
|
|
354
|
+
font-weight: 600;
|
|
355
|
+
font-display: swap;
|
|
356
|
+
src: url(https://cdn.fifthbell.com/content/fonts/j8_46_LD37rqfuwxyIuaZhE6cRXOLtm2gfT-WYupBw.ttf) format('truetype');
|
|
357
|
+
}
|
|
358
|
+
@font-face {
|
|
359
|
+
font-family: 'Encode Sans Condensed';
|
|
360
|
+
font-style: normal;
|
|
361
|
+
font-weight: 700;
|
|
362
|
+
font-display: swap;
|
|
363
|
+
src: url(https://cdn.fifthbell.com/content/fonts/j8_46_LD37rqfuwxyIuaZhE6cRXOLtm2gfT-PYqpBw.ttf) format('truetype');
|
|
364
|
+
}
|
|
365
|
+
@font-face {
|
|
366
|
+
font-family: 'Encode Sans Condensed';
|
|
367
|
+
font-style: normal;
|
|
368
|
+
font-weight: 800;
|
|
369
|
+
font-display: swap;
|
|
370
|
+
src: url(https://cdn.fifthbell.com/content/fonts/j8_46_LD37rqfuwxyIuaZhE6cRXOLtm2gfT-IYmpBw.ttf) format('truetype');
|
|
371
|
+
}
|
|
372
|
+
@font-face {
|
|
373
|
+
font-family: 'Encode Sans Condensed';
|
|
374
|
+
font-style: normal;
|
|
375
|
+
font-weight: 900;
|
|
376
|
+
font-display: swap;
|
|
377
|
+
src: url(https://cdn.fifthbell.com/content/fonts/j8_46_LD37rqfuwxyIuaZhE6cRXOLtm2gfT-BYipBw.ttf) format('truetype');
|
|
378
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { SelfReference } from './types/canonical-article.js';
|
|
2
|
+
/**
|
|
3
|
+
* Represents the pre-distributed article slots for the homepage.
|
|
4
|
+
*
|
|
5
|
+
* Featured slots (Landing[0,6,7] and MustRead[16,17,18]) are filled by
|
|
6
|
+
* `featured:true` articles published within the last 24 hours, ordered by
|
|
7
|
+
* date descending. If no such articles exist, all slots fall back to the
|
|
8
|
+
* general queue.
|
|
9
|
+
*
|
|
10
|
+
* The general queue contains:
|
|
11
|
+
* - Overflow featured articles (beyond the first 6, within 24h)
|
|
12
|
+
* - All remaining non-featured / older articles
|
|
13
|
+
* Sorted by date descending.
|
|
14
|
+
*
|
|
15
|
+
* Breaking News no longer reserves queue items; all queue ordering feeds
|
|
16
|
+
* Landing / Must Read / More Stories directly.
|
|
17
|
+
*/
|
|
18
|
+
export interface HomepageSlots {
|
|
19
|
+
landing: {
|
|
20
|
+
/** Featured slot 1 — large hero article (Landing headline 1) */
|
|
21
|
+
headline1: SelfReference | undefined;
|
|
22
|
+
/** Sub-snacks below headline 1 (4 items from queue) */
|
|
23
|
+
sub1: SelfReference[];
|
|
24
|
+
/** Dark-card feature (Landing card 5) */
|
|
25
|
+
card5: SelfReference | undefined;
|
|
26
|
+
/** Featured slot 2 — second prominent card (Landing headline 6) */
|
|
27
|
+
headline6: SelfReference | undefined;
|
|
28
|
+
/** Top Stories sidebar — first item is featured slot 3, rest from queue (6 items total) */
|
|
29
|
+
topStories: SelfReference[];
|
|
30
|
+
};
|
|
31
|
+
mustRead: {
|
|
32
|
+
/** Must Read wide leader article (not a featured slot) */
|
|
33
|
+
lead: SelfReference | undefined;
|
|
34
|
+
/** Featured slot 4 — first two-column card (Must Read headline 16) */
|
|
35
|
+
headline16: SelfReference | undefined;
|
|
36
|
+
/** Featured slot 5 — second two-column card (Must Read headline 17) */
|
|
37
|
+
headline17: SelfReference | undefined;
|
|
38
|
+
/** Must Read sidebar — first item is featured slot 6, rest from queue (7 items total) */
|
|
39
|
+
sidebar: SelfReference[];
|
|
40
|
+
};
|
|
41
|
+
/** More Stories grid (12 items from queue) */
|
|
42
|
+
moreStories: SelfReference[];
|
|
43
|
+
/** Deprecated compatibility field after candy-bar removal. Always empty. */
|
|
44
|
+
breakingNewsSnacks: SelfReference[];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Distribute homepage articles into named slots.
|
|
48
|
+
*
|
|
49
|
+
* @param articles Full list of article references from the document.
|
|
50
|
+
* @param now The reference time (default: current time). Exposed
|
|
51
|
+
* as a parameter so tests can pass a fixed instant.
|
|
52
|
+
* @param showBreakingNews Deprecated after candy-bar removal. Kept for
|
|
53
|
+
* compatibility and has no effect.
|
|
54
|
+
*/
|
|
55
|
+
export declare function distributeHomepageArticles(articles: SelfReference[], now?: Date, showBreakingNews?: boolean): HomepageSlots;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/** Return the best available date timestamp for an article, as epoch ms. */
|
|
2
|
+
function articleDateMs(article) {
|
|
3
|
+
const ts = article.publishedAt ?? article.updatedAt;
|
|
4
|
+
return ts ? new Date(ts).getTime() : 0;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Distribute homepage articles into named slots.
|
|
8
|
+
*
|
|
9
|
+
* @param articles Full list of article references from the document.
|
|
10
|
+
* @param now The reference time (default: current time). Exposed
|
|
11
|
+
* as a parameter so tests can pass a fixed instant.
|
|
12
|
+
* @param showBreakingNews Deprecated after candy-bar removal. Kept for
|
|
13
|
+
* compatibility and has no effect.
|
|
14
|
+
*/
|
|
15
|
+
export function distributeHomepageArticles(articles, now = new Date(), showBreakingNews = false) {
|
|
16
|
+
const FEATURED_SLOT_COUNT = 6;
|
|
17
|
+
const ONE_DAY_MS = 24 * 60 * 60 * 1000;
|
|
18
|
+
const cutoffMs = now.getTime() - ONE_DAY_MS;
|
|
19
|
+
// Articles that qualify for the 6 featured slots:
|
|
20
|
+
// featured:true AND published/updated within the last 24 hours,
|
|
21
|
+
// ordered newest-first.
|
|
22
|
+
const recentFeatured = articles
|
|
23
|
+
.filter((a) => a.featured === true && articleDateMs(a) >= cutoffMs)
|
|
24
|
+
.sort((a, b) => articleDateMs(b) - articleDateMs(a));
|
|
25
|
+
const featuredSlots = recentFeatured.slice(0, FEATURED_SLOT_COUNT);
|
|
26
|
+
const overflow = recentFeatured.slice(FEATURED_SLOT_COUNT);
|
|
27
|
+
const usedIds = new Set(featuredSlots.map((a) => a.id));
|
|
28
|
+
// General queue: overflow featured articles (beyond the 6 slots) followed by
|
|
29
|
+
// all other articles, sorted newest-first.
|
|
30
|
+
const others = articles.filter((a) => !usedIds.has(a.id));
|
|
31
|
+
const queue = [...overflow, ...others].sort((a, b) => articleDateMs(b) - articleDateMs(a));
|
|
32
|
+
let qi = 0;
|
|
33
|
+
const nextFromQueue = () => queue[qi++];
|
|
34
|
+
const nextNFromQueue = (n) => {
|
|
35
|
+
const result = queue.slice(qi, qi + n);
|
|
36
|
+
qi += result.length;
|
|
37
|
+
return result;
|
|
38
|
+
};
|
|
39
|
+
// A featured slot falls back to the queue if not enough featured articles
|
|
40
|
+
// are available.
|
|
41
|
+
const getFeatured = (index) => featuredSlots[index] ?? nextFromQueue();
|
|
42
|
+
// Breaking News no longer reserves queue items.
|
|
43
|
+
void showBreakingNews;
|
|
44
|
+
const breakingNewsSnacks = [];
|
|
45
|
+
// ── Landing ──────────────────────────────────────────────────────────────
|
|
46
|
+
const headline1 = getFeatured(0);
|
|
47
|
+
const sub1 = nextNFromQueue(4);
|
|
48
|
+
const card5 = nextFromQueue();
|
|
49
|
+
const headline6 = getFeatured(1);
|
|
50
|
+
const topStoriesHead = getFeatured(2);
|
|
51
|
+
const topStoriesTail = nextNFromQueue(5);
|
|
52
|
+
const topStories = [topStoriesHead, ...topStoriesTail].filter((a) => a !== undefined);
|
|
53
|
+
// ── Must Read ─────────────────────────────────────────────────────────────
|
|
54
|
+
const lead = nextFromQueue();
|
|
55
|
+
const headline16 = getFeatured(3);
|
|
56
|
+
const headline17 = getFeatured(4);
|
|
57
|
+
const sidebarHead = getFeatured(5);
|
|
58
|
+
const sidebarTail = nextNFromQueue(6);
|
|
59
|
+
const sidebar = [sidebarHead, ...sidebarTail].filter((a) => a !== undefined);
|
|
60
|
+
// ── More Stories ──────────────────────────────────────────────────────────
|
|
61
|
+
const moreStories = nextNFromQueue(12);
|
|
62
|
+
return {
|
|
63
|
+
landing: { headline1, sub1, card5, headline6, topStories },
|
|
64
|
+
mustRead: { lead, headline16, headline17, sidebar },
|
|
65
|
+
moreStories,
|
|
66
|
+
breakingNewsSnacks
|
|
67
|
+
};
|
|
68
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type InstagramImageTemplateParams = {
|
|
2
|
+
imageUrl: string;
|
|
3
|
+
title: string;
|
|
4
|
+
category?: string;
|
|
5
|
+
slug?: string;
|
|
6
|
+
url?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function registerInstagramImageHelpers(): void;
|
|
9
|
+
export declare function buildInstagramImageHtml(params: InstagramImageTemplateParams): string;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import Handlebars from 'handlebars';
|
|
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();
|
|
14
|
+
function isNodeRuntime() {
|
|
15
|
+
return typeof process !== 'undefined' && typeof process.versions?.node === 'string';
|
|
16
|
+
}
|
|
17
|
+
async function loadTemplateSource() {
|
|
18
|
+
if (isNodeRuntime()) {
|
|
19
|
+
const [{ readFileSync }, pathModule, { fileURLToPath }] = await Promise.all([
|
|
20
|
+
import('node:fs'),
|
|
21
|
+
import('node:path'),
|
|
22
|
+
import('node:url'),
|
|
23
|
+
]);
|
|
24
|
+
const currentFile = fileURLToPath(import.meta.url);
|
|
25
|
+
const currentDir = pathModule.dirname(currentFile);
|
|
26
|
+
const projectRoot = pathModule.resolve(currentDir, '..');
|
|
27
|
+
const filePath = pathModule.join(projectRoot, 'src', 'templates', 'templates', 'instagram-image.hbs');
|
|
28
|
+
return readFileSync(filePath, 'utf8');
|
|
29
|
+
}
|
|
30
|
+
const module = await import('./templates/templates/instagram-image.hbs?raw');
|
|
31
|
+
return module.default;
|
|
32
|
+
}
|
|
33
|
+
const template = Handlebars.compile(await loadTemplateSource());
|
|
34
|
+
function resolveCategoryName(params) {
|
|
35
|
+
if (params.category) {
|
|
36
|
+
return params.category.toUpperCase();
|
|
37
|
+
}
|
|
38
|
+
if (params.slug) {
|
|
39
|
+
return params.slug.replace(/-/g, ' ').toUpperCase();
|
|
40
|
+
}
|
|
41
|
+
return 'LATEST STORY';
|
|
42
|
+
}
|
|
43
|
+
export function buildInstagramImageHtml(params) {
|
|
44
|
+
const qrCodeHtml = params.url ? buildQrCodeHtml(params.url) : '';
|
|
45
|
+
return template({
|
|
46
|
+
imageUrl: params.imageUrl,
|
|
47
|
+
title: params.title,
|
|
48
|
+
categoryName: resolveCategoryName(params),
|
|
49
|
+
qrCodeHtml,
|
|
50
|
+
}).trim();
|
|
51
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './style.css';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/// <reference types="vite/client" />
|
|
3
|
+
import './style.css';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import ReactDOM from 'react-dom/client';
|
|
6
|
+
import LiveProgram from '../components/live-program/LiveProgram.js';
|
|
7
|
+
const root = document.getElementById('root');
|
|
8
|
+
if (root) {
|
|
9
|
+
ReactDOM.createRoot(root).render(_jsx(React.StrictMode, { children: _jsx(LiveProgram, { apiBaseUrl: import.meta.env.VITE_API_BASE_URL }) }));
|
|
10
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|