Skip to content

Commit 2a99c9b

Browse files
authored
Merge pull request #68 from NYU-RTS/feature/landing-page-improvements
Add navigation links to feature items on the homepage
2 parents 6b334cc + 8298901 commit 2a99c9b

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

src/components/HomepageFeatures/index.tsx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1+
import Link from "@docusaurus/Link";
12
import MountainSvg from "@site/static/img/undraw_docusaurus_mountain.svg";
23
import ReactSvg from "@site/static/img/undraw_docusaurus_react.svg";
34
import TreeSvg from "@site/static/img/undraw_docusaurus_tree.svg";
45
import Heading from "@theme/Heading";
56
import clsx from "clsx";
7+
import { type ComponentProps } from "react";
68

79
import styles from "./styles.module.css";
810

911
interface FeatureItem {
1012
title: string;
1113
Svg: React.ComponentType<React.ComponentProps<"svg">>;
1214
description: React.ReactNode;
15+
to?: ComponentProps<typeof Link>["to"];
1316
}
1417

1518
const FeatureList: FeatureItem[] = [
@@ -22,6 +25,7 @@ const FeatureList: FeatureItem[] = [
2225
and expertise for research.
2326
</>
2427
),
28+
to: "/docs/hpc/getting_started/intro/",
2529
},
2630
{
2731
title: "High Speed Research Network",
@@ -33,6 +37,7 @@ const FeatureList: FeatureItem[] = [
3337
sciences.
3438
</>
3539
),
40+
to: "/docs/hsrn/intro/",
3641
},
3742
{
3843
title: "Pythia",
@@ -44,6 +49,7 @@ const FeatureList: FeatureItem[] = [
4449
LLMs and an on-prem vector database.
4550
</>
4651
),
52+
to: "/docs/genai/getting_started/intro/",
4753
},
4854
{
4955
title: "RTC",
@@ -55,6 +61,7 @@ const FeatureList: FeatureItem[] = [
5561
Google Cloud Platform.
5662
</>
5763
),
64+
to: "/docs/rtc/intro/",
5865
},
5966
{
6067
title: "SRDE",
@@ -66,20 +73,23 @@ const FeatureList: FeatureItem[] = [
6673
storage and computational resources specifically for sensitive data.
6774
</>
6875
),
76+
to: "/docs/srde/getting_started/intro/",
6977
},
7078
];
7179

72-
function Feature({ title, Svg, description }: FeatureItem) {
80+
function Feature({ title, Svg, description, to }: FeatureItem) {
81+
const Wrapper = to ? Link : "div";
82+
7383
return (
74-
<div className={clsx("col col--4")}>
84+
<Wrapper className={clsx("col col--4", to && styles.featureLink)} to={to}>
7585
<div className="text--center">
7686
<Svg className={styles.featureSvg} role="img" />
7787
</div>
7888
<div className="text--center padding-horiz--md">
7989
<Heading as="h3">{title}</Heading>
8090
<p>{description}</p>
8191
</div>
82-
</div>
92+
</Wrapper>
8393
);
8494
}
8595

src/components/HomepageFeatures/styles.module.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,15 @@
99
height: 200px;
1010
width: 200px;
1111
}
12+
13+
.featureLink {
14+
color: inherit;
15+
text-decoration: none;
16+
border-radius: 1rem;
17+
}
18+
19+
.featureLink:hover {
20+
color: inherit;
21+
text-decoration: none;
22+
background-color: rgb(0 0 0 / 5%);
23+
}

0 commit comments

Comments
 (0)