@@ -16,6 +16,7 @@ import { ArticleMetaApps } from '../components/ArticleMeta.apps';
1616import { ArticleMeta } from '../components/ArticleMeta.web' ;
1717import { ArticleTitle } from '../components/ArticleTitle' ;
1818import { Caption } from '../components/Caption' ;
19+ import { Carousel } from '../components/Carousel.importable' ;
1920import { DiscussionLayout } from '../components/DiscussionLayout' ;
2021import { Footer } from '../components/Footer' ;
2122import { DesktopAdSlot , MobileAdSlot } from '../components/GalleryAdSlots' ;
@@ -35,7 +36,7 @@ import { canRenderAds } from '../lib/canRenderAds';
3536import { getContributionsServiceUrl } from '../lib/contributions' ;
3637import { decideMainMediaCaption } from '../lib/decide-caption' ;
3738import type { NavType } from '../model/extract-nav' ;
38- import { palette as themePalette } from '../palette' ;
39+ import { palette } from '../palette' ;
3940import type { Gallery } from '../types/article' ;
4041import type { RenderingTarget } from '../types/renderingTarget' ;
4142import { BannerWrapper , Stuck } from './lib/stickiness' ;
@@ -56,10 +57,10 @@ interface AppProps extends Props {
5657
5758const headerStyles = css `
5859 ${ grid . container }
59- background-color : ${ themePalette ( '--article-inner-background' ) } ;
60+ background-color : ${ palette ( '--article-inner-background' ) } ;
6061
6162 ${ from . tablet } {
62- border-bottom : 1px solid ${ themePalette ( '--article-border' ) } ;
63+ border-bottom : 1px solid ${ palette ( '--article-border' ) } ;
6364 }
6465` ;
6566
@@ -75,19 +76,19 @@ const metaAndDisclaimerContainer = css`
7576 top : 0 ;
7677 bottom : 0 ;
7778 width : 1px ;
78- background-color : ${ themePalette ( '--article-border' ) } ;
79+ background-color : ${ palette ( '--article-border' ) } ;
7980 }
8081 }
8182` ;
8283
8384const galleryItemAdvertStyles = css `
8485 ${ grid . paddedContainer }
8586 grid-auto-flow : row dense;
86- background-color : ${ themePalette ( '--article-inner-background' ) } ;
87+ background-color : ${ palette ( '--article-inner-background' ) } ;
8788
8889 ${ from . tablet } {
89- border-left : 1px solid ${ themePalette ( '--article-border' ) } ;
90- border-right : 1px solid ${ themePalette ( '--article-border' ) } ;
90+ border-left : 1px solid ${ palette ( '--article-border' ) } ;
91+ border-right : 1px solid ${ palette ( '--article-border' ) } ;
9192 }
9293` ;
9394
@@ -116,7 +117,7 @@ const galleryBorder = css`
116117 top : 0 ;
117118 bottom : 0 ;
118119 width : 1px ;
119- background-color : ${ themePalette ( '--article-border' ) } ;
120+ background-color : ${ palette ( '--article-border' ) } ;
120121 }
121122 }
122123
@@ -130,7 +131,7 @@ const galleryBorder = css`
130131 top : 0 ;
131132 bottom : 0 ;
132133 width : 1px ;
133- background-color : ${ themePalette ( '--article-border' ) } ;
134+ background-color : ${ palette ( '--article-border' ) } ;
134135 }
135136 }
136137` ;
@@ -170,6 +171,7 @@ export const GalleryLayout = (props: WebProps | AppProps) => {
170171 const isLabs = format . theme === ArticleSpecial . Labs ;
171172
172173 const renderAds = canRenderAds ( frontendData ) ;
174+ const showMerchandisingHigh = isWeb && renderAds && ! isLabs ;
173175
174176 const contributionsServiceUrl = getContributionsServiceUrl ( frontendData ) ;
175177
@@ -229,7 +231,7 @@ export const GalleryLayout = (props: WebProps | AppProps) => {
229231
230232 < main
231233 css = { {
232- backgroundColor : themePalette ( '--article-background' ) ,
234+ backgroundColor : palette ( '--article-background' ) ,
233235 } }
234236 >
235237 { isApps && renderAds && (
@@ -378,14 +380,15 @@ export const GalleryLayout = (props: WebProps | AppProps) => {
378380 }
379381 />
380382 </ main >
381- { isWeb && renderAds && ! isLabs && (
383+ { /* More galleries container */ }
384+ { showMerchandisingHigh && (
382385 < Section
383386 fullWidth = { true }
384387 data-print-layout = "hide"
385388 padSides = { false }
386389 showTopBorder = { false }
387390 showSideBorders = { false }
388- backgroundColour = { themePalette ( '--ad-background' ) }
391+ backgroundColour = { palette ( '--ad-background' ) }
389392 element = "aside"
390393 >
391394 < AdSlot
@@ -395,17 +398,25 @@ export const GalleryLayout = (props: WebProps | AppProps) => {
395398 />
396399 </ Section >
397400 ) }
401+ < StoryPackage
402+ absoluteServerTimes = { switches [ 'absoluteServerTimes' ] ?? false }
403+ discussionApiUrl = { discussionApiUrl }
404+ format = { format }
405+ renderingTarget = { renderingTarget }
406+ storyPackage = { gallery . storyPackage }
407+ topBorder = { showMerchandisingHigh }
408+ />
398409 { /** More Galleries container goes here */ }
399410 { showComments && (
400411 < Section
401412 fullWidth = { true }
402413 sectionId = "comments"
403414 element = "section"
404- backgroundColour = { themePalette (
415+ backgroundColour = { palette (
405416 '--discussion-section-background' ,
406417 ) }
407- borderColour = { themePalette ( '--article-border' ) }
408- fontColour = { themePalette ( '--discussion-text' ) }
418+ borderColour = { palette ( '--article-border' ) }
419+ fontColour = { palette ( '--discussion-text' ) }
409420 >
410421 < DiscussionLayout
411422 discussionApiUrl = { frontendData . config . discussionApiUrl }
@@ -432,7 +443,7 @@ export const GalleryLayout = (props: WebProps | AppProps) => {
432443 padSides = { false }
433444 showTopBorder = { false }
434445 showSideBorders = { false }
435- backgroundColour = { themePalette ( '--ad-background' ) }
446+ backgroundColour = { palette ( '--ad-background' ) }
436447 element = "aside"
437448 >
438449 < AdSlot position = "merchandising" display = { format . display } />
@@ -487,9 +498,7 @@ export const GalleryLayout = (props: WebProps | AppProps) => {
487498 { isApps && (
488499 < div
489500 css = { {
490- backgroundColor : themePalette (
491- '--apps-footer-background' ,
492- ) ,
501+ backgroundColor : palette ( '--apps-footer-background' ) ,
493502 } }
494503 >
495504 < Island priority = "critical" >
@@ -500,3 +509,40 @@ export const GalleryLayout = (props: WebProps | AppProps) => {
500509 </ >
501510 ) ;
502511} ;
512+
513+ const StoryPackage = ( {
514+ storyPackage,
515+ format,
516+ discussionApiUrl,
517+ absoluteServerTimes,
518+ renderingTarget,
519+ topBorder,
520+ } : {
521+ storyPackage : Gallery [ 'storyPackage' ] ;
522+ format : ArticleFormat ;
523+ discussionApiUrl : string ;
524+ absoluteServerTimes : boolean ;
525+ renderingTarget : RenderingTarget ;
526+ topBorder : boolean ;
527+ } ) =>
528+ storyPackage === undefined ? null : (
529+ < Section
530+ fullWidth = { true }
531+ backgroundColour = { palette ( '--article-section-background' ) }
532+ borderColour = { palette ( '--onward-content-border' ) }
533+ showTopBorder = { topBorder }
534+ >
535+ < Island priority = "feature" defer = { { until : 'visible' } } >
536+ < Carousel
537+ heading = { storyPackage . heading }
538+ trails = { storyPackage . trails }
539+ onwardsSource = "more-on-this-story"
540+ format = { format }
541+ leftColSize = "compact"
542+ discussionApiUrl = { discussionApiUrl }
543+ absoluteServerTimes = { absoluteServerTimes }
544+ renderingTarget = { renderingTarget }
545+ />
546+ </ Island >
547+ </ Section >
548+ ) ;
0 commit comments