feat: add net-zero co2 badge (#30)

Reviewed-on: https://codeberg.org/nhcarrigan/portfolio/pulls/30
Co-authored-by: Naomi Carrigan <commits@nhcarrigan.com>
Co-committed-by: Naomi Carrigan <commits@nhcarrigan.com>
This commit is contained in:
2024-10-23 19:59:59 +00:00
committed by Naomi the Technomancer
parent 2e655fabbd
commit 561b588c6f
2 changed files with 70 additions and 22 deletions
+31
View File
@@ -0,0 +1,31 @@
"use client";
import React from "react";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import {
faComments,
} from "@fortawesome/free-solid-svg-icons";
import { usePathname } from "next/navigation";
import Script from "next/script";
const Footer = (): JSX.Element => {
return (
<>
<div className="fixed w-full bottom-0 z-50 flex justify-between items-center h-14 px-4 bg-[--background] text-[--foreground]">
<p>&copy; Naomi Carrigan</p>
<a href="https://chat.nhcarrigan.com" target="_blank" rel="noreferrer">
<FontAwesomeIcon icon={faComments} size="lg" />
</a>
<div className="h-4/5" id="tree-nation-offset-website"></div>
<Script id="tree-nation">{`TreeNationOffsetWebsite({code: 'a17464e0cd351220', lang: 'en', theme: 'dark'}).render('#tree-nation-offset-website');`}</Script>
</div>
</>
);
};
export function ClientFooter() {
const pathname = usePathname();
const isRootPath = pathname === "/";
if (isRootPath) return null;
return <Footer />;
}