Sticky sidebar
This commit is contained in:
@ -13,6 +13,7 @@ import {
|
|||||||
SidebarButton,
|
SidebarButton,
|
||||||
MobileSidebar,
|
MobileSidebar,
|
||||||
MobileSidebarWrap,
|
MobileSidebarWrap,
|
||||||
|
DesktopSidebarWrap,
|
||||||
PageTitle,
|
PageTitle,
|
||||||
PageDetail
|
PageDetail
|
||||||
} from './style';
|
} from './style';
|
||||||
@ -106,9 +107,11 @@ const DetailedRoadmap = ({ roadmap }) => {
|
|||||||
</MobileNavHeader>
|
</MobileNavHeader>
|
||||||
|
|
||||||
<Summary className="container">
|
<Summary className="container">
|
||||||
<Sidebar className="sidebar d-none d-md-block">
|
<DesktopSidebarWrap className="d-none d-md-block">
|
||||||
{ roadmapPages }
|
<Sidebar>
|
||||||
</Sidebar>
|
{ roadmapPages }
|
||||||
|
</Sidebar>
|
||||||
|
</DesktopSidebarWrap>
|
||||||
<PageDetail>
|
<PageDetail>
|
||||||
<PageTitle>{ currentPage.title }</PageTitle>
|
<PageTitle>{ currentPage.title }</PageTitle>
|
||||||
<MdRenderer>
|
<MdRenderer>
|
||||||
|
@ -80,7 +80,6 @@ export const PageTitle = styled.h1`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
export const Sidebar = styled.div`
|
export const Sidebar = styled.div`
|
||||||
border-left: 1px solid #efefef;
|
|
||||||
padding-bottom: 150px;
|
padding-bottom: 150px;
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
@ -146,6 +145,16 @@ export const Sidebar = styled.div`
|
|||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
export const DesktopSidebarWrap = styled.div`
|
||||||
|
border-left: 1px solid #efefef;
|
||||||
|
|
||||||
|
${Sidebar} {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
export const MobileSidebarWrap = styled.div`
|
export const MobileSidebarWrap = styled.div`
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
@ -164,6 +173,7 @@ export const MobileSidebarWrap = styled.div`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
export const MobileSidebar = styled(Sidebar)`
|
export const MobileSidebar = styled(Sidebar)`
|
||||||
|
border-left: 1px solid #efefef;
|
||||||
margin-left: 12px;
|
margin-left: 12px;
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user