Skip to content

Commit 2ca7743

Browse files
revert last 2 commits
Signed-off-by: Rajesh-Nagarajan-11 <rajeshnagarajan36@gmail.com>
1 parent 5ddc31e commit 2ca7743

2 files changed

Lines changed: 9 additions & 31 deletions

File tree

src/components/handbook-navigation/intra-page.js

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,28 @@ import { Link } from "gatsby";
33
import styled from "styled-components";
44

55
const JoinCommunityWrapper = styled.div`
6-
position: fixed;
7-
right: 2rem;
8-
top: 15rem;
9-
width: 15rem;
10-
z-index: 10;
11-
12-
@media screen and (max-width: 1279px) {
6+
@media screen and (min-width: 300px) and (max-width: 1279px) {
137
display: none;
148
}
15-
169
.intra-page {
1710
position: sticky;
1811
top: 10rem;
12+
right: 0rem;
13+
margin-right: 1rem;
1914
padding-bottom: 5rem;
15+
padding-right: 2rem;
2016
align-items: left;
2117
justify-content: space-around;
2218
display: flex;
2319
flex-direction: column;
2420
overflow: hidden;
2521
2622
.list {
27-
color: ${(props) => props.theme.text || "#000000"};
28-
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
23+
color: #000000;
2924
}
3025
.active {
31-
font-weight: 500;
32-
color: ${(props) => props.theme.secondaryColor || "#00b39f"};
26+
font-weight: 5000;
27+
color: #000000;
3328
}
3429
3530
ul {
@@ -44,7 +39,7 @@ const JoinCommunityWrapper = styled.div`
4439
padding-right: 0rem;
4540
margin-right: 0rem;
4641
}
47-
@media only screen and (max-width: 1279px) {
42+
@media only screen and (max-width: 950px) {
4843
width: 0;
4944
opacity: 0;
5045
height: 0;

src/sections/Community/Handbook/handbook-single/index.js

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,16 @@ const HandbookSingle = ({ data, children }) => {
88
const { mdx, allHandbookPages } = data;
99
const currentSlug = mdx.fields.slug;
1010

11-
// Extract IntraPage component from children if present
12-
let contentChildren = children;
13-
let intraPageComponent = null;
14-
15-
if (React.Children.count(children) > 0) {
16-
const childArray = React.Children.toArray(children);
17-
const intraPageIndex = childArray.findIndex(
18-
(child) => child?.type?.name === "IntraPage"
19-
);
20-
21-
if (intraPageIndex !== -1) {
22-
intraPageComponent = childArray[intraPageIndex];
23-
contentChildren = childArray.filter((_, index) => index !== intraPageIndex);
24-
}
25-
}
26-
2711
return (
2812
<HandbookWrapper>
2913
<div className="page-header-section">
3014
<h1>{mdx.frontmatter.title}</h1>
3115
</div>
3216
<HandbookTOC pages={allHandbookPages.nodes} currentSlug={currentSlug} />
33-
{intraPageComponent}
3417
<div className="page-section">
3518
<Container>
3619
<div className="content">
37-
{contentChildren}
20+
{children}
3821
</div>
3922
<HandbookPagination
4023
pages={allHandbookPages.nodes}

0 commit comments

Comments
 (0)