Skip to content
Open
11 changes: 7 additions & 4 deletions dotcom-rendering/src/components/ArticleHeadline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -966,10 +966,13 @@ export const ArticleHeadline = ({
case ArticleDesign.Picture:
return (
<div
css={decideBottomPadding({
format,
hasAvatar,
})}
css={[
decideBottomPadding({
format,
hasAvatar,
}),
maxWidth,
]}
>
<DesignTag format={format} />
<h1
Expand Down
19 changes: 16 additions & 3 deletions dotcom-rendering/src/components/DecideLines.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
type Props = {
format: ArticleFormat;
color?: string;
displayingAvatar?: boolean;
};

type DottedLinesProps = { color?: string; count: number };
Expand Down Expand Up @@ -40,12 +41,24 @@ const DottedLines = ({
></div>
);

export const DecideLines = ({ format, color }: Props) => {
const count = format.design === ArticleDesign.Comment ? 8 : 4;
export const DecideLines = ({ format, color, displayingAvatar }: Props) => {
const count =
format.design === ArticleDesign.Comment || displayingAvatar ? 8 : 4;

switch (format.theme) {
case Pillar.Sport:
return <DottedLines count={count} color={color} />;
if (format.design !== ArticleDesign.Picture) {
return <DottedLines count={count} color={color} />;
}
return (
<StraightLines
cssOverrides={css`
display: block;
`}
count={count}
color={color}
/>
);
default:
return (
<StraightLines
Expand Down
7 changes: 7 additions & 0 deletions dotcom-rendering/src/components/MainMedia.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ const chooseWrapper = (format: ArticleFormat) => {
return noGutters;
}
}
case ArticleDisplay.Showcase:
switch (format.design) {
case ArticleDesign.Picture:
return '';
default:
return noGutters;
}
default:
return noGutters;
}
Expand Down
20 changes: 0 additions & 20 deletions dotcom-rendering/src/layouts/DecideLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { ImmersiveLayout } from './ImmersiveLayout';
import { InteractiveLayout } from './InteractiveLayout';
import { LiveLayout } from './LiveLayout';
import { NewsletterSignupLayout } from './NewsletterSignupLayout';
import { PictureLayout } from './PictureLayout';
import { StandardLayout } from './StandardLayout';

interface BaseProps {
Expand Down Expand Up @@ -101,15 +100,6 @@ const DecideLayoutApps = ({ article, renderingTarget }: AppProps) => {
serverTime={serverTime}
/>
);
case ArticleDesign.Picture:
return (
<PictureLayout
article={article.frontendData}
format={format}
renderingTarget={renderingTarget}
serverTime={serverTime}
/>
);
default:
return (
<StandardLayout
Expand Down Expand Up @@ -289,16 +279,6 @@ const DecideLayoutWeb = ({ article, NAV, renderingTarget }: WebProps) => {
serverTime={serverTime}
/>
);
case ArticleDesign.Picture:
return (
<PictureLayout
article={article.frontendData}
NAV={NAV}
format={format}
renderingTarget={renderingTarget}
serverTime={serverTime}
/>
);
default:
return (
<StandardLayout
Expand Down
Loading
Loading