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 {
13+ ArticleDesign ,
14+ ArticleDisplay ,
15+ ArticleSpecial ,
16+ } from '../lib/articleFormat' ;
617import type { RenderingTarget } from '../types/renderingTarget' ;
718import { Stuck } from './lib/stickiness' ;
819
@@ -22,6 +33,22 @@ const border = css`
2233 border : 1px solid black;
2334` ;
2435
36+ const metaFlex = css `
37+ margin-bottom : ${ space [ 3 ] } px;
38+ display : flex;
39+ justify-content : space-between;
40+ flex-wrap : wrap;
41+ ` ;
42+
43+ const shareButtonWrapper = css `
44+ ${ grid . column . centre }
45+ grid-row : 1 / -2 ;
46+
47+ ${ from . leftCol } {
48+ ${ grid . column . left }
49+ }
50+ ` ;
51+
2552export const HostedArticleLayout = ( props : WebProps | AppProps ) => {
2653 return (
2754 < >
@@ -52,9 +79,40 @@ export const HostedArticleLayout = (props: WebProps | AppProps) => {
5279 Headline
5380 </ div >
5481 </ header >
55- < div css = { [ grid . container ] } >
56- < div css = { [ grid . column . left , 'grid-row: 1' ] } >
57- Left column
82+ < div
83+ css = { [
84+ grid . container ,
85+ css `
86+ padding-top : ${ space [ 12 ] } px;
87+
88+ ${ from . leftCol } {
89+ padding-top : ${ space [ 5 ] } px;
90+ }
91+ ` ,
92+ ] }
93+ >
94+ < div css = { shareButtonWrapper } >
95+ < div data-print-layout = "hide" css = { metaFlex } >
96+ { props . renderingTarget === 'Web' && (
97+ < Island
98+ priority = "feature"
99+ defer = { { until : 'visible' } }
100+ >
101+ < ShareButton
102+ pageId = { 'replace with actual pageId' }
103+ webTitle = {
104+ 'replace with actual webTitle'
105+ }
106+ format = { {
107+ theme : ArticleSpecial . Labs ,
108+ design : ArticleDesign . Standard ,
109+ display : ArticleDisplay . Standard ,
110+ } } // replace with Hosted Content format if there is one
111+ context = "ArticleMeta"
112+ />
113+ </ Island >
114+ ) }
115+ </ div >
58116 </ div >
59117 < div css = { [ grid . column . right , 'grid-row: 1' ] } >
60118 Onward content
0 commit comments