Skip to content

Commit c9ac19c

Browse files
committed
Add disclaimer to both Web and App gallery articles
Also fix paddings for gallery image and caption
1 parent e06909d commit c9ac19c

File tree

2 files changed

+46
-39
lines changed

2 files changed

+46
-39
lines changed

dotcom-rendering/src/components/GalleryCaption.tsx

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const styles = css`
2121
color: ${palette('--caption-text')};
2222
${textSans12}
2323
padding-bottom: ${space[6]}px;
24+
padding-top: ${space[5]}px;
2425
2526
${between.tablet.and.desktop} {
2627
padding-left: ${space[5]}px;
@@ -89,14 +90,20 @@ export const GalleryCaption = ({
8990
{credit}
9091
</small>
9192
)}
92-
<Island priority="feature" defer={{ until: 'visible' }}>
93-
<ShareButton
94-
format={format}
95-
pageId={pageId}
96-
webTitle={webTitle}
97-
context="ImageCaption"
98-
/>
99-
</Island>
93+
<div
94+
css={css`
95+
padding-top: ${space[2]}px;
96+
`}
97+
>
98+
<Island priority="feature" defer={{ until: 'visible' }}>
99+
<ShareButton
100+
format={format}
101+
pageId={pageId}
102+
webTitle={webTitle}
103+
context="ImageCaption"
104+
/>
105+
</Island>
106+
</div>
100107
</figcaption>
101108
);
102109
};

dotcom-rendering/src/layouts/GalleryLayout.tsx

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ export const GalleryLayout = (props: WebProps | AppProps) => {
144144
format={format}
145145
isMainMedia={true}
146146
/>
147-
{isWeb ? (
148-
<div css={webMetaAndDisclaimerContainer}>
147+
<div css={webMetaAndDisclaimerContainer}>
148+
{isWeb ? (
149149
<ArticleMeta
150150
branding={
151151
frontendData.commercialProperties[
@@ -169,36 +169,36 @@ export const GalleryLayout = (props: WebProps | AppProps) => {
169169
}
170170
shortUrlId={frontendData.config.shortUrlId}
171171
/>
172-
{!!frontendData.affiliateLinksDisclaimer && (
173-
<GalleryAffiliateDisclaimer />
174-
)}
175-
</div>
176-
) : null}
172+
) : null}
177173

178-
{isApps ? (
179-
<ArticleMetaApps
180-
branding={
181-
frontendData.commercialProperties[
182-
frontendData.editionId
183-
].branding
184-
}
185-
format={format}
186-
pageId={frontendData.pageId}
187-
byline={frontendData.byline}
188-
tags={frontendData.tags}
189-
primaryDateline={
190-
frontendData.webPublicationDateDisplay
191-
}
192-
secondaryDateline={
193-
frontendData.webPublicationSecondaryDateDisplay
194-
}
195-
isCommentable={frontendData.isCommentable}
196-
discussionApiUrl={
197-
frontendData.config.discussionApiUrl
198-
}
199-
shortUrlId={frontendData.config.shortUrlId}
200-
/>
201-
) : null}
174+
{isApps ? (
175+
<ArticleMetaApps
176+
branding={
177+
frontendData.commercialProperties[
178+
frontendData.editionId
179+
].branding
180+
}
181+
format={format}
182+
pageId={frontendData.pageId}
183+
byline={frontendData.byline}
184+
tags={frontendData.tags}
185+
primaryDateline={
186+
frontendData.webPublicationDateDisplay
187+
}
188+
secondaryDateline={
189+
frontendData.webPublicationSecondaryDateDisplay
190+
}
191+
isCommentable={frontendData.isCommentable}
192+
discussionApiUrl={
193+
frontendData.config.discussionApiUrl
194+
}
195+
shortUrlId={frontendData.config.shortUrlId}
196+
/>
197+
) : null}
198+
{!!frontendData.affiliateLinksDisclaimer && (
199+
<GalleryAffiliateDisclaimer />
200+
)}
201+
</div>
202202
</header>
203203
{gallery.images.map((element, idx) => (
204204
<GalleryImage

0 commit comments

Comments
 (0)