From ae085109d8f3575230aa8e2be7ea65562f8adb35 Mon Sep 17 00:00:00 2001 From: Michael Kinder Date: Mon, 19 Feb 2024 14:00:16 -0500 Subject: [PATCH 1/6] Fix link in Header component --- app/[locale]/Header.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/[locale]/Header.tsx b/app/[locale]/Header.tsx index d33fb7a5..6d56c85d 100644 --- a/app/[locale]/Header.tsx +++ b/app/[locale]/Header.tsx @@ -59,7 +59,7 @@ export default function Header() { >
{tGlobal("name")} From 149089cda26a5eec634e794e1420db70109c8a8e Mon Sep 17 00:00:00 2001 From: Michael Kinder Date: Mon, 19 Feb 2024 14:35:33 -0500 Subject: [PATCH 2/6] Add footer section to en.json --- messages/en.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/messages/en.json b/messages/en.json index d6a4db98..49aa9caa 100644 --- a/messages/en.json +++ b/messages/en.json @@ -43,6 +43,25 @@ } } }, + "footer": { + "footer": "Footer", + "nav": { + "licensingName": "Licensing", + "privacyPolicyName": "Privacy Policy", + "TrademarksName": "Trademarks" + }, + "socialNav": { + "facebook": "Facebook", + "github": "GitHub", + "instagram": "Instagram", + "linkedin": "LinkedIn", + "mastodon": "Mastodon", + "threads": "Threads", + "x": "X", + "youtube": "YouTube" + }, + "disclaimer": "Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries. Red Hat Enterprise Linux, RHEL and CentOS are trademarks or registered trademarks of Red Hat, Inc. or its subsidiaries in the US and other countries. We are not affiliated with, endorsed by or sponsored by Red Hat, Inc." + }, "home": { "hero": { "title": "Enterprise Linux, the community way.", From cd2a69362b0b70493f70d5f15ba0cf4c615e01e6 Mon Sep 17 00:00:00 2001 From: Michael Kinder Date: Mon, 19 Feb 2024 14:36:01 -0500 Subject: [PATCH 3/6] Add footer component --- app/[locale]/Footer.tsx | 203 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 app/[locale]/Footer.tsx diff --git a/app/[locale]/Footer.tsx b/app/[locale]/Footer.tsx new file mode 100644 index 00000000..8d6ff5fa --- /dev/null +++ b/app/[locale]/Footer.tsx @@ -0,0 +1,203 @@ +import { useTranslations } from "next-intl"; +import { JSX, SVGProps } from "react"; + +export default function Footer() { + const tFooter = useTranslations("footer"); + + const navigation = { + main: [ + { name: tFooter("nav.licensingName"), href: "/legal/licensing" }, + { name: tFooter("nav.privacyPolicyName"), href: "/legal/privacy" }, + { name: tFooter("nav.TrademarksName"), href: "/legal/trademarks" }, + ], + social: [ + { + name: tFooter("socialNav.mastodon"), + href: "https://fosstodon.org/@rockylinux", + icon: (props: JSX.IntrinsicAttributes & SVGProps) => ( + + + + + ), + }, + { + name: tFooter("socialNav.facebook"), + href: "https://www.facebook.com/rockylinuxofficial", + icon: (props: JSX.IntrinsicAttributes & SVGProps) => ( + + + + ), + }, + { + name: tFooter("socialNav.instagram"), + href: "https://www.instagram.com/rockylinuxofficial", + icon: (props: JSX.IntrinsicAttributes & SVGProps) => ( + + + + ), + }, + { + name: tFooter("socialNav.threads"), + href: "https://www.threads.net/@rockylinuxofficial", + icon: (props: JSX.IntrinsicAttributes & SVGProps) => ( + + + + ), + }, + { + name: tFooter("socialNav.linkedin"), + href: "https://www.linkedin.com/company/rockylinux/", + icon: (props: JSX.IntrinsicAttributes & SVGProps) => ( + + + + + + + ), + }, + { + name: tFooter("socialNav.x"), + href: "https://x.com/rocky_linux", + icon: (props: JSX.IntrinsicAttributes & SVGProps) => ( + + + + ), + }, + { + name: tFooter("socialNav.github"), + href: "https://github.com/rocky-linux", + icon: (props: JSX.IntrinsicAttributes & SVGProps) => ( + + + + ), + }, + { + name: tFooter("socialNav.youtube"), + href: "https://www.youtube.com/@RockyLinux", + icon: (props: JSX.IntrinsicAttributes & SVGProps) => ( + + + + ), + }, + ], + }; + + return ( + + ); +} From 309f08ae7f6484cc33b8fce571bf12d057c7bb32 Mon Sep 17 00:00:00 2001 From: Michael Kinder Date: Mon, 19 Feb 2024 14:36:11 -0500 Subject: [PATCH 4/6] Add Footer component to layout --- app/[locale]/layout.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/[locale]/layout.tsx b/app/[locale]/layout.tsx index bedf9648..93837fb7 100644 --- a/app/[locale]/layout.tsx +++ b/app/[locale]/layout.tsx @@ -9,6 +9,7 @@ import { cn } from "@/lib/utils"; import { ThemeProvider } from "@/components/ThemeProvider"; import Header from "./Header"; +import Footer from "./Footer"; import type { Metadata } from "next"; import type { ReactNode } from "react"; @@ -60,6 +61,7 @@ export default function RootLayout({ >
{children}
+
From 9e8e849dd24583199d5e347312f2213598d9ccb3 Mon Sep 17 00:00:00 2001 From: Michael Kinder Date: Mon, 19 Feb 2024 15:56:55 -0500 Subject: [PATCH 5/6] Add Link component to Footer --- app/[locale]/Footer.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/[locale]/Footer.tsx b/app/[locale]/Footer.tsx index 8d6ff5fa..83eaad84 100644 --- a/app/[locale]/Footer.tsx +++ b/app/[locale]/Footer.tsx @@ -1,4 +1,5 @@ import { useTranslations } from "next-intl"; +import Link from "next/link"; import { JSX, SVGProps } from "react"; export default function Footer() { @@ -173,25 +174,25 @@ export default function Footer() { key={item.name} className="pb-6" > - {item.name} - +
))}
{navigation.social.map((item) => ( - {item.name} + ))}

From d8800d1b90568bb108e10ead09eee1acba16698f Mon Sep 17 00:00:00 2001 From: Michael Kinder Date: Mon, 19 Feb 2024 15:57:58 -0500 Subject: [PATCH 6/6] Add Link component to Header --- app/[locale]/Header.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/[locale]/Header.tsx b/app/[locale]/Header.tsx index 6d56c85d..9c300cdb 100644 --- a/app/[locale]/Header.tsx +++ b/app/[locale]/Header.tsx @@ -1,4 +1,5 @@ import { useTranslations } from "next-intl"; +import Link from "next/link"; import Logo from "@/components/Logo"; import { Button } from "@/components/ui/button"; @@ -58,13 +59,13 @@ export default function Header() { aria-label="Global" >

- {tGlobal("name")} - +
- + - +