This repository was archived by the owner on Mar 9, 2021. It is now read-only.
File tree 1 file changed +14
-4
lines changed
1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,15 @@ const CurriculumSection = styled.section`
24
24
border-right: 1px solid #f5f5f5;
25
25
min-width: 250px;
26
26
}
27
+ & .toc_sticky {
28
+ ${ breakpoints . xs } {
29
+ position: sticky;
30
+ z-index: 3;
31
+ left: 0;
32
+ margin-top: 0.5rem;
33
+ top: 10rem;
34
+ }
35
+ }
27
36
& .toc_title {
28
37
background-color: #374355;
29
38
color: #fff;
@@ -37,11 +46,10 @@ const CurriculumSection = styled.section`
37
46
38
47
const Fab = styled . div `
39
48
position: sticky;
40
- top: 0.5rem;
41
49
z-index: 3;
42
50
left: 0;
43
51
margin-top: 0.5rem;
44
- top: 3rem ;
52
+ top: 10rem ;
45
53
display: none;
46
54
& .fab_symbol {
47
55
opacity: 0.5;
@@ -104,8 +112,10 @@ export default class Subject extends React.Component {
104
112
< Flex column = { false } >
105
113
{ this . state . isSidebarOpen ? (
106
114
< Box width = { [ 0 , 0.2 ] } flex = { '1 1 auto' } className = "box_toc" >
107
- < div className = "toc_title" > Table of content</ div >
108
- < SyllabusTree data = { laravelSyllabus } changeChapter = { this . changeChapter } />
115
+ < div className = "toc_sticky" >
116
+ < div className = "toc_title" > Table of content</ div >
117
+ < SyllabusTree data = { laravelSyllabus } changeChapter = { this . changeChapter } />
118
+ </ div >
109
119
</ Box >
110
120
) : null }
111
121
< Box width = { [ 1 , 0.8 ] } flex = { '1 1 auto' } px = { [ 1 , 2 ] } className = "box_content" >
You can’t perform that action at this time.
0 commit comments