This repository has been archived by the owner on Sep 18, 2024. It is now read-only.
forked from HHS/simpler-grants-gov
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
630 additions
and
278 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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { Grid } from "@trussworks/react-uswds"; | ||
import { useTranslations, useMessages } from "next-intl"; | ||
import ContentLayout from "src/components/ContentLayout"; | ||
|
||
const ProcessIntro = () => { | ||
const t = useTranslations("Process"); | ||
|
||
const messages = useMessages() as unknown as IntlMessages; | ||
const keys = Object.keys(messages.Process.intro.boxes); | ||
|
||
return ( | ||
<ContentLayout | ||
title={t("intro.title")} | ||
data-testid="process-intro-content" | ||
paddingTop={false} | ||
> | ||
<Grid row gap> | ||
<Grid> | ||
<p className="tablet-lg:font-sans-xl line-height-sans-3 usa-intro margin-top-2"> | ||
{t("intro.content")} | ||
</p> | ||
</Grid> | ||
</Grid> | ||
|
||
<Grid row gap="lg" className="margin-top-2"> | ||
{keys.map((key) => { | ||
const title = t(`intro.boxes.${key}.title`); | ||
const content = t.rich(`intro.boxes.${key}.content`, { | ||
italics: (chunks) => <em>{chunks}</em>, | ||
}); | ||
return ( | ||
<Grid | ||
className="margin-bottom-6" | ||
key={title + "-key"} | ||
tabletLg={{ col: 4 }} | ||
> | ||
<div className="border radius-md border-base-lighter padding-x-205"> | ||
<h3 className="tablet-lg:font-serif-lg">{title}</h3> | ||
<p className="margin-top-0 font-sans-md line-height-sans-4 desktop-lg:line-height-sans-6"> | ||
{content} | ||
</p> | ||
</div> | ||
</Grid> | ||
); | ||
})} | ||
</Grid> | ||
</ContentLayout> | ||
); | ||
}; | ||
|
||
export default ProcessIntro; |
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,67 @@ | ||
import { ExternalRoutes } from "src/constants/routes"; | ||
|
||
import { useTranslations } from "next-intl"; | ||
import { Grid } from "@trussworks/react-uswds"; | ||
|
||
import ContentLayout from "src/components/ContentLayout"; | ||
|
||
const ProcessInvolved = () => { | ||
const t = useTranslations("Process"); | ||
|
||
const email = ExternalRoutes.EMAIL_SIMPLERGRANTSGOV; | ||
const para1 = t.rich("involved.paragraph_1", { | ||
email: (chunks) => ( | ||
<a href={`mailto:${email}`} target="_blank" rel="noopener noreferrer"> | ||
{chunks} | ||
</a> | ||
), | ||
strong: (chunks) => <strong> {chunks} </strong>, | ||
}); | ||
const para2 = t.rich("involved.paragraph_2", { | ||
github: (chunks) => ( | ||
<a | ||
className="usa-link--external" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
href={ExternalRoutes.GITHUB_REPO} | ||
> | ||
{chunks} | ||
</a> | ||
), | ||
wiki: (chunks) => ( | ||
<a | ||
className="usa-link--external" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
href={ExternalRoutes.WIKI} | ||
> | ||
{chunks} | ||
</a> | ||
), | ||
strong: (chunks) => <strong> {chunks} </strong>, | ||
}); | ||
return ( | ||
<ContentLayout data-testid="process-involved-content" bottomBorder="none"> | ||
<Grid row gap="lg"> | ||
<Grid tabletLg={{ col: 6 }}> | ||
<h3 className="tablet-lg:font-sans-lg tablet-lg:margin-bottom-05"> | ||
{t("involved.title_1")} | ||
</h3> | ||
<p className="font-sans-md line-height-sans-4 desktop-lg:line-height-sans-6"> | ||
{para1} | ||
</p> | ||
</Grid> | ||
<Grid tabletLg={{ col: 6 }}> | ||
<h3 className="tablet-lg:font-sans-lg tablet-lg:margin-bottom-05"> | ||
{t("involved.title_2")} | ||
</h3> | ||
<p className="font-sans-md line-height-sans-4 desktop-lg:line-height-sans-6"> | ||
{para2} | ||
</p> | ||
</Grid> | ||
</Grid> | ||
</ContentLayout> | ||
); | ||
}; | ||
|
||
export default ProcessInvolved; |
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,38 @@ | ||
import { PROCESS_CRUMBS } from "src/constants/breadcrumbs"; | ||
|
||
import BetaAlert from "src/components/BetaAlert"; | ||
|
||
import Breadcrumbs from "src/components/Breadcrumbs"; | ||
import PageSEO from "src/components/PageSEO"; | ||
import { Metadata } from "next"; | ||
import ProcessIntro from "src/app/[locale]/process/ProcessIntro"; | ||
import ProcessInvolved from "src/app/[locale]/process/ProcessInvolved"; | ||
import ProcessMilestones from "src/app/[locale]/process/ProcessMilestones"; | ||
import { useTranslations } from "next-intl"; | ||
import { getTranslations } from "next-intl/server"; | ||
|
||
export async function generateMetadata() { | ||
const t = await getTranslations({ locale: "en" }); | ||
const meta: Metadata = { | ||
title: t("Process.page_title"), | ||
description: t("Process.meta_description"), | ||
}; | ||
return meta; | ||
} | ||
|
||
export default function Process() { | ||
const t = useTranslations("Process"); | ||
|
||
return ( | ||
<> | ||
<PageSEO title={t("page_title")} description={t("meta_description")} /> | ||
<BetaAlert /> | ||
<Breadcrumbs breadcrumbList={PROCESS_CRUMBS} /> | ||
<ProcessIntro /> | ||
<div className="padding-top-4 bg-gray-5"> | ||
<ProcessMilestones /> | ||
</div> | ||
<ProcessInvolved /> | ||
</> | ||
); | ||
} |
Oops, something went wrong.