Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit f20a368

Browse files
committed
fix(job): content align center
1 parent 4ea1ff9 commit f20a368

File tree

4 files changed

+28
-26
lines changed

4 files changed

+28
-26
lines changed

containers/JobContent/index.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ import SideCards from './SideCards'
2323

2424
import {
2525
Wrapper,
26+
InnerWrapper,
2627
MainWrapper,
28+
SidebarWrapper,
2729
ArticleWrapper,
2830
BodyHeaderWrapper,
2931
CommentsWrapper,
@@ -45,7 +47,7 @@ const JobContentContainer = ({ jobContent }) => {
4547
return (
4648
<Wrapper>
4749
<Maybe test={viewingData.id}>
48-
<React.Fragment>
50+
<InnerWrapper>
4951
<MainWrapper>
5052
<ArticleWrapper>
5153
<BodyHeaderWrapper>
@@ -73,10 +75,13 @@ const JobContentContainer = ({ jobContent }) => {
7375
<Comments ssr />
7476
</CommentsWrapper>
7577
</MainWrapper>
76-
<Affix offsetTop={30}>
77-
<SideCards data={viewingData} />
78-
</Affix>
79-
</React.Fragment>
78+
79+
<SidebarWrapper>
80+
<Affix offsetTop={30}>
81+
<SideCards data={viewingData} />
82+
</Affix>
83+
</SidebarWrapper>
84+
</InnerWrapper>
8085
</Maybe>
8186
</Wrapper>
8287
)

containers/JobContent/styles/index.js

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,31 @@ import styled from 'styled-components'
33
import { theme, cs } from '@utils'
44

55
export const Wrapper = styled.article`
6-
${cs.flex()};
6+
${cs.flex('justify-center')};
77
padding: 20px;
88
min-height: 300px;
99
${cs.media.tablet`
1010
padding: 8px 0;
1111
`};
1212
`
13+
export const InnerWrapper = styled.div`
14+
${cs.flex()};
15+
width: 100%;
16+
max-width: ${cs.MAX_CONTENT_WIDTH};
17+
padding: 0 6vw;
18+
${cs.media.desktop`
19+
padding: 0 4vw;
20+
`};
21+
`
1322
export const MainWrapper = styled.div`
14-
width: 68%;
15-
margin-left: 2.5rem;
1623
${cs.media.tablet`
1724
width: 100%;
18-
margin-left: 0;
1925
`};
2026
`
27+
export const SidebarWrapper = styled.div``
2128
/* background: ${theme('preview.articleBg')}; */
2229
export const ArticleWrapper = styled.div`
2330
font-size: 1.1rem;
24-
margin-left: 2vw;
2531
margin-right: 1.6vw;
2632
background: ${theme('preview.articleBg')};
2733
border-radius: 5px;
@@ -39,11 +45,12 @@ export const BodyHeaderWrapper = styled.div`
3945
margin-bottom: 18px;
4046
`
4147
export const CommentsWrapper = styled.div`
42-
margin-top: 30px;
43-
margin: 25px;
48+
margin: 30px 0;
49+
margin-right: 25px;
50+
4451
${cs.media.tablet`
45-
margin: 10px;
46-
`};
52+
margin: 10px;
53+
`};
4754
`
4855

4956
export const MobileWrapper = styled.div`

containers/JobsThread/index.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ import PublishNote from './PublishNote'
2222

2323
import {
2424
Wrapper,
25-
LeftPadding,
26-
RightPadding,
2725
LeftPart,
2826
RightPart,
2927
FilterWrapper,
@@ -65,7 +63,6 @@ const JobsThreadContainer = ({ jobsThread }) => {
6563

6664
return (
6765
<Wrapper>
68-
<LeftPadding />
6966
<LeftPart>
7067
<Waypoint onEnter={inAnchor} onLeave={outAnchor} />
7168
<Maybe test={showFilterBar}>
@@ -108,7 +105,6 @@ const JobsThreadContainer = ({ jobsThread }) => {
108105
/>
109106
</Affix>
110107
</RightPart>
111-
<RightPadding />
112108
</Wrapper>
113109
)
114110
}

containers/JobsThread/styles/index.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,16 @@ import { cs } from '@utils'
55

66
export const Wrapper = styled.div`
77
${cs.flex()};
8-
max-width: 1400px;
98
width: 100%;
109
`
11-
export const LeftPadding = styled.div`
12-
width: 4vw;
13-
`
14-
export const RightPadding = styled.div`
15-
width: 4vw;
16-
`
1710
export const LeftPart = styled.div`
1811
flex-grow: 1;
1912
width: 100%;
2013
`
2114
export const RightPart = styled.div`
22-
width: 20vw;
15+
min-width: 200px;
2316
margin-left: 30px;
17+
padding-top: 5px;
2418
${cs.media.tablet`display: none`};
2519
`
2620
/* fill: ${theme('shell.searchIcon')}; */

0 commit comments

Comments
 (0)