Skip to content

Commit 7ca2d7a

Browse files
committed
remove tos media restriction
Signed-off-by: Wyllie Fang <[email protected]>
1 parent 4084e22 commit 7ca2d7a

File tree

2 files changed

+35
-23
lines changed

2 files changed

+35
-23
lines changed

src/components/handbook-navigation/toc.style.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ const TOCWrapper = styled.div`
1111
width:15rem;
1212
padding-bottom: 2rem;
1313
14-
@media screen and (min-width: 768px) and (max-height: 1145px) {
15-
height : calc(100vh - 10rem);
16-
overflow-y : auto
17-
18-
}
1914
@media screen and (min-width: 1280px) and (max-width: 1350px) {
2015
margin-left:0.2rem;
2116
}

src/sections/Community/Handbook/Handbook.style.js

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ export const HandbookWrapper = styled.div`
1111
font-weight: 600;
1212
}
1313
14+
.main-content {
15+
display: flex;
16+
flex: 1;
17+
18+
@media (max-width: 750px) {
19+
flex-direction: column;
20+
}
21+
}
1422
.content{
1523
width:100%;
1624
padding-bottom: 2rem;
@@ -35,11 +43,13 @@ export const HandbookWrapper = styled.div`
3543
.page-section{
3644
@media (min-width: 751px){
3745
margin-top: -52rem;
46+
position: relative;
3847
margin-left: 20rem;
3948
padding: 2rem 3rem;
4049
}
4150
@media (max-width: 750px) {
42-
margin-top: -6rem;
51+
margin-top: -4rem;
52+
margin-left: 2rem;
4353
}
4454
}
4555
@@ -50,32 +60,39 @@ export const HandbookWrapper = styled.div`
5060
}
5161
5262
.sidebar {
53-
margin: 0;
54-
padding: 0;
55-
width: 250px;
56-
background-color:${(props) => props.theme.secondaryLightColor};
57-
height: 150rem;
58-
overflow: auto;
59-
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
63+
margin: 0;
64+
padding: 0;
65+
width: 250px;
66+
background-color:${(props) => props.theme.secondaryLightColor};
67+
height: auto;
68+
min-height: 100%;
69+
flex-shrink: 0;
70+
overflow: auto;
71+
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
6072
}
6173
6274
.sidebar a {
63-
display: block;
64-
color: black;
65-
padding: 16px;
66-
text-decoration: none;
75+
display: block;
76+
color: black;
77+
padding: 16px;
78+
text-decoration: none;
6779
}
6880
6981
.sidebar a.active {
70-
background-color: ${(props) => props.theme.primaryLightColorTwo};
71-
color: white;
72-
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
82+
background-color: ${(props) => props.theme.primaryLightColorTwo};
83+
color: white;
84+
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
7385
}
7486
7587
.sidebar a:hover:not(.active) {
76-
background-color:${(props) => props.theme.secondaryLightColor};
77-
color: white;
78-
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
88+
background-color:${(props) => props.theme.secondaryLightColor};
89+
color: white;
90+
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
91+
}
92+
93+
.sidebar-content-container {
94+
display: flex;
95+
min-height: calc(100vh - 10rem); /* 减去header高度 */
7996
}
8097
8198
.page-header-section {

0 commit comments

Comments
 (0)