Skip to content

Commit 4b67790

Browse files
authored
Add main media component to hosted article layout (#15340)
* add basic main media placeholder for hosted article layout * fix grid alignment from leftCol + add comment to address low res images from main media component
1 parent 24db92f commit 4b67790

1 file changed

Lines changed: 25 additions & 2 deletions

File tree

dotcom-rendering/src/layouts/HostedArticleLayout.tsx

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { ArticleHeadline } from '../components/ArticleHeadline';
88
import { Caption } from '../components/Caption';
99
import { HostedContentHeader } from '../components/HostedContentHeader';
1010
import { Island } from '../components/Island';
11+
import { MainMedia } from '../components/MainMedia';
1112
import { Section } from '../components/Section';
1213
import { ShareButton } from '../components/ShareButton.importable';
1314
import { Standfirst } from '../components/Standfirst';
@@ -87,11 +88,33 @@ export const HostedArticleLayout = (props: WebProps | AppProps) => {
8788
css={[
8889
grid.column.all,
8990
css`
90-
min-height: 200px;
91+
overflow: hidden;
92+
max-height: 400px;
93+
${from.leftCol} {
94+
${grid.between(
95+
'left-column-start',
96+
'right-column-end',
97+
)}
98+
}
9199
`,
92100
]}
93101
>
94-
Main media
102+
<MainMedia
103+
format={format}
104+
elements={frontendData.mainMediaElements}
105+
host={frontendData.config.host}
106+
pageId={frontendData.pageId}
107+
webTitle={frontendData.webTitle}
108+
ajaxUrl={frontendData.config.ajaxUrl}
109+
abTests={frontendData.config.abTests}
110+
switches={frontendData.config.switches}
111+
isAdFreeUser={frontendData.isAdFreeUser}
112+
isSensitive={frontendData.config.isSensitive}
113+
editionId={frontendData.editionId}
114+
hideCaption={true}
115+
shouldHideAds={true}
116+
contentType={frontendData.contentType}
117+
/>
95118
</div>
96119
<div
97120
css={[

0 commit comments

Comments
 (0)