66} from '@guardian/source/foundations' ;
77import { HostedContentHeader } from '../components/HostedContentHeader' ;
88import { Island } from '../components/Island' ;
9+ import { MainMedia } from '../components/MainMedia' ;
910import { Section } from '../components/Section' ;
1011import { ShareButton } from '../components/ShareButton.importable' ;
1112import { grid } from '../grid' ;
@@ -50,10 +51,8 @@ const shareButtonWrapper = css`
5051
5152export const HostedArticleLayout = ( props : WebProps | AppProps ) => {
5253 const {
53- content : {
54- frontendData : { headline, standfirst, pageId, webTitle } ,
55- } ,
5654 format,
55+ content : { frontendData : article } ,
5756 } = props ;
5857
5958 return (
@@ -82,17 +81,33 @@ export const HostedArticleLayout = (props: WebProps | AppProps) => {
8281 css = { [
8382 grid . column . all ,
8483 css `
85- min-height : 200px ;
84+ overflow : hidden;
85+ max-height : 400px ;
8686 ` ,
8787 ] }
8888 >
89- Main media
89+ < MainMedia
90+ format = { format }
91+ elements = { article . mainMediaElements }
92+ host = { article . config . host }
93+ pageId = { article . pageId }
94+ webTitle = { article . webTitle }
95+ ajaxUrl = { article . config . ajaxUrl }
96+ abTests = { article . config . abTests }
97+ switches = { article . config . switches }
98+ isAdFreeUser = { article . isAdFreeUser }
99+ isSensitive = { article . config . isSensitive }
100+ editionId = { article . editionId }
101+ hideCaption = { true }
102+ shouldHideAds = { true }
103+ contentType = { article . contentType }
104+ />
90105 </ div >
91106 < div
92107 css = { [ grid . between ( 'centre-column-start' , 'grid-end' ) ] }
93108 >
94109 { /** @todo Use ArticleHeadline component */ }
95- { headline }
110+ { article . headline }
96111 </ div >
97112 </ header >
98113 < div
@@ -115,8 +130,8 @@ export const HostedArticleLayout = (props: WebProps | AppProps) => {
115130 defer = { { until : 'visible' } }
116131 >
117132 < ShareButton
118- pageId = { pageId }
119- webTitle = { webTitle }
133+ pageId = { article . pageId }
134+ webTitle = { article . webTitle }
120135 format = { format }
121136 context = "ArticleMeta"
122137 />
@@ -128,7 +143,7 @@ export const HostedArticleLayout = (props: WebProps | AppProps) => {
128143 Onward content
129144 </ div >
130145 < div css = { [ border , grid . column . centre , 'grid-row: 1' ] } >
131- { standfirst }
146+ { article . standfirst }
132147 </ div >
133148 < div css = { [ border , grid . column . centre ] } > Meta</ div >
134149 < article css = { [ border , grid . column . centre ] } > Body</ article >
0 commit comments