Skip to content
This repository was archived by the owner on Mar 9, 2021. It is now read-only.

Commit 3212934

Browse files
author
z
committed
in response to #114 (comment)
1 parent f7a6619 commit 3212934

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

pages/learn/subject.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ const CurriculumSection = styled.section`
2424
border-right: 1px solid #f5f5f5;
2525
min-width: 250px;
2626
}
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+
}
2736
& .toc_title {
2837
background-color: #374355;
2938
color: #fff;
@@ -37,11 +46,10 @@ const CurriculumSection = styled.section`
3746

3847
const Fab = styled.div`
3948
position: sticky;
40-
top: 0.5rem;
4149
z-index: 3;
4250
left: 0;
4351
margin-top: 0.5rem;
44-
top: 3rem;
52+
top: 10rem;
4553
display: none;
4654
& .fab_symbol {
4755
opacity: 0.5;
@@ -104,8 +112,10 @@ export default class Subject extends React.Component {
104112
<Flex column={false}>
105113
{this.state.isSidebarOpen ? (
106114
<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>
109119
</Box>
110120
) : null}
111121
<Box width={[1, 0.8]} flex={'1 1 auto'} px={[1, 2]} className="box_content">

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy