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

Commit c942dd8

Browse files
committed
refactor(media-query): support tablet in most pages
1 parent 9ef12af commit c942dd8

File tree

37 files changed

+111
-63
lines changed

37 files changed

+111
-63
lines changed

components/CommunityStatesPad/styles/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export const NumberItem = styled.div`
5151
}
5252
5353
${cs.media.mobile`font-size: 1.2rem;`};
54+
${cs.media.tablet`font-size: 1.2rem;`};
5455
`
5556
export const NumberDivider = styled.div`
5657
border: 1px solid;
@@ -61,4 +62,8 @@ export const NumberDivider = styled.div`
6162
margin-left: 10px;
6263
margin-right: 10px;
6364
${cs.media.mobile`display: none`};
65+
${cs.media.tablet`
66+
margin-left: 5px;
67+
margin-right: 5px;
68+
`};
6469
`

components/ContentSourceCard/styles/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ export const Wrapper = styled.div`
1212
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
1313
margin-bottom: 15px;
1414
15-
${cs.media.mobile`
15+
${cs.media.tablet`
1616
width: 50%;
1717
padding: 10px;
18-
`};
18+
`};
1919
`
2020
export const Title = styled.div`
2121
color: ${theme('thread.articleTitle')};

components/EmptyThread/styles/index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ export const Wrapper = styled.div`
1414
export const Icon404 = styled(PromptIcon)`
1515
width: 320px;
1616
height: 320px;
17+
18+
${cs.media.tablet`
19+
width: 200px;
20+
height: 200px;
21+
`};
1722
`
1823

1924
export const Icon = styled.div``
@@ -28,12 +33,19 @@ export const Title = styled.div`
2833
margin-bottom: 10px;
2934
margin-top: 10px;
3035
font-size: 1.3rem;
36+
${cs.media.tablet`
37+
font-size: 1.1rem;
38+
`};
3139
`
3240

3341
export const DescWrapper = styled.div`
3442
color: ${theme('thread.articleDigest')};
3543
margin-top: 0.6rem;
3644
font-size: 0.9rem;
45+
46+
${cs.media.tablet`
47+
font-size: 0.8rem;
48+
`};
3749
`
3850
const Link = styled.a`
3951
text-decoration: none;

components/JobItem/styles/job_info.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const ExpDivider = styled.div`
6464
`
6565

6666
export const PublishInfo = styled.div`
67-
${cs.media.mobile`
68-
display: none;
69-
`};
67+
${cs.media.tablet`
68+
display: none;
69+
`};
7070
`

components/Modal/styles/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export const Wrapper = styled.div`
3232
animation: ${animate.zoomInRule};
3333
3434
${cs.media.mobile`width: 300px`};
35+
${cs.media.mobile`width: 400px`};
3536
`
3637
export const ChildrenWrapper = styled.div`
3738
min-height: 320px;

components/Navigator/styles/main_entries.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const Wrapper = styled.div`
88
99
margin-left: 10px;
1010
font-size: 0.9rem;
11-
${cs.media.mobile`display: none`};
11+
${cs.media.tablet`display: none`};
1212
`
1313
export const DotDivider = styled(DotDividerBase)`
1414
background-color: ${theme('banner.desc')};

containers/ArticleAuthorCard/styles/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ export const Wrapper = styled.div`
1616
width: 50%;
1717
padding: 10px;
1818
`};
19+
20+
${cs.media.tablet`
21+
width: 50%;
22+
`};
1923
`
2024

2125
export const Divider = styled.div`

containers/ArticleBanner/styles/reaction_numbers.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export const NumberTitle = styled.div`
3434
animation: ${animate.pulseRule};
3535
}
3636
${cs.media.mobile`font-size: 0.9rem`};
37+
${cs.media.tablet`font-size: 0.9rem`};
3738
`
3839
export const NumberItem = styled.div`
3940
font-size: 1.5rem;
@@ -47,6 +48,7 @@ export const NumberItem = styled.div`
4748
}
4849
4950
${cs.media.mobile`font-size: 1rem`};
51+
${cs.media.tablet`font-size: 1rem`};
5052
`
5153

5254
export const NumberLoading = styled(Img)`
@@ -69,4 +71,10 @@ export const NumberDivider = styled.div`
6971
margin-right: 2px;
7072
height: 50%;
7173
`};
74+
75+
${cs.media.tablet`
76+
margin-left: 2px;
77+
margin-right: 2px;
78+
height: 50%;
79+
`};
7280
`

containers/BodyLayout/styles/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const Wrapper = styled.div`
1212
margin-left: ${({ sidebarPin }) => (sidebarPin ? '180px' : '0')};
1313
transition: all 0.2s;
1414
overflow-x: ${({ sidebarPin }) => (sidebarPin ? 'hidden' : '')};
15-
${cs.media.mobile`padding-left: 0`};
15+
${cs.media.tablet`padding-left: 0`};
1616
`
1717
/* overflow-x: hidden; */
1818

containers/CommunityBanner/styles/digest_view.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const CommunityWrapper = styled.div`
3939
${cs.flexGrow()};
4040
${cs.media.mobile`
4141
margin-left: 5%;
42-
`};
42+
`};
4343
`
4444

4545
export const LogoWrapper = styled.div`
@@ -99,7 +99,15 @@ export const Desc = styled.div`
9999
@media (max-height: 800px) {
100100
font-size: 1rem;
101101
}
102-
${cs.truncate('180px')};
102+
${cs.truncate('500px')};
103+
104+
${cs.media.mobile`
105+
${cs.truncate('180px')};
106+
`};
107+
108+
${cs.media.tablet`
109+
${cs.truncate('220px')};
110+
`};
103111
`
104112
export const LogoHolder = styled(Img)`
105113
fill: ${theme('banner.desc')};

0 commit comments

Comments
 (0)