@@ -26,6 +26,9 @@ import { Island } from '../components/Island';
2626import { LabsHeader } from '../components/LabsHeader' ;
2727import { MainMediaGallery } from '../components/MainMediaGallery' ;
2828import { Masthead } from '../components/Masthead/Masthead' ;
29+ import { MostViewedFooterData } from '../components/MostViewedFooterData.importable' ;
30+ import { MostViewedFooterLayout } from '../components/MostViewedFooterLayout' ;
31+ import { OnwardsUpper } from '../components/OnwardsUpper.importable' ;
2932import { Section } from '../components/Section' ;
3033import { Standfirst } from '../components/Standfirst' ;
3134import { StickyBottomBanner } from '../components/StickyBottomBanner.importable' ;
@@ -178,6 +181,7 @@ export const GalleryLayout = (props: WebProps | AppProps) => {
178181 const showComments =
179182 frontendData . isCommentable && ! frontendData . config . isPaidContent ;
180183
184+ const { absoluteServerTimes = false } = switches ;
181185 return (
182186 < >
183187 { isWeb && (
@@ -399,13 +403,36 @@ export const GalleryLayout = (props: WebProps | AppProps) => {
399403 </ Section >
400404 ) }
401405 < StoryPackage
402- absoluteServerTimes = { switches [ ' absoluteServerTimes' ] ?? false }
406+ absoluteServerTimes = { absoluteServerTimes }
403407 discussionApiUrl = { discussionApiUrl }
404408 format = { format }
405409 renderingTarget = { renderingTarget }
406410 storyPackage = { gallery . storyPackage }
407411 topBorder = { showMerchandisingHigh }
408412 />
413+
414+ < Island priority = "feature" defer = { { until : 'visible' } } >
415+ < OnwardsUpper
416+ ajaxUrl = { frontendData . config . ajaxUrl }
417+ hasRelated = { frontendData . hasRelated }
418+ hasStoryPackage = { frontendData . hasStoryPackage }
419+ isAdFreeUser = { frontendData . isAdFreeUser }
420+ pageId = { frontendData . pageId }
421+ isPaidContent = { ! ! frontendData . config . isPaidContent }
422+ showRelatedContent = { frontendData . config . showRelatedContent }
423+ keywordIds = { frontendData . config . keywordIds }
424+ contentType = { frontendData . contentType }
425+ tags = { frontendData . tags }
426+ format = { format }
427+ pillar = { format . theme }
428+ editionId = { frontendData . editionId }
429+ shortUrlId = { frontendData . config . shortUrlId }
430+ discussionApiUrl = { frontendData . config . discussionApiUrl }
431+ absoluteServerTimes = { absoluteServerTimes }
432+ renderingTarget = { renderingTarget }
433+ />
434+ </ Island >
435+
409436 { /** More Galleries container goes here */ }
410437 { showComments && (
411438 < Section
@@ -436,7 +463,30 @@ export const GalleryLayout = (props: WebProps | AppProps) => {
436463 />
437464 </ Section >
438465 ) }
439- { /** Most Popular container goes here */ }
466+ { ! frontendData . pageType . isPaidContent && (
467+ < Section
468+ title = "Most viewed"
469+ padContent = { false }
470+ verticalMargins = { false }
471+ element = "aside"
472+ data-link-name = "most-popular"
473+ data-component = "most-popular"
474+ backgroundColour = { palette ( '--article-section-background' ) }
475+ borderColour = { palette ( '--article-border' ) }
476+ fontColour = { palette ( '--article-section-title' ) }
477+ >
478+ < MostViewedFooterLayout renderAds = { isWeb && renderAds } >
479+ < Island priority = "feature" defer = { { until : 'visible' } } >
480+ < MostViewedFooterData
481+ sectionId = { frontendData . config . section }
482+ ajaxUrl = { frontendData . config . ajaxUrl }
483+ edition = { frontendData . editionId }
484+ />
485+ </ Island >
486+ </ MostViewedFooterLayout >
487+ </ Section >
488+ ) }
489+
440490 { isWeb && renderAds && ! isLabs && (
441491 < Section
442492 fullWidth = { true }
0 commit comments