diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..521a9f7 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +legacy-peer-deps=true diff --git a/components/Header.tsx b/components/Header.tsx index 2d5df38..624dc53 100644 --- a/components/Header.tsx +++ b/components/Header.tsx @@ -1,21 +1,35 @@ -import Link from "next/link"; +import router from "next/router"; import { ThemeToggle } from "./ThemeToggle"; import { Button } from "./ds/ButtonComponent"; -import { GitHubLogoIcon } from "@radix-ui/react-icons"; +import { ArrowLeftIcon, GitHubLogoIcon } from "@radix-ui/react-icons"; -export default function Header() { +interface HeaderProps { + // The utilities index hides the back link; tool pages show it. + showBackLink?: boolean; +} + +export default function Header({ showBackLink = true }: HeaderProps) { return ( -
+
- - - + {showBackLink && ( + + )}
-
+
); } - -const Logo = () => { - return ( - - - - - - - - - - - - - ); -}; - -const Favicon = () => { - return ( - - - - - - - - - ); -}; diff --git a/components/HomeCard.tsx b/components/HomeCard.tsx index daa0fcc..f865e0a 100644 --- a/components/HomeCard.tsx +++ b/components/HomeCard.tsx @@ -20,7 +20,9 @@ export default function HomeCard({ title, description, link }: HomeCardProps) { {title} {description} - + diff --git a/components/JamCallToAction.tsx b/components/JamCallToAction.tsx new file mode 100644 index 0000000..b978307 --- /dev/null +++ b/components/JamCallToAction.tsx @@ -0,0 +1,56 @@ +import { GitHubLogoIcon } from "@radix-ui/react-icons"; +import { getBannerCopy, JAM_URL } from "./utils/jam-cta"; + +interface JamCallToActionProps { + // Page slug under /utilities, used to pick the banner copy. + tool?: string; +} + +export default function JamCallToAction({ tool }: JamCallToActionProps) { + const copy = getBannerCopy(tool); + + return ( +
+
+
+ +
+

{copy.title}

+

+ {copy.description} +

+
+
+ + + Try Jam + +
+ +

+ + + These tools are open source.{" "} + + Contribute on GitHub + + +

+
+ ); +} diff --git a/components/ThemeToggle.tsx b/components/ThemeToggle.tsx index 7096a7b..843d96f 100644 --- a/components/ThemeToggle.tsx +++ b/components/ThemeToggle.tsx @@ -8,7 +8,7 @@ export function ThemeToggle() { return (