diff --git a/app/components/CertificateButton/index.tsx b/app/components/CertificateButton/index.tsx index 5bdd0fc..8f51a54 100644 --- a/app/components/CertificateButton/index.tsx +++ b/app/components/CertificateButton/index.tsx @@ -1 +1 @@ -export {default as default} from './CertificateButton'; \ No newline at end of file +export { default as default } from "./CertificateButton"; diff --git a/app/components/CommunityLinks/CommunityLinks.module.css b/app/components/CommunityLinks/CommunityLinks.module.css index ad1834d..b650470 100644 --- a/app/components/CommunityLinks/CommunityLinks.module.css +++ b/app/components/CommunityLinks/CommunityLinks.module.css @@ -6,12 +6,12 @@ position: relative; } .footerLink { - color: hsl(var(--primary)); + color: hsl(var(--text)); text-decoration: underline; text-underline-offset: 0.15em; - text-decoration-color: hsl(var(--primary) / 0.3); + text-decoration-color: hsl(var(--primary) / 0.5); } .footerLink:hover { - text-decoration-color: hsl(var(--primary)); + text-decoration-color: hsl(var(--text)); } diff --git a/app/components/HomePageLinks/HomePageLinks.module.css b/app/components/HomePageLinks/HomePageLinks.module.css new file mode 100644 index 0000000..df8f1f5 --- /dev/null +++ b/app/components/HomePageLinks/HomePageLinks.module.css @@ -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; +} diff --git a/app/components/HomePageLinks/HomePageLinks.tsx b/app/components/HomePageLinks/HomePageLinks.tsx new file mode 100644 index 0000000..e42224c --- /dev/null +++ b/app/components/HomePageLinks/HomePageLinks.tsx @@ -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 ( +