-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: learning pathway build implementation && intro tour guide (#96)
* cursor inconsistency in editor fixed (#95) Signed-off-by: Mahesh Patil <[email protected]> Signed-off-by: Vinyl-Davyl <[email protected]> * update(ui): secondary theme color (#93) * update: development Signed-off-by: Vinyl-Davyl <[email protected]> * update: development Signed-off-by: Vinyl-Davyl <[email protected]> --------- Signed-off-by: Vinyl-Davyl <[email protected]> Signed-off-by: Vinyl-Davyl <[email protected]> * chore(doc): doc updated with recent project feature (#92) * update: development Signed-off-by: Vinyl-Davyl <[email protected]> * update: development Signed-off-by: Vinyl-Davyl <[email protected]> --------- Signed-off-by: Vinyl-Davyl <[email protected]> Signed-off-by: Vinyl-Davyl <[email protected]> * update: development Signed-off-by: Vinyl-Davyl <[email protected]> Signed-off-by: Vinyl-Davyl <[email protected]> * update: development Signed-off-by: Vinyl-Davyl <[email protected]> Signed-off-by: Vinyl-Davyl <[email protected]> * update: development Signed-off-by: Vinyl-Davyl <[email protected]> Signed-off-by: Vinyl-Davyl <[email protected]> * update: development Signed-off-by: Vinyl-Davyl <[email protected]> Signed-off-by: Vinyl-Davyl <[email protected]> * update: development Signed-off-by: Vinyl-Davyl <[email protected]> Signed-off-by: Vinyl-Davyl <[email protected]> * update: development Signed-off-by: Vinyl-Davyl <[email protected]> Signed-off-by: Vinyl-Davyl <[email protected]> * update: development Signed-off-by: Vinyl-Davyl <[email protected]> Signed-off-by: Vinyl-Davyl <[email protected]> * update development Signed-off-by: Vinyl-Davyl <[email protected]> Signed-off-by: Vinyl-Davyl <[email protected]> * update: development Signed-off-by: Vinyl-Davyl <[email protected]> Signed-off-by: Vinyl-Davyl <[email protected]> * update: development Signed-off-by: Vinyl-Davyl <[email protected]> Signed-off-by: Vinyl-Davyl <[email protected]> * update: development Signed-off-by: Vinyl-Davyl <[email protected]> Signed-off-by: Vinyl-Davyl <[email protected]> * update: development Signed-off-by: Vinyl-Davyl <[email protected]> Signed-off-by: Vinyl-Davyl <[email protected]> * update: development Signed-off-by: Vinyl-Davyl <[email protected]> Signed-off-by: Vinyl-Davyl <[email protected]> * update: development Signed-off-by: Vinyl-Davyl <[email protected]> Signed-off-by: Vinyl-Davyl <[email protected]> * update: development Signed-off-by: Vinyl-Davyl <[email protected]> Signed-off-by: Vinyl-Davyl <[email protected]> * update: development Signed-off-by: Vinyl-Davyl <[email protected]> Signed-off-by: Vinyl-Davyl <[email protected]> * update: development Signed-off-by: Vinyl-Davyl <[email protected]> Signed-off-by: Vinyl-Davyl <[email protected]> * chore: updated contents Signed-off-by: Vinyl-Davyl <[email protected]> Signed-off-by: Vinyl-Davyl <[email protected]> * update: development Signed-off-by: Vinyl-Davyl <[email protected]> Signed-off-by: Vinyl-Davyl <[email protected]> * update: development Signed-off-by: Vinyl-Davyl <[email protected]> Signed-off-by: Vinyl-Davyl <[email protected]> * update: development Signed-off-by: Vinyl-Davyl <[email protected]> * update: development Signed-off-by: Vinyl-Davyl <[email protected]> * update: development Signed-off-by: Vinyl-Davyl <[email protected]> --------- Signed-off-by: Mahesh Patil <[email protected]> Signed-off-by: Vinyl-Davyl <[email protected]> Signed-off-by: Vinyl-Davyl <[email protected]> Co-authored-by: Mahesh Patil <[email protected]>
- Loading branch information
1 parent
55f9ce5
commit a39c4c6
Showing
32 changed files
with
14,597 additions
and
6,126 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 @@ | ||
/* /index.html 200 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
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,123 @@ | ||
import React, { useEffect, useState } from "react"; | ||
import ReactMarkdown from "react-markdown"; | ||
import rehypeRaw from "rehype-raw"; | ||
import rehypeHighlight from "rehype-highlight"; | ||
import { useNavigate } from "react-router-dom"; | ||
import { | ||
ContentContainer, | ||
NavigationButtons, | ||
NavigationButton, | ||
} from "../styles/components/Content"; | ||
import { | ||
LoadingOutlined, | ||
LeftOutlined, | ||
RightOutlined, | ||
} from "@ant-design/icons"; | ||
import { Spin } from "antd"; | ||
import fetchContent from "../utils/fetchContent"; | ||
import { steps } from "../constants/learningSteps/steps"; | ||
|
||
// markdown syntax highlighting theme | ||
import "highlight.js/styles/github.css"; | ||
|
||
interface LearnContentProps { | ||
file: string; | ||
} | ||
|
||
const LearnContent: React.FC<LearnContentProps> = ({ file }) => { | ||
const [content, setContent] = useState<string | null>(null); | ||
const [loading, setLoading] = useState(true); | ||
const [error, setError] = useState<string | null>(null); | ||
const navigate = useNavigate(); | ||
|
||
useEffect(() => { | ||
const loadContent = async () => { | ||
try { | ||
setLoading(true); | ||
const content = await fetchContent(file); | ||
setContent(content); | ||
setError(null); | ||
} catch (err: any) { | ||
setError("Failed to load content"); | ||
} finally { | ||
setLoading(false); | ||
} | ||
}; | ||
|
||
loadContent(); | ||
}, [file]); | ||
|
||
const currentIndex = steps.findIndex((step) => | ||
step.link.includes(file.split(".")[0]) | ||
); | ||
|
||
const handlePrevious = () => { | ||
if (currentIndex > 0) { | ||
navigate(steps[currentIndex - 1].link); | ||
} | ||
}; | ||
|
||
const handleNext = () => { | ||
if (currentIndex < steps.length - 1) { | ||
navigate(steps[currentIndex + 1].link); | ||
} | ||
}; | ||
|
||
if (loading) { | ||
return ( | ||
<div | ||
style={{ | ||
flex: 1, | ||
display: "flex", | ||
justifyContent: "center", | ||
alignItems: "center", | ||
}} | ||
> | ||
<Spin | ||
indicator={ | ||
<LoadingOutlined style={{ fontSize: 42, color: "#19c6c7" }} spin /> | ||
} | ||
/> | ||
</div> | ||
); | ||
} | ||
|
||
if (error) { | ||
return <div>Error: {error}</div>; | ||
} | ||
|
||
return ( | ||
<ContentContainer> | ||
{content && ( | ||
<ReactMarkdown | ||
rehypePlugins={[rehypeRaw, rehypeHighlight]} | ||
components={{ | ||
img: ({ node, ...props }) => ( | ||
<div className="image-container"> | ||
<img {...props} alt={props.alt || ""} /> | ||
</div> | ||
), | ||
}} | ||
> | ||
{content} | ||
</ReactMarkdown> | ||
)} | ||
<NavigationButtons> | ||
<NavigationButton | ||
onClick={handlePrevious} | ||
disabled={currentIndex === 0} | ||
> | ||
<LeftOutlined /> Previous | ||
</NavigationButton> | ||
<NavigationButton | ||
onClick={handleNext} | ||
disabled={currentIndex === steps.length - 1} | ||
> | ||
Next <RightOutlined /> | ||
</NavigationButton> | ||
</NavigationButtons> | ||
</ContentContainer> | ||
); | ||
}; | ||
|
||
export default LearnContent; |
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
Oops, something went wrong.