-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: lakshya <[email protected]>
- Loading branch information
Showing
41 changed files
with
2,577 additions
and
1,931 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,46 @@ | ||
export const content = [ | ||
{ id: 0, link: "/projects/sistent/about", text: "About Sistent" }, | ||
{ id: 1, link: "/projects/sistent/identity/color", text: "Colors" }, | ||
{ id: 2, link: "/projects/sistent/identity/spacing", text: "Spacing" }, | ||
{ id: 3, link: "/projects/sistent/identity/typography", text: "Typography" }, | ||
{ id: 4, link: "/projects/sistent/components", text: "Components" }, | ||
{ id: 2, link: "/projects/sistent/identity/color/guidance", text: "Colors" }, | ||
{ id: 3, link: "/projects/sistent/identity/color/code", text: "Colors" }, | ||
{ id: 4, link: "/projects/sistent/identity/spacing", text: "Spacing" }, | ||
{ | ||
id: 5, | ||
link: "/projects/sistent/identity/spacing/guidance", | ||
text: "Spacing", | ||
}, | ||
{ id: 6, link: "/projects/sistent/identity/spacing/code", text: "Spacing" }, | ||
{ id: 7, link: "/projects/sistent/identity/typography", text: "Typography" }, | ||
{ | ||
id: 8, | ||
link: "/projects/sistent/identity/typography/guidance", | ||
text: "Typography", | ||
}, | ||
{ | ||
id: 9, | ||
link: "/projects/sistent/identity/typography/code", | ||
text: "Typography", | ||
}, | ||
{ id: 10, link: "/projects/sistent/components/button", text: "Button" }, | ||
{ | ||
id: 10, | ||
link: "/projects/sistent/components/button/guidance", | ||
text: "Button", | ||
}, | ||
{ id: 11, link: "/projects/sistent/components/button/code", text: "Button" }, | ||
{ | ||
id: 12, | ||
link: "/projects/sistent/components/text-input", | ||
text: "Text Input", | ||
}, | ||
{ | ||
id: 13, | ||
link: "/projects/sistent/components/text-input/guidance", | ||
text: "Text Input", | ||
}, | ||
{ | ||
id: 14, | ||
link: "/projects/sistent/components/text-input/code", | ||
text: "Text Input", | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
import React, { useEffect, useState } from "react"; | ||
import { Link } from "gatsby"; | ||
import styled from "styled-components"; | ||
|
||
const JoinCommunityWrapper = styled.div` | ||
width: 18rem; | ||
@media screen and (min-width: 751px) and (max-width: 1279px) { | ||
display: none; | ||
} | ||
.intra-page { | ||
position: sticky; | ||
top: 10rem; | ||
right: 0rem; | ||
margin-right: 1rem; | ||
padding-bottom: 5rem; | ||
padding-right: 2rem; | ||
align-items: left; | ||
justify-content: space-around; | ||
display: flex; | ||
flex-direction: column; | ||
overflow: hidden; | ||
.list { | ||
color: #000000; | ||
} | ||
.active { | ||
font-weight: 5000; | ||
color: #000000; | ||
} | ||
ul { | ||
list-style: none; | ||
top: 3rem; | ||
li { | ||
padding-bottom: 0.5rem; | ||
padding-top: 0.5rem; | ||
} | ||
} | ||
@media only screen and (min-width: 1280px) and (max-width: 1350px) { | ||
padding-right: 0rem; | ||
margin-right: 0rem; | ||
} | ||
@media only screen and (max-width: 950px) { | ||
width: 0; | ||
opacity: 0; | ||
height: 0; | ||
transition: none; | ||
visibility: hidden; | ||
} | ||
} | ||
.learn { | ||
width: 10rem; | ||
} | ||
`; | ||
|
||
function IntraPage() { | ||
const [contents, setContents] = useState([]); | ||
|
||
useEffect(() => { | ||
const anchors = document.querySelectorAll(".main-content > a"); | ||
console.log(anchors); | ||
if (anchors) { | ||
setContents( | ||
Array.from(anchors).map((a) => ({ | ||
id: a.id, | ||
link: `#${a.id}`, | ||
text: a.id, | ||
})) | ||
); | ||
} | ||
}, []); | ||
|
||
const [intapath, setIntapath] = useState(null); | ||
useEffect(() => { | ||
const path = window.location.pathname; | ||
setIntapath(path); | ||
}, []); | ||
|
||
return ( | ||
<JoinCommunityWrapper> | ||
<div className="intra-page"> | ||
<ul> | ||
{contents.map((x) => ( | ||
<li key={x.id} className="list"> | ||
<Link | ||
to={`${intapath}${x.link}`} | ||
key={x.id} | ||
activeClassName="active" | ||
> | ||
{x.text} | ||
</Link> | ||
</li> | ||
))} | ||
</ul> | ||
</div> | ||
</JoinCommunityWrapper> | ||
); | ||
} | ||
|
||
export default IntraPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from "react"; | ||
import { ButtonCode } from "../../../../../sections/Projects/Sistent/components/button/code"; | ||
|
||
const ButtonCodePage = () => { | ||
return <ButtonCode />; | ||
}; | ||
|
||
export default ButtonCodePage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from "react"; | ||
import { ButtonGuidance } from "../../../../../sections/Projects/Sistent/components/button/guidance"; | ||
|
||
const ButtonGuidancePage = () => { | ||
return <ButtonGuidance />; | ||
}; | ||
|
||
export default ButtonGuidancePage; |
2 changes: 1 addition & 1 deletion
2
...ges/projects/sistent/components/button.js → ...ojects/sistent/components/button/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from "react"; | ||
import { TextInputCode } from "../../../../../sections/Projects/Sistent/components/text-input/code"; | ||
|
||
const TextInputCodePage = () => { | ||
return <TextInputCode />; | ||
}; | ||
|
||
export default TextInputCodePage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from "react"; | ||
import { TextInputGuidance } from "../../../../../sections/Projects/Sistent/components/text-input/guidance"; | ||
|
||
const TextInputGuidancePage = () => { | ||
return <TextInputGuidance />; | ||
}; | ||
|
||
export default TextInputGuidancePage; |
2 changes: 1 addition & 1 deletion
2
...projects/sistent/components/text-input.js → ...ts/sistent/components/text-input/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from "react"; | ||
import ColorCode from "../../../../../sections/Projects/Sistent/identity/color/code"; | ||
|
||
const ColorCodePage = () => { | ||
return <ColorCode />; | ||
}; | ||
|
||
export default ColorCodePage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from "react"; | ||
import ColorGuidance from "../../../../../sections/Projects/Sistent/identity/color/guidance"; | ||
|
||
const ColorGuidancePage = () => { | ||
return <ColorGuidance />; | ||
}; | ||
|
||
export default ColorGuidancePage; |
2 changes: 1 addition & 1 deletion
2
src/pages/projects/sistent/identity/color.js → .../projects/sistent/identity/color/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from "react"; | ||
import { SpacingCode } from "../../../../../sections/Projects/Sistent/identity/spacing/code"; | ||
|
||
const SpacingCodePage = () => { | ||
return <SpacingCode />; | ||
}; | ||
|
||
export default SpacingCodePage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from "react"; | ||
import { SpacingGuidance } from "../../../../../sections/Projects/Sistent/identity/spacing/guidance"; | ||
|
||
const SpacingGuidancePage = () => { | ||
return <SpacingGuidance />; | ||
}; | ||
|
||
export default SpacingGuidancePage; |
2 changes: 1 addition & 1 deletion
2
...ages/projects/sistent/identity/spacing.js → ...rojects/sistent/identity/spacing/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from "react"; | ||
import TypographyCode from "../../../../../sections/Projects/Sistent/identity/typography/code"; | ||
|
||
const TypographyCodePage = () => { | ||
return <TypographyCode />; | ||
}; | ||
|
||
export default TypographyCodePage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from "react"; | ||
import TypographyGuidance from "../../../../../sections/Projects/Sistent/identity/typography/guidance"; | ||
|
||
const TypographyGuidancePage = () => { | ||
return <TypographyGuidance />; | ||
}; | ||
|
||
export default TypographyGuidancePage; |
2 changes: 1 addition & 1 deletion
2
...s/projects/sistent/identity/typography.js → ...ects/sistent/identity/typography/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.