Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
Updates process page
Browse files Browse the repository at this point in the history
  • Loading branch information
acouch committed May 15, 2024
1 parent 8b4a6eb commit 6ee2e8f
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 44 deletions.
1 change: 1 addition & 0 deletions frontend/src/app/process/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default function Process() {
<div className="padding-top-4 bg-gray-5">
<ProcessMilestones />
</div>
<ProcessInvolved />
</>
);
}
71 changes: 33 additions & 38 deletions frontend/src/pages/content/ProcessInvolved.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,43 @@
import { ExternalRoutes } from "src/constants/routes";

import { Trans, useTranslation } from "next-i18next";
import { useTranslations } from "next-intl";
import { Grid } from "@trussworks/react-uswds";

import ContentLayout from "src/components/ContentLayout";

const ProcessInvolved = () => {
const { t } = useTranslation("common", { keyPrefix: "Process" });
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>
),
});
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>
),
});
return (
<ContentLayout data-testid="process-involved-content" bottomBorder="none">
<Grid row gap="lg">
Expand All @@ -18,48 +46,15 @@ const ProcessInvolved = () => {
{t("involved.title_1")}
</h3>
<p className="font-sans-md line-height-sans-4 desktop-lg:line-height-sans-6">
<Trans
t={t}
i18nKey={"involved.paragraph_1"}
components={{
email: (
<a
href={`mailto:${email}`}
target="_blank"
rel="noopener noreferrer"
/>
),
}}
/>
{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">
<Trans
t={t}
i18nKey={"involved.paragraph_2"}
components={{
github: (
<a
className="usa-link--external"
target="_blank"
rel="noopener noreferrer"
href={ExternalRoutes.GITHUB_REPO}
/>
),
wiki: (
<a
className="usa-link--external"
target="_blank"
rel="noopener noreferrer"
href={ExternalRoutes.WIKI}
/>
),
}}
/>
{para2}
</p>
</Grid>
</Grid>
Expand Down
19 changes: 13 additions & 6 deletions frontend/src/pages/content/ProcessMilestones.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,17 @@ const ProcessMilestones = () => {
switch (iconIndex) {
case 0:
return (
<Image src={SearchSvg} aria-hidden={true} className="text-middle" />
<Image
alt="magnifying glass icon"
src={SearchSvg as string}
aria-hidden={true}
className="text-middle"
/>
);
case 1:
return (
<Image
src={AssessmentSvg}
src={AssessmentSvg as string}
aria-hidden={true}
className="text-middle"
alt="Icon that looks like graph"
Expand All @@ -45,7 +50,7 @@ const ProcessMilestones = () => {
case 2:
return (
<Image
src={ContentCopySvg}
src={ContentCopySvg as string}
aria-hidden={true}
className="text-middle"
alt="Content copy icon"
Expand Down Expand Up @@ -90,7 +95,7 @@ const ProcessMilestones = () => {
// Don't show the chevron in the last row item.
index < keys.length - 1 ? (
<Image
src={NavigationNextSVG}
src={NavigationNextSVG as string}
alt="chevron pointing right"
className="display-none tablet-lg:display-block text-base-lighter position-absolute right-0 top-0 margin-right-neg-5"
aria-label="launch"
Expand Down Expand Up @@ -141,7 +146,8 @@ const ProcessMilestones = () => {
<Button className="margin-bottom-4" type="button" size="big">
<span className="margin-right-5">{t("milestones.cta_1")}</span>
<Image
src={LaunchSVG}
src={LaunchSVG as string}
alt="icon"
className="text-middle margin-left-neg-4"
aria-label="launch"
/>
Expand All @@ -155,7 +161,8 @@ const ProcessMilestones = () => {
<small className="display-block font-sans-lg margin-bottom-105">
{t("milestones.roadmap_2")}
<Image
src={NavigationNextSVG}
src={NavigationNextSVG as string}
alt="chevron pointing right"
className="text-middle text-base-light"
aria-label="launch"
/>
Expand Down

0 comments on commit 6ee2e8f

Please sign in to comment.