Skip to content

Commit 7d63d0f

Browse files
Apply grid to sub meta
Probably one to break out into its own PR
1 parent b1ddc05 commit 7d63d0f

2 files changed

Lines changed: 58 additions & 44 deletions

File tree

dotcom-rendering/src/components/SubMeta.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { grid } from '../grid';
1414
import { ArticleDesign, type ArticleFormat } from '../lib/articleFormat';
1515
import type { BaseLinkType } from '../model/extract-nav';
1616
import { palette } from '../palette';
17+
import { palette as themePalette } from '../palette';
1718
import { Island } from './Island';
1819
import { ShareButton } from './ShareButton.island';
1920

@@ -235,8 +236,22 @@ export const SubMeta = ({
235236
format.design === ArticleDesign.Gallery
236237
? galleryStyles
237238
: bottomPadding,
239+
grid.container,
240+
css`
241+
> * {
242+
${grid.column.centre}
243+
}
244+
`,
238245
]}
239246
>
247+
<StraightLines
248+
data-print-layout="hide"
249+
count={4}
250+
cssOverrides={css`
251+
display: block;
252+
`}
253+
color={themePalette('--straight-lines')}
254+
/>
240255
{format.design === ArticleDesign.Gallery && (
241256
<Fragment>
242257
<div css={galleryBorder}></div>

dotcom-rendering/src/layouts/StandardLayoutArticleGrid.tsx

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { css } from '@emotion/react';
22
import { log } from '@guardian/libs';
33
import { from, space, until } from '@guardian/source/foundations';
44
import { Hide } from '@guardian/source/react-components';
5-
import { StraightLines } from '@guardian/source-development-kitchen/react-components';
65
import { AffiliateDisclaimer } from '../components/AffiliateDisclaimer';
76
import { AppsEpic } from '../components/AppsEpic.island';
87
import { ArticleBody } from '../components/ArticleBody';
@@ -190,7 +189,17 @@ export const StandardLayoutArticleGrid = ({
190189
<GridItem area="standfirst" layoutType={layoutType}>
191190
<Standfirst format={format} standfirst={article.standfirst} />
192191
</GridItem>
193-
<GridItem area="meta" layoutType={layoutType} element="aside">
192+
<GridItem
193+
area="meta"
194+
layoutType={layoutType}
195+
element="aside"
196+
css={
197+
isInteractive &&
198+
css`
199+
z-index: 10;
200+
`
201+
}
202+
>
194203
<div css={stretchLines}>
195204
{isWeb &&
196205
format.theme === ArticleSpecial.Labs &&
@@ -373,14 +382,6 @@ export const StandardLayoutArticleGrid = ({
373382
/>
374383
</Island>
375384
)}
376-
<StraightLines
377-
data-print-layout="hide"
378-
count={4}
379-
cssOverrides={css`
380-
display: block;
381-
`}
382-
color={themePalette('--straight-lines')}
383-
/>
384385
<SubMeta
385386
format={format}
386387
subMetaKeywordLinks={article.subMetaKeywordLinks}
@@ -395,40 +396,38 @@ export const StandardLayoutArticleGrid = ({
395396
/>
396397
</ArticleContainer>
397398
</GridItem>
398-
{layoutType !== 'interactive' && (
399-
<GridItem
400-
area="right-column"
401-
layoutType={layoutType}
402-
css={css`
403-
padding-top: ${isMedia ? 0 : 6}px;
404-
${from.desktop} {
405-
padding-bottom: ${isMedia ? 41 : 0}px;
406-
}
407-
`}
408-
>
409-
<Hide until="desktop">
410-
<Island
411-
priority="feature"
412-
defer={{
413-
until: 'visible',
414-
// Provide a much higher value for the top margin for the intersection observer
415-
// This is because the most viewed would otherwise only be lazy loaded when the
416-
// bottom of the container intersects with the viewport
417-
rootMargin: '700px 100px',
418-
}}
419-
>
420-
<MostViewedRightWithAd
421-
format={format}
422-
isPaidContent={article.pageType.isPaidContent}
423-
renderAds={isWeb && renderAds}
424-
shouldHideReaderRevenue={
425-
!!article.config.shouldHideReaderRevenue
426-
}
427-
/>
428-
</Island>
429-
</Hide>
430-
</GridItem>
431-
)}
399+
<GridItem
400+
area="right-column"
401+
layoutType={layoutType}
402+
css={css`
403+
padding-top: ${isMedia ? 0 : 6}px;
404+
${from.desktop} {
405+
padding-bottom: ${isMedia ? 41 : 0}px;
406+
}
407+
`}
408+
>
409+
<Hide until="desktop">
410+
<Island
411+
priority="feature"
412+
defer={{
413+
until: 'visible',
414+
// Provide a much higher value for the top margin for the intersection observer
415+
// This is because the most viewed would otherwise only be lazy loaded when the
416+
// bottom of the container intersects with the viewport
417+
rootMargin: '700px 100px',
418+
}}
419+
>
420+
<MostViewedRightWithAd
421+
format={format}
422+
isPaidContent={article.pageType.isPaidContent}
423+
renderAds={isWeb && renderAds}
424+
shouldHideReaderRevenue={
425+
!!article.config.shouldHideReaderRevenue
426+
}
427+
/>
428+
</Island>
429+
</Hide>
430+
</GridItem>
432431
</article>
433432
);
434433
};

0 commit comments

Comments
 (0)