This repository was archived by the owner on Nov 8, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +28
-29
lines changed Expand file tree Collapse file tree 4 files changed +28
-29
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ import SideCards from './SideCards'
2222
2323import {
2424 Wrapper ,
25+ InnerWrapper ,
2526 MainWrapper ,
27+ SidebarWrapper ,
2628 ArticleWrapper ,
2729 BodyHeaderWrapper ,
2830 CommentsWrapper ,
@@ -43,7 +45,7 @@ const PostContentContainer = ({ postContent }) => {
4345 return (
4446 < Wrapper >
4547 < Maybe test = { viewingData . id } >
46- < React . Fragment >
48+ < InnerWrapper >
4749 < MainWrapper >
4850 < ArticleWrapper >
4951 < BodyHeaderWrapper >
@@ -68,10 +70,12 @@ const PostContentContainer = ({ postContent }) => {
6870 < Comments ssr />
6971 </ CommentsWrapper >
7072 </ MainWrapper >
71- < Affix offsetTop = { 30 } >
72- < SideCards data = { viewingData } />
73- </ Affix >
74- </ React . Fragment >
73+ < SidebarWrapper >
74+ < Affix offsetTop = { 30 } >
75+ < SideCards data = { viewingData } />
76+ </ Affix >
77+ </ SidebarWrapper >
78+ </ InnerWrapper >
7579 </ Maybe >
7680 </ Wrapper >
7781 )
Original file line number Diff line number Diff line change @@ -3,26 +3,33 @@ import styled from 'styled-components'
33import { theme , cs } from '@utils'
44
55export const Wrapper = styled . article `
6- ${ cs . flex ( ) } ;
7- padding: 20px;
6+ ${ cs . flex ( 'justify-center' ) } ;
7+ padding-top : 20px;
88 min-height: 300px;
9+
910 ${ cs . media . tablet `
1011 padding: 8px 0;
1112 ` } ;
1213`
14+ export const InnerWrapper = styled . div `
15+ ${ cs . flex ( ) } ;
16+ width: 100%;
17+ max-width: ${ cs . MAX_CONTENT_WIDTH } ;
18+ padding: 0 6vw;
19+ ${ cs . media . desktop `
20+ padding: 0 4vw;
21+ ` } ;
22+ `
1323export const MainWrapper = styled . div `
14- width: 68%;
15- margin-left: 2.5rem;
1624 ${ cs . media . tablet `
1725 width: 100%;
18- margin-left: 0;
1926 ` } ;
2027`
28+ export const SidebarWrapper = styled . div ``
2129
2230/* background: ${theme('preview.articleBg')}; */
2331export const ArticleWrapper = styled . div `
2432 font-size: 1.1rem;
25- margin-left: 2vw;
2633 margin-right: 1.6vw;
2734 background: ${ theme ( 'preview.articleBg' ) } ;
2835 border-radius: 5px;
@@ -41,11 +48,12 @@ export const BodyHeaderWrapper = styled.div`
4148`
4249
4350export const CommentsWrapper = styled . div `
44- margin-top: 30px;
45- margin: 25px;
51+ margin: 30px 0;
52+ margin-right: 25px;
53+
4654 ${ cs . media . mobile `
47- margin: 10px;
48- ` } ;
55+ margin: 10px;
56+ `} ;
4957`
5058
5159export const MobileWrapper = styled . div `
Original file line number Diff line number Diff line change @@ -24,8 +24,6 @@ import CityList from './CityList'
2424
2525import {
2626 Wrapper ,
27- LeftPadding ,
28- RightPadding ,
2927 LeftPart ,
3028 RightPart ,
3129 FilterWrapper ,
@@ -99,7 +97,6 @@ const PostsThreadContainer = ({ postsThread }) => {
9997
10098 return (
10199 < Wrapper >
102- < LeftPadding />
103100 { isSpecThread ( curCommunity . raw , curThread ) ? (
104101 < SpecThread
105102 community = { curCommunity . raw }
@@ -158,8 +155,6 @@ const PostsThreadContainer = ({ postsThread }) => {
158155 </ RightPart >
159156 </ React . Fragment >
160157 ) }
161-
162- < RightPadding />
163158 </ Wrapper >
164159 )
165160}
Original file line number Diff line number Diff line change @@ -6,23 +6,15 @@ import { cs } from '@utils'
66
77export const Wrapper = styled . div `
88 ${ cs . flex ( ) } ;
9- max-width: 1400px;
109 padding-top: 8px;
1110 width: 100%;
1211`
13-
14- export const LeftPadding = styled . div `
15- width: 3vw;
16- `
17- export const RightPadding = styled . div `
18- width: 4vw;
19- `
2012export const LeftPart = styled . div `
2113 flex-grow: 1;
2214 width: 100%;
2315`
2416export const RightPart = styled . div `
25- width: 18vw ;
17+ min- width: 200px ;
2618 margin-left: 30px;
2719 padding-top: 5px;
2820 ${ cs . media . tablet `display: none;` } ;
You can’t perform that action at this time.
0 commit comments