generated from json-schema-org/repo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* gives proper text color to a completed and active task * refactor: css * updated the home page * modifiend ui * made the homepage responsive * refactor: rename component * refactor: use CSS grids * refactor: styles * format: files * styles: fix gap --------- Co-authored-by: JeelRajodiya <[email protected]>
- Loading branch information
1 parent
a7678e3
commit 888447a
Showing
12 changed files
with
101 additions
and
75 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 +1 @@ | ||
export {default as default} from './CertificateButton'; | ||
export { default as default } from "./CertificateButton"; |
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 @@ | ||
/* grid of 4 rows */ | ||
.HomePageLinks { | ||
display: grid; | ||
grid-template-rows: repeat(4, 1fr); | ||
gap: 8px; | ||
column-gap: 32px; | ||
grid-auto-flow: column; | ||
} |
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,40 @@ | ||
import { contentManager } from "@/lib/contentManager"; | ||
import styles from "./HomePageLinks.module.css"; | ||
import Link from "next/link"; | ||
import { useMemo } from "react"; | ||
import CommunityLinksStyles from "@/app/components/CommunityLinks/CommunityLinks.module.css"; | ||
|
||
export default function HomePageLinks() { | ||
const outline = contentManager.getOutline(); | ||
const totalChapters = contentManager.getTotalChapters(); | ||
const chapterInfo: { | ||
title: string; | ||
link: string; | ||
}[] = useMemo(() => { | ||
const chapterInfo = []; | ||
for (let i = 0; i < totalChapters; i++) { | ||
const chapter = outline[i]; | ||
chapterInfo.push({ | ||
title: chapter.title, | ||
link: contentManager.getPathWithPrefix( | ||
chapter.steps[0].fullPath, | ||
) as string, | ||
}); | ||
} | ||
return chapterInfo; | ||
}, []); | ||
|
||
return ( | ||
<div className={styles.HomePageLinks}> | ||
{chapterInfo.map((chapter, index) => ( | ||
<Link | ||
key={index} | ||
href={chapter.link} | ||
className={CommunityLinksStyles.footerLink} | ||
> | ||
{index + 1}. {chapter.title} | ||
</Link> | ||
))} | ||
</div> | ||
); | ||
} |
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 @@ | ||
export { default as default } from "./HomePageLinks"; |
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
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
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
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