generated from nhcarrigan/template
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:
parent
2e655fabbd
commit
561b588c6f
@ -4,6 +4,7 @@ import "./globals.css";
|
||||
import { ClientNavigation } from "@/components/navigation";
|
||||
import Script from "next/script";
|
||||
import PlausibleProvider from "next-plausible";
|
||||
import { ClientFooter } from "@/components/footer";
|
||||
|
||||
const inter = Inter({ subsets: ["latin"] });
|
||||
|
||||
@ -28,30 +29,46 @@ export default function RootLayout({
|
||||
}>) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<PlausibleProvider domain="nhcarrigan.com" customDomain="https://analytics.nhcarrigan.com" trackFileDownloads={true} trackOutboundLinks={true}>
|
||||
<link rel="icon" href="https://cdn.nhcarrigan.com/logo.png" sizes="any" />
|
||||
<body className={inter.className}>
|
||||
<header>
|
||||
<ClientNavigation />
|
||||
</header>
|
||||
{children}
|
||||
<video
|
||||
src="https://cdn.nhcarrigan.com/overlay.webm"
|
||||
autoPlay
|
||||
loop
|
||||
muted
|
||||
playsInline
|
||||
className="fixed top-0 left-0 w-full h-full object-cover opacity-25"
|
||||
style={{ pointerEvents: "none" }}
|
||||
/>
|
||||
</body>
|
||||
<Script
|
||||
type="text/javascript"
|
||||
id="hs-script-loader"
|
||||
async
|
||||
defer
|
||||
src="//js.hs-scripts.com/47086586.js"
|
||||
strategy="beforeInteractive"
|
||||
src="https://widgets.tree-nation.com/js/widgets/v1/widgets.min.js?v=1.0"
|
||||
></Script>
|
||||
<PlausibleProvider
|
||||
domain="nhcarrigan.com"
|
||||
customDomain="https://analytics.nhcarrigan.com"
|
||||
trackFileDownloads={true}
|
||||
trackOutboundLinks={true}
|
||||
>
|
||||
<link
|
||||
rel="icon"
|
||||
href="https://cdn.nhcarrigan.com/logo.png"
|
||||
sizes="any"
|
||||
/>
|
||||
<body className={inter.className}>
|
||||
<header>
|
||||
<ClientNavigation />
|
||||
</header>
|
||||
{children}
|
||||
<video
|
||||
src="https://cdn.nhcarrigan.com/overlay.webm"
|
||||
autoPlay
|
||||
loop
|
||||
muted
|
||||
playsInline
|
||||
className="fixed top-0 left-0 w-full h-full object-cover opacity-25"
|
||||
style={{ pointerEvents: "none" }}
|
||||
/>
|
||||
<footer>
|
||||
<ClientFooter />
|
||||
</footer>
|
||||
</body>
|
||||
<Script
|
||||
type="text/javascript"
|
||||
id="hs-script-loader"
|
||||
async
|
||||
defer
|
||||
src="//js.hs-scripts.com/47086586.js"
|
||||
></Script>
|
||||
</PlausibleProvider>
|
||||
</html>
|
||||
);
|
||||
|
31
src/components/footer.tsx
Normal file
31
src/components/footer.tsx
Normal 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>© 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 />;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user