Skip to content

Commit 3eca3d9

Browse files
committed
Enhaced The Introduction page for Sistent
Signed-off-by: Aryan Shah <aryanashah11@gmail.com>
1 parent ab806c7 commit 3eca3d9

13 files changed

Lines changed: 1394 additions & 223 deletions

File tree

Lines changed: 79 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,105 @@
11
export const content = [
2-
// About
3-
{ id: 0, link: "/projects/sistent/about", text: "About Sistent" },
2+
// Getting Started
3+
{ id: 0, link: "/projects/sistent/getting-started/about", text: "About" },
4+
{ id: 1, link: "/projects/sistent/getting-started/installation", text: "Installation" },
5+
{ id: 2, link: "/projects/sistent/getting-started/usage", text: "Usage" },
6+
{ id: 3, link: "/projects/sistent/getting-started/tokens", text: "Tokens" },
47

58
// Identity
6-
{ id: 1, link: "/projects/sistent/identity/color", text: "Colors" },
7-
{ id: 2, link: "/projects/sistent/identity/color/guidance", text: "Colors" },
8-
{ id: 3, link: "/projects/sistent/identity/color/code", text: "Colors" },
9-
{ id: 4, link: "/projects/sistent/identity/spacing", text: "Spacing" },
10-
{ id: 5, link: "/projects/sistent/identity/spacing/guidance", text: "Spacing" },
11-
{ id: 6, link: "/projects/sistent/identity/spacing/code", text: "Spacing" },
12-
{ id: 7, link: "/projects/sistent/identity/typography", text: "Typography" },
13-
{ id: 8, link: "/projects/sistent/identity/typography/guidance", text: "Typography" },
14-
{ id: 9, link: "/projects/sistent/identity/typography/code", text: "Typography" },
9+
{ id: 4, link: "/projects/sistent/identity/color", text: "Colors" },
10+
{ id: 5, link: "/projects/sistent/identity/color/guidance", text: "Colors" },
11+
{ id: 6, link: "/projects/sistent/identity/color/code", text: "Colors" },
12+
{ id: 7, link: "/projects/sistent/identity/spacing", text: "Spacing" },
13+
{ id: 8, link: "/projects/sistent/identity/spacing/guidance", text: "Spacing" },
14+
{ id: 9, link: "/projects/sistent/identity/spacing/code", text: "Spacing" },
15+
{ id: 10, link: "/projects/sistent/identity/typography", text: "Typography" },
16+
{ id: 11, link: "/projects/sistent/identity/typography/guidance", text: "Typography" },
17+
{ id: 12, link: "/projects/sistent/identity/typography/code", text: "Typography" },
1518

1619
// Components
17-
{ id: 10, link: "/projects/sistent/components/backdrop", text: "Backdrop" },
18-
{ id: 11, link: "/projects/sistent/components/backdrop/guidance", text: "Backdrop" },
19-
{ id: 12, link: "/projects/sistent/components/backdrop/code", text: "Backdrop" },
20+
{ id: 13, link: "/projects/sistent/components/backdrop", text: "Backdrop" },
21+
{ id: 14, link: "/projects/sistent/components/backdrop/guidance", text: "Backdrop" },
22+
{ id: 15, link: "/projects/sistent/components/backdrop/code", text: "Backdrop" },
2023

21-
{ id: 13, link: "/projects/sistent/components/badge", text: "Badge" },
22-
{ id: 14, link: "/projects/sistent/components/badge/guidance", text: "Badge" },
23-
{ id: 15, link: "/projects/sistent/components/badge/code", text: "Badge" },
24+
{ id: 16, link: "/projects/sistent/components/badge", text: "Badge" },
25+
{ id: 17, link: "/projects/sistent/components/badge/guidance", text: "Badge" },
26+
{ id: 18, link: "/projects/sistent/components/badge/code", text: "Badge" },
2427

25-
{ id: 16, link: "/projects/sistent/components/box", text: "Box" },
26-
{ id: 17, link: "/projects/sistent/components/box/guidance", text: "Box" },
27-
{ id: 18, link: "/projects/sistent/components/box/code", text: "Box" },
28+
{ id: 19, link: "/projects/sistent/components/box", text: "Box" },
29+
{ id: 20, link: "/projects/sistent/components/box/guidance", text: "Box" },
30+
{ id: 21, link: "/projects/sistent/components/box/code", text: "Box" },
2831

29-
{ id: 19, link: "/projects/sistent/components/button", text: "Button" },
30-
{ id: 20, link: "/projects/sistent/components/button/guidance", text: "Button" },
31-
{ id: 21, link: "/projects/sistent/components/button/code", text: "Button" },
32+
{ id: 22, link: "/projects/sistent/components/button", text: "Button" },
33+
{ id: 23, link: "/projects/sistent/components/button/guidance", text: "Button" },
34+
{ id: 24, link: "/projects/sistent/components/button/code", text: "Button" },
3235

33-
{ id: 22, link: "/projects/sistent/components/button-group", text: "Button Group" },
34-
{ id: 23, link: "/projects/sistent/components/button-group/guidance", text: "Button Group" },
35-
{ id: 24, link: "/projects/sistent/components/button-group/code", text: "Button Group" },
36+
{ id: 25, link: "/projects/sistent/components/button-group", text: "Button Group" },
37+
{ id: 26, link: "/projects/sistent/components/button-group/guidance", text: "Button Group" },
38+
{ id: 27, link: "/projects/sistent/components/button-group/code", text: "Button Group" },
3639

37-
{ id: 25, link: "/projects/sistent/components/circularprogress", text: "Circular Progress" },
38-
{ id: 26, link: "/projects/sistent/components/circularprogress/guidance", text: "Circular Progress" },
39-
{ id: 27, link: "/projects/sistent/components/circularprogress/code", text: "Circular Progress" },
40+
{ id: 28, link: "/projects/sistent/components/circularprogress", text: "Circular Progress" },
41+
{ id: 29, link: "/projects/sistent/components/circularprogress/guidance", text: "Circular Progress" },
42+
{ id: 30, link: "/projects/sistent/components/circularprogress/code", text: "Circular Progress" },
4043

41-
{ id: 28, link: "/projects/sistent/components/container", text: "Container" },
42-
{ id: 29, link: "/projects/sistent/components/container/guidance", text: "Container" },
43-
{ id: 30, link: "/projects/sistent/components/container/code", text: "Container" },
44+
{ id: 31, link: "/projects/sistent/components/container", text: "Container" },
45+
{ id: 32, link: "/projects/sistent/components/container/guidance", text: "Container" },
46+
{ id: 33, link: "/projects/sistent/components/container/code", text: "Container" },
4447

45-
{ id: 31, link: "/projects/sistent/components/dialog", text: "Dialog" },
46-
{ id: 32, link: "/projects/sistent/components/dialog/guidance", text: "Dialog" },
47-
{ id: 33, link: "/projects/sistent/components/dialog/code", text: "Dialog" },
48+
{ id: 34, link: "/projects/sistent/components/dialog", text: "Dialog" },
49+
{ id: 35, link: "/projects/sistent/components/dialog/guidance", text: "Dialog" },
50+
{ id: 36, link: "/projects/sistent/components/dialog/code", text: "Dialog" },
4851

49-
{ id: 34, link: "/projects/sistent/components/icons", text: "Icons" },
52+
{ id: 37, link: "/projects/sistent/components/icons", text: "Icons" },
5053

51-
{ id: 35, link: "/projects/sistent/components/link", text: "Link" },
52-
{ id: 36, link: "/projects/sistent/components/link/guidance", text: "Link" },
53-
{ id: 37, link: "/projects/sistent/components/link/code", text: "Link" },
54+
{ id: 38, link: "/projects/sistent/components/link", text: "Link" },
55+
{ id: 39, link: "/projects/sistent/components/link/guidance", text: "Link" },
56+
{ id: 40, link: "/projects/sistent/components/link/code", text: "Link" },
5457

55-
{ id: 38, link: "/projects/sistent/components/modal", text: "Modal" },
56-
{ id: 39, link: "/projects/sistent/components/modal/guidance", text: "Modal" },
57-
{ id: 40, link: "/projects/sistent/components/modal/code", text: "Modal" },
58+
{ id: 41, link: "/projects/sistent/components/modal", text: "Modal" },
59+
{ id: 42, link: "/projects/sistent/components/modal/guidance", text: "Modal" },
60+
{ id: 43, link: "/projects/sistent/components/modal/code", text: "Modal" },
5861

59-
{ id: 41, link: "/projects/sistent/components/pagination", text: "Pagination" },
60-
{ id: 42, link: "/projects/sistent/components/pagination/guidance", text: "Pagination" },
61-
{ id: 43, link: "/projects/sistent/components/pagination/code", text: "Pagination" },
62+
{ id: 44, link: "/projects/sistent/components/pagination", text: "Pagination" },
63+
{ id: 45, link: "/projects/sistent/components/pagination/guidance", text: "Pagination" },
64+
{ id: 46, link: "/projects/sistent/components/pagination/code", text: "Pagination" },
6265

63-
{ id: 44, link: "/projects/sistent/components/paper", text: "Paper" },
64-
{ id: 45, link: "/projects/sistent/components/paper/guidance", text: "Paper" },
65-
{ id: 46, link: "/projects/sistent/components/paper/code", text: "Paper" },
66+
{ id: 47, link: "/projects/sistent/components/paper", text: "Paper" },
67+
{ id: 48, link: "/projects/sistent/components/paper/guidance", text: "Paper" },
68+
{ id: 49, link: "/projects/sistent/components/paper/code", text: "Paper" },
6669

67-
{ id: 47, link: "/projects/sistent/components/popper", text: "Popper" },
68-
{ id: 48, link: "/projects/sistent/components/popper/guidance", text: "Popper" },
69-
{ id: 49, link: "/projects/sistent/components/popper/code", text: "Popper" },
70+
{ id: 50, link: "/projects/sistent/components/popper", text: "Popper" },
71+
{ id: 51, link: "/projects/sistent/components/popper/guidance", text: "Popper" },
72+
{ id: 52, link: "/projects/sistent/components/popper/code", text: "Popper" },
7073

71-
{ id: 50,link: "/projects/sistent/components/radiogroup",text: "RadioGroup" },
72-
{ id: 51,link: "/projects/sistent/components/radiogroup/guidance",text: "RadioGroup" },
73-
{ id: 52,link: "/projects/sistent/components/radiogroup/code",text: "RadioGroup" },
74+
{ id: 53, link: "/projects/sistent/components/radiogroup", text: "RadioGroup" },
75+
{ id: 54, link: "/projects/sistent/components/radiogroup/guidance", text: "RadioGroup" },
76+
{ id: 55, link: "/projects/sistent/components/radiogroup/code", text: "RadioGroup" },
7477

75-
{ id: 53, link: "/projects/sistent/components/select", text: "Select" },
76-
{ id: 54, link: "/projects/sistent/components/select/guidance", text: "Select" },
77-
{ id: 55, link: "/projects/sistent/components/select/code", text: "Select" },
78+
{ id: 56, link: "/projects/sistent/components/select", text: "Select" },
79+
{ id: 57, link: "/projects/sistent/components/select/guidance", text: "Select" },
80+
{ id: 58, link: "/projects/sistent/components/select/code", text: "Select" },
7881

79-
{ id: 56, link: "/projects/sistent/components/switch", text: "Switch" },
80-
{ id: 57, link: "/projects/sistent/components/switch/guidance", text: "Switch" },
81-
{ id: 58, link: "/projects/sistent/components/switch/code", text: "Switch" },
82+
{ id: 59, link: "/projects/sistent/components/switch", text: "Switch" },
83+
{ id: 60, link: "/projects/sistent/components/switch/guidance", text: "Switch" },
84+
{ id: 61, link: "/projects/sistent/components/switch/code", text: "Switch" },
8285

83-
{ id: 59, link: "/projects/sistent/components/tabs", text: "Tabs" },
84-
{ id: 60, link: "/projects/sistent/components/tabs/guidance", text: "Tabs" },
85-
{ id: 61, link: "/projects/sistent/components/tabs/code", text: "Tabs" },
86+
{ id: 62, link: "/projects/sistent/components/tabs", text: "Tabs" },
87+
{ id: 63, link: "/projects/sistent/components/tabs/guidance", text: "Tabs" },
88+
{ id: 64, link: "/projects/sistent/components/tabs/code", text: "Tabs" },
8689

87-
{ id: 62, link: "/projects/sistent/components/text-field", text: "Text Field" },
88-
{ id: 63, link: "/projects/sistent/components/text-field/guidance", text: "Text Field" },
89-
{ id: 64, link: "/projects/sistent/components/text-field/code", text: "Text Field" },
90+
{ id: 65, link: "/projects/sistent/components/text-field", text: "Text Field" },
91+
{ id: 66, link: "/projects/sistent/components/text-field/guidance", text: "Text Field" },
92+
{ id: 67, link: "/projects/sistent/components/text-field/code", text: "Text Field" },
9093

91-
{ id: 65, link: "/projects/sistent/components/text-input", text: "Text Input" },
92-
{ id: 66, link: "/projects/sistent/components/text-input/guidance", text: "Text Input" },
93-
{ id: 67, link: "/projects/sistent/components/text-input/code", text: "Text Input" },
94+
{ id: 68, link: "/projects/sistent/components/text-input", text: "Text Input" },
95+
{ id: 69, link: "/projects/sistent/components/text-input/guidance", text: "Text Input" },
96+
{ id: 70, link: "/projects/sistent/components/text-input/code", text: "Text Input" },
9497

95-
{ id: 68, link: "/projects/sistent/components/toolbar", text: "Toolbar" },
96-
{ id: 69, link: "/projects/sistent/components/toolbar/guidance", text: "Toolbar" },
97-
{ id: 70, link: "/projects/sistent/components/toolbar/code", text: "Toolbar" },
98+
{ id: 71, link: "/projects/sistent/components/toolbar", text: "Toolbar" },
99+
{ id: 72, link: "/projects/sistent/components/toolbar/guidance", text: "Toolbar" },
100+
{ id: 73, link: "/projects/sistent/components/toolbar/code", text: "Toolbar" },
98101

99-
{ id: 71, link: "/projects/sistent/components/tooltip", text: "Tooltip" },
100-
{ id: 72, link: "/projects/sistent/components/tooltip/guidance", text: "Tooltip" },
101-
{ id: 73, link: "/projects/sistent/components/tooltip/code", text: "Tooltip" },
102-
];
102+
{ id: 74, link: "/projects/sistent/components/tooltip", text: "Tooltip" },
103+
{ id: 75, link: "/projects/sistent/components/tooltip/guidance", text: "Tooltip" },
104+
{ id: 76, link: "/projects/sistent/components/tooltip/code", text: "Tooltip" },
105+
];

