11import { css } from '@emotion/react' ;
2- import { palette as sourcePalette } from '@guardian/source/foundations' ;
2+ import {
3+ from ,
4+ palette as sourcePalette ,
5+ space ,
6+ } from '@guardian/source/foundations' ;
37import { HostedContentHeader } from '../components/HostedContentHeader' ;
8+ import { Island } from '../components/Island' ;
49import { Section } from '../components/Section' ;
10+ import { ShareButton } from '../components/ShareButton.importable' ;
511import { grid } from '../grid' ;
12+ import type { ArticleFormat } from '../lib/articleFormat' ;
613import type { Article } from '../types/article' ;
714import type { RenderingTarget } from '../types/renderingTarget' ;
815import { Stuck } from './lib/stickiness' ;
916
1017interface Props {
11- renderingTarget : RenderingTarget ;
1218 content : Article ;
19+ format : ArticleFormat ;
20+ renderingTarget : RenderingTarget ;
1321}
1422
1523interface WebProps extends Props {
@@ -24,7 +32,21 @@ const border = css`
2432 border : 1px solid black;
2533` ;
2634
35+ const metaFlex = css `
36+ margin-bottom : ${ space [ 3 ] } px;
37+ display : flex;
38+ justify-content : space-between;
39+ flex-wrap : wrap;
40+ ` ;
41+
2742export const HostedGalleryLayout = ( props : WebProps | AppProps ) => {
43+ const {
44+ content : {
45+ frontendData : { pageId, webTitle } ,
46+ } ,
47+ format,
48+ } = props ;
49+
2850 return (
2951 < >
3052 { props . renderingTarget === 'Web' ? (
@@ -59,8 +81,38 @@ export const HostedGalleryLayout = (props: WebProps | AppProps) => {
5981 < div css = { border } > Onward</ div >
6082 </ article >
6183 </ div >
62- < div css = { [ grid . container , border ] } >
63- < div css = { [ grid . column . all ] } > Footer</ div >
84+ < div
85+ css = { [
86+ grid . container ,
87+ border ,
88+ css `
89+ padding : ${ space [ 2 ] } px;
90+
91+ ${ from . desktop } {
92+ padding : ${ space [ 4 ] } px ${ space [ 8 ] } px;
93+ }
94+ ` ,
95+ ] }
96+ >
97+ < div css = { [ grid . column . all ] } >
98+ < div css = { [ grid . column . left ] } >
99+ < div data-print-layout = "hide" css = { metaFlex } >
100+ { props . renderingTarget === 'Web' && (
101+ < Island
102+ priority = "feature"
103+ defer = { { until : 'visible' } }
104+ >
105+ < ShareButton
106+ pageId = { pageId }
107+ webTitle = { webTitle }
108+ format = { format }
109+ context = "ArticleMeta"
110+ />
111+ </ Island >
112+ ) }
113+ </ div >
114+ </ div >
115+ </ div >
64116 </ div >
65117 </ main >
66118 </ >
0 commit comments