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
177 additions
and
187 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,46 @@ | ||
import { RESEARCH_CRUMBS } from "src/constants/breadcrumbs"; | ||
import ResearchIntro from "src/components/content/ResearchIntro"; | ||
|
||
import Breadcrumbs from "src/components/Breadcrumbs"; | ||
import PageSEO from "src/components/PageSEO"; | ||
import BetaAlert from "src/components/AppBetaAlert"; | ||
import ResearchArchetypes from "src/components/content/ResearchArchetypes"; | ||
import ResearchImpact from "src/components/content/ResearchImpact"; | ||
import ResearchMethodology from "src/components/content/ResearchMethodology"; | ||
import ResearchThemes from "src/components/content/ResearchThemes"; | ||
import { Metadata } from "next"; | ||
import { useTranslations } from "next-intl"; | ||
import { unstable_setRequestLocale } from "next-intl/server"; | ||
|
||
export function generateMetadata() { | ||
// TODO: Enable once [locale] folder created, see: https://next-intl-docs.vercel.app/docs/getting-started/app-router/with-i18n-routing | ||
// const t = await getTranslations({ locale: "en" }); | ||
const meta: Metadata = { | ||
// title: t("Research.page_title"), | ||
title: "Research | Simpler.Grants.gov", | ||
description: | ||
"A one‑stop shop for all federal discretionary funding to make it easy for you to discover, understand, and apply for opportunities.", | ||
}; | ||
|
||
return meta; | ||
} | ||
export default function Research() { | ||
// TODO: Remove when https://github.com/amannn/next-intl/issues/663 lands. | ||
unstable_setRequestLocale("en"); | ||
const t = useTranslations("Research"); | ||
|
||
return ( | ||
<> | ||
<PageSEO title={t("page_title")} description={t("meta_description")} /> | ||
<BetaAlert /> | ||
<Breadcrumbs breadcrumbList={RESEARCH_CRUMBS} /> | ||
<ResearchIntro /> | ||
<ResearchMethodology /> | ||
<div className="padding-top-4 bg-gray-5"> | ||
<ResearchArchetypes /> | ||
<ResearchThemes /> | ||
</div> | ||
<ResearchImpact /> | ||
</> | ||
); | ||
} |
13 changes: 6 additions & 7 deletions
13
.../src/pages/content/ResearchArchetypes.tsx → ...components/content/ResearchArchetypes.tsx
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,80 @@ | ||
import { ExternalRoutes } from "src/constants/routes"; | ||
import { useMessages, useTranslations } from "next-intl"; | ||
|
||
import { Grid } from "@trussworks/react-uswds"; | ||
|
||
import ContentLayout from "src/components/ContentLayout"; | ||
import { USWDSIcon } from "src/components/USWDSIcon"; | ||
|
||
const ResearchImpact = () => { | ||
const t = useTranslations("Research"); | ||
|
||
const email = ExternalRoutes.EMAIL_SIMPLERGRANTSGOV; | ||
|
||
const messages = useMessages() as unknown as IntlMessages; | ||
const keys = Object.keys(messages.Research.impact.boxes); | ||
|
||
return ( | ||
<ContentLayout | ||
title={t("impact.title")} | ||
data-testid="research-impact-content" | ||
titleSize="m" | ||
bottomBorder="none" | ||
> | ||
<Grid> | ||
<p className="usa-intro">{t("impact.paragraph_1")}</p> | ||
<p className="usa-intro text-bold margin-top-4"> | ||
{t("impact.paragraph_2")} | ||
</p> | ||
</Grid> | ||
<Grid row gap="lg" className="margin-top-2"> | ||
{keys.map((key) => { | ||
const title = t(`impact.boxes.${key}.title`); | ||
const content = t(`impact.boxes.${key}.content`); | ||
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> | ||
<Grid tabletLg={{ col: 8 }}> | ||
<h3 className="tablet-lg:font-sans-lg tablet-lg:margin-bottom-05"> | ||
{t("impact.title_2")} | ||
</h3> | ||
<p className="font-sans-md line-height-sans-4 desktop-lg:line-height-sans-6"> | ||
{t.rich("impact.paragraph_3", { | ||
email: (chunks) => ( | ||
<a | ||
href={`mailto:${email}`} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
{chunks} | ||
</a> | ||
), | ||
strong: (chunks) => <strong>{chunks}</strong>, | ||
newsletter: (chunks) => <a href={"/newsletter"}>{chunks}</a>, | ||
arrowUpRightFromSquare: () => ( | ||
<USWDSIcon | ||
className="usa-icon text-middle" | ||
name="launch" | ||
></USWDSIcon> | ||
), | ||
})} | ||
</p> | ||
</Grid> | ||
</ContentLayout> | ||
); | ||
}; | ||
|
||
export default ResearchImpact; |
4 changes: 2 additions & 2 deletions
4
frontend/src/pages/content/ResearchIntro.tsx → .../src/components/content/ResearchIntro.tsx
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
4 changes: 2 additions & 2 deletions
4
...tend/src/pages/content/ResearchThemes.tsx → ...src/components/content/ResearchThemes.tsx
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.