Skip to content

Commit 17c4049

Browse files
committed
updated the home page
1 parent f27d0b9 commit 17c4049

File tree

4 files changed

+59
-16
lines changed

4 files changed

+59
-16
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.column{
2+
display: flex;
3+
flex-direction: column;
4+
gap: 0.5em;
5+
}
6+
7+
.HomePageLinks{
8+
width: 440px;
9+
display: flex;
10+
justify-content:center;
11+
align-items: center;
12+
gap: 4em;
13+
position: relative;
14+
color: hsl(var(--primary));
15+
}
16+
17+
.HomePageLinkTitle{
18+
text-decoration: underline;
19+
text-underline-offset: 0.15em;
20+
text-decoration-color: hsl(var(--primary) / 0.3);
21+
}
22+
23+
.HomePageLinkTitle:hover {
24+
text-decoration-color: hsl(var(--primary));
25+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { contentManager } from "@/lib/contentManager"
2+
import styles from "./HomePage.module.css"
3+
import Link from "next/link"
4+
5+
export default function () {
6+
const outline = contentManager.getOutline()
7+
8+
const firstColumn = outline.slice(0, 4)
9+
const secondColumn = outline.slice(4, 8)
10+
11+
return (
12+
<div className={styles.HomePageLinks}>
13+
<div className={styles.column}>
14+
{firstColumn.map((ele, index) => (
15+
<Link key={index} className={styles.HomePageLink} href={contentManager.getPathWithPrefix(ele.steps[0].fullPath) as string}>
16+
<span>{index + 1}. </span>
17+
<span className={styles.HomePageLinkTitle}>{ele.title}</span>
18+
</Link>
19+
))}
20+
</div>
21+
<div className={styles.column}>
22+
{secondColumn.map((ele, index) => (
23+
<Link key={index + 5} className={styles.HomePageLink} href={contentManager.getPathWithPrefix(ele.steps[0].fullPath) as string}>
24+
<span>{index + 5}. </span>
25+
<span className={styles.HomePageLinkTitle}>{ele.title}</span>
26+
</Link>
27+
))}
28+
</div>
29+
</div>
30+
)
31+
}

app/components/HomePage/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {default as default} from "./HomePage"

app/page.tsx

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
import styles from "./styles/page.module.css";
2-
import Link from "next/link";
32
import cx from "classnames";
43
import { interFont, outfitFont } from "./styles/fonts";
5-
import RightArrow from "./styles/icons/RightArrow";
64
import CompanyLogos from "./components/CommunityLinks/CommunityLinks";
7-
import { contentManager } from "@/lib/contentManager";
5+
import HomePage from "./components/HomePage/HomePage";
86

97
export default function Home() {
10-
const outline = contentManager.getOutline();
118
return (
129
<div className={cx(styles.main, outfitFont.className)}>
1310
<div className={styles.wrapper}>
@@ -25,18 +22,7 @@ export default function Home() {
2522
</div>
2623
</div>
2724
</div>
28-
<Link
29-
href={
30-
contentManager.getPathWithPrefix(
31-
outline[0].steps[0].fullPath,
32-
) as string
33-
}
34-
>
35-
<button className={styles.mainBtn}>
36-
START NOW
37-
<RightArrow />
38-
</button>
39-
</Link>
25+
<HomePage/>
4026
</div>
4127
<div className={styles.footer}>
4228
<div className={cx(styles.footerText, interFont.className)}>

0 commit comments

Comments
 (0)