src/components/SistentNavigation/index.js

Lines changed: 72 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ import { useLocation } from "@reach/router";
1212
const TOC = () => {
1313
const [expand, setExpand] = useState(false);
1414
const location = useLocation();
15+
const [expandGettingStarted, setExpandGettingStarted] = useState(
16+
location.pathname.includes("/getting-started")
17+
);
1518
const [expandIdenity, setExpandIdentity] = useState(
1619
location.pathname.includes("/identity")
1720
);
@@ -52,13 +55,74 @@ const TOC = () => {
5255
<div className="toc-list">
5356
<ul className={`toc-ul ${expand ? "toc-ul-open" : ""}`}>
5457
<li>
55-
<Link
56-
to="/projects/sistent/about"
57-
className="toc-sub-heading toc-sub-inline"
58-
activeClassName="active"
59-
>
60-
About
61-
</Link>
58+
<div>
59+
<li
60+
className="toc-sub-heading getting-started"
61+
onClick={() => setExpandGettingStarted((prev) => !prev)}
62+
>
63+
Getting Started
64+
{expandGettingStarted ?
65+
<IoIosArrowDown style={{ zIndex: 2 }} /> :
66+
<IoIosArrowForward style={{ zIndex: 2 }} />
67+
}
68+
</li>
69+
{expandGettingStarted && (
70+
<div className="getting-started-sublinks">
71+
<li>
72+
<Link
73+
to="/projects/sistent/getting-started/about"
74+
className={`toc-sub-heading toc-sub-inline getting-started-item ${
75+
location.pathname.includes("/projects/sistent/getting-started/about")
76+
? "active"
77+
: ""
78+
}`}
79+
activeClassName="active"
80+
>
81+
About
82+
</Link>
83+
</li>
84+
<li>
85+
<Link
86+
to="/projects/sistent/getting-started/installation"
87+
className={`toc-sub-heading toc-sub-inline getting-started-item ${
88+
location.pathname.includes("/projects/sistent/getting-started/installation")
89+
? "active"
90+
: ""
91+
}`}
92+
activeClassName="active"
93+
>
94+
Installation
95+
</Link>
96+
</li>
97+
<li>
98+
<Link
99+
to="/projects/sistent/getting-started/usage"
100+
className={`toc-sub-heading toc-sub-inline getting-started-item ${
101+
location.pathname.includes("/projects/sistent/getting-started/usage")
102+
? "active"
103+
: ""
104+
}`}
105+
activeClassName="active"
106+
>
107+
Usage
108+
</Link>
109+
</li>
110+
<li>
111+
<Link
112+
to="/projects/sistent/getting-started/tokens"
113+
className={`toc-sub-heading toc-sub-inline getting-started-item ${
114+
location.pathname.includes("/projects/sistent/getting-started/tokens")
115+
? "active"
116+
: ""
117+
}`}
118+
activeClassName="active"
119+
>
120+
Tokens
121+
</Link>
122+
</li>
123+
</div>
124+
)}
125+
</div>
62126
</li>
63127
<li>
64128
<div>
@@ -164,4 +228,4 @@ const TOC = () => {
164228
);
165229
};
166230

167-
export default TOC;
231+
export default TOC;

src/components/SistentNavigation/toc.style.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ const TOCWrapper = styled.div`
135135
background-color: transparent;
136136
}
137137
138-
.identity, .components {
138+
.identity, .components, .getting-started {
139139
display: flex;
140140
width: 100%;
141141
justify-content: space-between;

src/pages/projects/sistent/about.js renamed to src/pages/projects/sistent/getting-started/about/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react";
2-
import SistentAbout from "../../../sections/Projects/Sistent/about";
2+
import SistentAbout from "../../../../../sections/Projects/Sistent/getting-started/about";
33

44
const SistentAboutPage = () => {
55
return <SistentAbout />;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import React from "react";
2+
import SistentInstallation from "../../../../../sections/Projects/Sistent/getting-started/installation";
3+
4+
const SistentInstallationPage = () => {
5+
return <SistentInstallation />;
6+
};
7+
8+
export default SistentInstallationPage;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import React from "react";
2+
import SistentTokens from "../../../../../sections/Projects/Sistent/getting-started/tokens";
3+
4+
const SistentTokensPage = () => {
5+
return <SistentTokens />;
6+
};
7+
8+
export default SistentTokensPage;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import React from "react";
2+
import SistentUsage from "../../../../../sections/Projects/Sistent/getting-started/usage";
3+
4+
const SistentUsagePage = () => {
5+
return <SistentUsage />;
6+
};
7+
8+
export default SistentUsagePage;

0 commit comments

Comments
 (0)