@@ -19,6 +19,7 @@ import { DesktopAdSlot, MobileAdSlot } from '../components/GalleryAdSlots';
1919import { GalleryImage } from '../components/GalleryImage' ;
2020import { HeaderAdSlot } from '../components/HeaderAdSlot' ;
2121import { Island } from '../components/Island' ;
22+ import { LabsHeader } from '../components/LabsHeader' ;
2223import { MainMediaGallery } from '../components/MainMediaGallery' ;
2324import { Masthead } from '../components/Masthead/Masthead' ;
2425import { Section } from '../components/Section' ;
@@ -51,12 +52,6 @@ interface AppProps extends Props {
5152 renderingTarget : 'Apps' ;
5253}
5354
54- const border = css ( {
55- borderWidth : 1 ,
56- borderStyle : 'solid' ,
57- color : '#ccc' ,
58- } ) ;
59-
6055const headerStyles = css `
6156 ${ grid . container }
6257 background-color : ${ themePalette ( '--article-inner-background' ) } ;
@@ -140,6 +135,23 @@ const galleryBorder = css`
140135
141136export const GalleryLayout = ( props : WebProps | AppProps ) => {
142137 const { gallery, renderingTarget } = props ;
138+
139+ const {
140+ config : {
141+ abTests,
142+ idUrl,
143+ mmaUrl,
144+ discussionApiUrl,
145+ idApiUrl,
146+ shortUrlId,
147+ isPreview,
148+ isSensitive,
149+ section,
150+ switches,
151+ } ,
152+ editionId,
153+ } = gallery . frontendData ;
154+
143155 const frontendData = gallery . frontendData ;
144156
145157 const isWeb = renderingTarget === 'Web' ;
@@ -176,36 +188,49 @@ export const GalleryLayout = (props: WebProps | AppProps) => {
176188 padSides = { false }
177189 shouldCenter = { false }
178190 >
179- < HeaderAdSlot
180- abTests = { frontendData . config . abTests }
181- />
191+ < HeaderAdSlot abTests = { abTests } />
182192 </ Section >
183193 </ Stuck >
184194 ) }
185195 < Masthead
186196 nav = { props . NAV }
187- editionId = { frontendData . editionId }
188- idUrl = { frontendData . config . idUrl }
189- mmaUrl = { frontendData . config . mmaUrl }
190- discussionApiUrl = { frontendData . config . discussionApiUrl }
191- idApiUrl = { frontendData . config . idApiUrl }
197+ editionId = { editionId }
198+ idUrl = { idUrl }
199+ mmaUrl = { mmaUrl }
200+ discussionApiUrl = { discussionApiUrl }
201+ idApiUrl = { idApiUrl }
192202 contributionsServiceUrl = {
193203 frontendData . contributionsServiceUrl
194204 }
195- showSubNav = { false }
205+ showSubNav = { ! isLabs }
196206 showSlimNav = { true }
197207 hasPageSkin = { false }
198208 hasPageSkinContentSelfConstrain = { false }
199209 pageId = { frontendData . pageId }
200210 />
201211 </ div >
202212 ) }
213+
214+ { format . theme === ArticleSpecial . Labs && (
215+ < Stuck >
216+ < Section
217+ fullWidth = { true }
218+ showTopBorder = { false }
219+ backgroundColour = { sourcePalette . labs [ 400 ] }
220+ borderColour = { sourcePalette . neutral [ 60 ] }
221+ sectionId = "labs-header"
222+ element = "aside"
223+ >
224+ < LabsHeader editionId = { editionId } />
225+ </ Section >
226+ </ Stuck >
227+ ) }
228+
203229 < main
204230 css = { {
205231 backgroundColor : themePalette ( '--article-background' ) ,
206232 } }
207233 >
208- < div css = { border } > Labs header</ div >
209234 < header css = { headerStyles } >
210235 < MainMediaGallery
211236 mainMedia = { gallery . mainMedia }
@@ -257,10 +282,8 @@ export const GalleryLayout = (props: WebProps | AppProps) => {
257282 frontendData . webPublicationSecondaryDateDisplay
258283 }
259284 isCommentable = { frontendData . isCommentable }
260- discussionApiUrl = {
261- frontendData . config . discussionApiUrl
262- }
263- shortUrlId = { frontendData . config . shortUrlId }
285+ discussionApiUrl = { discussionApiUrl }
286+ shortUrlId = { shortUrlId }
264287 />
265288 ) : null }
266289 { isApps ? (
@@ -281,10 +304,8 @@ export const GalleryLayout = (props: WebProps | AppProps) => {
281304 frontendData . webPublicationSecondaryDateDisplay
282305 }
283306 isCommentable = { frontendData . isCommentable }
284- discussionApiUrl = {
285- frontendData . config . discussionApiUrl
286- }
287- shortUrlId = { frontendData . config . shortUrlId }
307+ discussionApiUrl = { discussionApiUrl }
308+ shortUrlId = { shortUrlId }
288309 />
289310 ) : null }
290311 </ div >
@@ -396,23 +417,21 @@ export const GalleryLayout = (props: WebProps | AppProps) => {
396417 contributionsServiceUrl = {
397418 contributionsServiceUrl
398419 }
399- idApiUrl = { frontendData . config . idApiUrl }
420+ idApiUrl = { idApiUrl }
400421 isMinuteArticle = {
401422 frontendData . pageType . isMinuteArticle
402423 }
403424 isPaidContent = {
404425 frontendData . pageType . isPaidContent
405426 }
406- isPreview = { ! ! frontendData . config . isPreview }
407- isSensitive = { frontendData . config . isSensitive }
427+ isPreview = { ! ! isPreview }
428+ isSensitive = { isSensitive }
408429 pageId = { frontendData . pageId }
409- sectionId = { frontendData . config . section }
430+ sectionId = { section }
410431 shouldHideReaderRevenue = {
411432 frontendData . shouldHideReaderRevenue
412433 }
413- remoteBannerSwitch = {
414- ! ! frontendData . config . switches . remoteBanner
415- }
434+ remoteBannerSwitch = { ! ! switches . remoteBanner }
416435 tags = { frontendData . tags }
417436 />
418437 </ Island >
0 commit comments