File tree Expand file tree Collapse file tree 6 files changed +47
-35
lines changed Expand file tree Collapse file tree 6 files changed +47
-35
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ import { contentManager } from "@/lib/contentManager" ;
2
+ import styles from "./HomePage.module.css" ;
3
+ import Link from "next/link" ;
4
+
5
+ export default function HomePageLinks ( ) {
6
+ const outline = contentManager . getOutline ( ) ;
7
+
8
+ const half = Math . ceil ( outline . length / 2 ) ;
9
+ const firstColumn = outline . slice ( 0 , half ) ;
10
+ const secondColumn = outline . slice ( half ) ;
11
+
12
+ return (
13
+ < div className = { styles . HomePageLinks } >
14
+ < div className = { styles . column } >
15
+ { firstColumn . map ( ( ele , index ) => (
16
+ < Link
17
+ key = { index }
18
+ className = { styles . HomePageLink }
19
+ href = {
20
+ contentManager . getPathWithPrefix ( ele . steps [ 0 ] . fullPath ) as string
21
+ }
22
+ >
23
+ < span > { index + 1 } . </ span >
24
+ < span className = { styles . HomePageLinkTitle } > { ele . title } </ span >
25
+ </ Link >
26
+ ) ) }
27
+ </ div >
28
+ < div className = { styles . column } >
29
+ { secondColumn . map ( ( ele , index ) => (
30
+ < Link
31
+ key = { index + half + 1 }
32
+ className = { styles . HomePageLink }
33
+ href = {
34
+ contentManager . getPathWithPrefix ( ele . steps [ 0 ] . fullPath ) as string
35
+ }
36
+ >
37
+ < span > { index + half + 1 } . </ span >
38
+ < span className = { styles . HomePageLinkTitle } > { ele . title } </ span >
39
+ </ Link >
40
+ ) ) }
41
+ </ div >
42
+ </ div >
43
+ ) ;
44
+ }
Original file line number Diff line number Diff line change
1
+ export { default as default } from "./HomePageLinks" ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import styles from "./styles/page.module.css";
2
2
import cx from "classnames" ;
3
3
import { interFont , outfitFont } from "./styles/fonts" ;
4
4
import CompanyLogos from "./components/CommunityLinks/CommunityLinks" ;
5
- import HomePage from "./components/HomePage/HomePage " ;
5
+ import HomePage from "./components/HomePageLinks/HomePageLinks " ;
6
6
7
7
export default function Home ( ) {
8
8
return (
@@ -23,7 +23,7 @@ export default function Home() {
23
23
</ div >
24
24
</ div >
25
25
</ div >
26
- < HomePage />
26
+ < HomePage />
27
27
</ div >
28
28
< div className = { styles . footer } >
29
29
< div className = { cx ( styles . footerText , interFont . className ) } >
You can’t perform that action at this time.
0 commit comments