@@ -29,38 +29,50 @@ const fixedWidthsPageSkin = css`
29
29
}
30
30
` ;
31
31
32
- const advertMargin = ( hasHideButton : boolean , isDeeplyRead : boolean ) => css `
33
- margin-top : 9px ;
34
- ${ from . desktop } {
35
- margin-top : 0 ;
36
- margin-left : 10px ;
37
- }
38
- ${ from . leftCol } {
39
- margin-top : 10px ;
40
- }
41
- ${ from . wide } {
42
- margin-left : 16px ;
43
- }
44
- ${ hasHideButton && from . leftCol } {
45
- margin-top : 2px ;
46
- }
47
- ${ hasHideButton && from . wide } {
48
- margin-top : 36px ;
49
- }
50
- ${ hasHideButton && isDeeplyRead && from . desktop } {
32
+ const advertMargin = (
33
+ hasHideButton : boolean ,
34
+ isDeeplyRead : boolean ,
35
+ isLiveblog : boolean ,
36
+ hasPageskin : boolean ,
37
+ ) => {
38
+ if ( hasPageskin ) {
39
+ return css `
40
+ margin : 9px 0 0 10px ;
41
+ ` ;
42
+ }
43
+ return css `
51
44
margin-top : 9px ;
52
- }
53
- ${ hasHideButton && isDeeplyRead && from . leftCol } {
54
- margin-top : 38px ;
55
- }
56
- ${ hasHideButton && isDeeplyRead && from . wide } {
57
- margin-top : 54px ;
58
- }
59
- ` ;
60
-
61
- const advertMarginWithPageSkin = css `
62
- margin : 9px 0 0 10px ;
63
- ` ;
45
+ ${ from . desktop } {
46
+ margin-top : 0 ;
47
+ margin-left : 10px ;
48
+ }
49
+ ${ from . leftCol } {
50
+ margin-top : 10px ;
51
+ }
52
+ ${ from . wide } {
53
+ margin-left : 16px ;
54
+ }
55
+ /* Due to the larger left column on liveblogs we hide the ad slot at leftcol to prevent overflow */
56
+ ${ isLiveblog && between . leftCol . and . wide } {
57
+ display : none;
58
+ }
59
+ ${ hasHideButton && from . leftCol } {
60
+ margin-top : 2px ;
61
+ }
62
+ ${ hasHideButton && from . wide } {
63
+ margin-top : 36px ;
64
+ }
65
+ ${ hasHideButton && isDeeplyRead && from . desktop } {
66
+ margin-top : 9px ;
67
+ }
68
+ ${ hasHideButton && isDeeplyRead && from . leftCol } {
69
+ margin-top : 38px ;
70
+ }
71
+ ${ hasHideButton && isDeeplyRead && from . wide } {
72
+ margin-top : 54px ;
73
+ }
74
+ ` ;
75
+ } ;
64
76
65
77
const frontStyles = ( hasPageSkin : boolean ) => css `
66
78
${ from . wide } {
@@ -89,6 +101,7 @@ type Props = {
89
101
isFront ?: boolean ;
90
102
renderAds ?: boolean ;
91
103
isDeeplyRead ?: boolean ;
104
+ isLiveblog ?: boolean ;
92
105
} ;
93
106
94
107
export const MostViewedFooterLayout = ( {
@@ -97,6 +110,7 @@ export const MostViewedFooterLayout = ({
97
110
renderAds,
98
111
hasPageSkin = false ,
99
112
isDeeplyRead = false ,
113
+ isLiveblog = false ,
100
114
} : Props ) => {
101
115
return (
102
116
< div
@@ -115,11 +129,12 @@ export const MostViewedFooterLayout = ({
115
129
</ div >
116
130
{ renderAds && (
117
131
< div
118
- css = {
119
- hasPageSkin
120
- ? advertMarginWithPageSkin
121
- : advertMargin ( ! ! isFront , isDeeplyRead )
122
- }
132
+ css = { advertMargin (
133
+ ! ! isFront ,
134
+ isDeeplyRead ,
135
+ isLiveblog ,
136
+ hasPageSkin ,
137
+ ) }
123
138
>
124
139
< AdSlot position = "mostpop" />
125
140
</ div >
0 commit comments