Skip to content

Commit b9a0adf

Browse files
Rebase tidy
1 parent c002ef8 commit b9a0adf

2 files changed

Lines changed: 21 additions & 56 deletions

File tree

dotcom-rendering/src/layouts/StandardLayout.tsx

Lines changed: 19 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ import type { ArticleDeprecated } from '../types/article';
6060
import type { RenderingTarget } from '../types/renderingTarget';
6161
import { type Area, gridCss, type LayoutType } from './lib/furnitureLayouts';
6262
import { BannerWrapper, Stuck } from './lib/stickiness';
63-
import { Grid } from 'src/components/Masthead/Titlepiece/Grid';
6463

6564
const stretchLines = css`
6665
${until.phablet} {
@@ -168,11 +167,7 @@ export const StandardLayout = (props: WebProps | AppProps) => {
168167

169168
const renderAds = canRenderAds(article);
170169

171-
const layoutType: LayoutType = isMatchReport
172-
? 'matchReport'
173-
: isMedia
174-
? 'media'
175-
: 'standard';
170+
const layoutType: LayoutType = isMedia ? 'media' : 'standard';
176171

177172
return (
178173
<>
@@ -245,12 +240,20 @@ export const StandardLayout = (props: WebProps | AppProps) => {
245240
pageId={article.pageId}
246241
pageTags={article.tags}
247242
/>
248-
<article css={css(grid.container)}>
249-
<GridItem
250-
area="main-media"
251-
layoutType={layoutType}
252-
element="div"
253-
>
243+
<article
244+
css={css([
245+
css`
246+
background-color: ${themePalette(
247+
'--article-background',
248+
)};
249+
`,
250+
grid.container,
251+
grid.verticalRules({
252+
centre: isLabs ? false : true,
253+
}),
254+
])}
255+
>
256+
<GridItem area="main-media" layoutType={layoutType}>
254257
<MainMedia
255258
format={format}
256259
elements={article.mainMediaElements}
@@ -283,11 +286,7 @@ export const StandardLayout = (props: WebProps | AppProps) => {
283286
isMatch={!!footballMatchUrl}
284287
/>
285288
</GridItem>
286-
<GridItem
287-
area="headline"
288-
layoutType={layoutType}
289-
element="div"
290-
>
289+
<GridItem area="headline" layoutType={layoutType}>
291290
<ArticleHeadline
292291
format={format}
293292
headlineString={article.headline}
@@ -299,11 +298,7 @@ export const StandardLayout = (props: WebProps | AppProps) => {
299298
starRating={article.starRating}
300299
/>
301300
</GridItem>
302-
<GridItem
303-
area="standfirst"
304-
layoutType={layoutType}
305-
element="div"
306-
>
301+
<GridItem area="standfirst" layoutType={layoutType}>
307302
<Standfirst
308303
format={format}
309304
standfirst={article.standfirst}
@@ -402,25 +397,10 @@ export const StandardLayout = (props: WebProps | AppProps) => {
402397
article.mainMediaElements
403398
}
404399
/>
405-
<MatchInfoContainer
406-
isMatchReport={isMatchReport}
407-
footballMatchStatsUrl={
408-
footballMatchStatsUrl
409-
}
410-
/>
411-
412-
{isApps && (
413-
<Island
414-
priority="critical"
415-
defer={{ until: 'visible' }}
416-
>
417-
<AppsEpic />
418-
</Island>
419-
)}
420400
</>
421401
)}
422402
</GridItem>
423-
<GridItem area="body" layoutType={layoutType} element="div">
403+
<GridItem area="body" layoutType={layoutType}>
424404
{/* Only show Listen to Article button on App landscape views */}
425405
{isApps && (
426406
<Hide until="leftCol">
@@ -519,6 +499,7 @@ export const StandardLayout = (props: WebProps | AppProps) => {
519499
!!article.config.switches
520500
.articleEndSlot
521501
}
502+
isSensitive={article.config.isSensitive}
522503
/>
523504
</Island>
524505
)}

dotcom-rendering/src/layouts/lib/furnitureLayouts.ts

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,16 @@ import { css, type SerializedStyles } from '@emotion/react';
22
import { from, until } from '@guardian/source/foundations';
33
import { type ColumnPreset, grid, type Line } from '../../grid';
44

5-
export type LayoutType = 'standard' | 'matchReport' | 'media';
5+
export type LayoutType = 'standard' | 'media';
66

77
export type Area =
8-
// Common areas
98
| 'title'
109
| 'headline'
1110
| 'standfirst'
1211
| 'main-media'
1312
| 'meta'
1413
| 'body'
15-
| 'right-column'
16-
// Match report specific area
17-
| 'match-summary';
14+
| 'right-column';
1815

1916
type Breakpoint = 'mobile' | 'tablet' | 'desktop' | 'leftCol';
2017

@@ -57,18 +54,6 @@ const furnitureRowLayouts: Record<LayoutType, LayoutDefinition> = {
5754
['meta', 'body', 'right-column'],
5855
],
5956
},
60-
61-
matchReport: {
62-
tablet: [['match-summary'], ...tabletVanillaRows],
63-
desktop: [['match-summary', 'right-column'], ...desktopVanillaRows],
64-
leftCol: [
65-
['title', 'match-summary', 'right-column'],
66-
['headline', 'right-column'],
67-
['meta', 'main-media', 'right-column'],
68-
['meta', 'body', 'right-column'],
69-
],
70-
},
71-
7257
media: {
7358
mobile: mediaRowsUntilDesktop,
7459
tablet: mediaRowsUntilDesktop,
@@ -110,7 +95,6 @@ const furnitureColumnLayouts: Record<LayoutType, ColumnLayoutMap> = {
11095
desktop: ['centre-column-start', 'right-column-start'],
11196
},
11297
},
113-
matchReport: furnitureColumnDefaults,
11498
};
11599

116100
// Types

0 commit comments

Comments
 (0)