-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add colour for section background * update Card image container height * show 3 projects on homepage and add new section * create updates section component * fix dictionary entry used on project pages * modify Card.js to allow passing styling and html descriptions * allow excluding H1 nodes in FragmentRender * update homepage query * update homepage to use FragmentRender * add viewport to HEAD on all pages for tailwind * use grid ExploreUpdates.js * update homepage to use new query and fragments * add ExploreUpdates to home page and project pages * fix list styling on project pages * add margin for new sections on project pages * remove defaultprops throwing warnings * modify Card.js description to accept html * drill down for H1 in HeaderText.jsx * update mockdata * update home.test.js * revert dateModified * use js defaults in Link.js * create unit test and story for ExploreUpdates.js * add updates section to all article pages * rename filterProjects -> filterItems * sort updates by most recent on all pages * add missing ski link to homepage * add key to update pages to ensure proper navigation between update pages * update atoms/Link to support passing in next/link
- Loading branch information
Showing
31 changed files
with
4,768 additions
and
953 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
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
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
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,64 @@ | ||
import Link from "next/link"; | ||
import { Link as LinkWrapper } from "../atoms/Link"; | ||
import Card from "../molecules/Card"; | ||
|
||
export function ExploreUpdates({ | ||
heading, | ||
updatesData, | ||
href, | ||
linkLabel, | ||
locale, | ||
dictionary, | ||
}) { | ||
const updatesCards = updatesData.map((update) => { | ||
return ( | ||
<li key={update.scId} className="bg-white list-none my-3"> | ||
<Card | ||
customStyling="md:h-[190px] pb-6 flex flex-col justify-between" | ||
title={locale === "en" ? update.scTitleEn : update.scTitleFr} | ||
href={locale === "en" ? update.scPageNameEn : update.scPageNameFr} | ||
htmlDesc={ | ||
<div className="flex flex-col"> | ||
<span className="flex flex-row pl-6"> | ||
<p className="text-multi-neutrals-grey100 font-semibold"> | ||
{locale === "en" ? "Project:" : "Projet :"} | ||
</p> | ||
<p className="mt-0 pl-1">{`${update.scDateModifiedOverwrite}`}</p> | ||
</span> | ||
<span className="flex flex-row pl-6"> | ||
<p className="text-multi-neutrals-grey100 font-semibold"> | ||
{locale === "en" | ||
? dictionary.items[11].scTermEn | ||
: dictionary.items[11].scTermFr} | ||
</p> | ||
<p className="mt-0 pl-1">{`${update.scDateModifiedOverwrite}`}</p> | ||
</span> | ||
</div> | ||
} | ||
/> | ||
</li> | ||
); | ||
}); | ||
|
||
return ( | ||
<div className="mt-14 bg-custom-blue-updates-blue"> | ||
<div className="layout-container py-28"> | ||
<div className="grid grid-cols-12"> | ||
<h2 className="grid col-span-12 xl:col-span-8 mt-0">{heading}</h2> | ||
<ul className="grid col-span-12 xl:col-span-8">{updatesCards}</ul> | ||
<div className="grid col-span-12 xl:col-span-8 mt-4"> | ||
<div className="flex justify-end"> | ||
<LinkWrapper | ||
component={Link} | ||
id="seeAllUpdatesLink" | ||
href={href} | ||
lang={locale} | ||
text={linkLabel} | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
Oops, something went wrong.