add analytics + notice
This commit is contained in:
27
packages/website/app/modules/app/app-footer.tsx
Normal file
27
packages/website/app/modules/app/app-footer.tsx
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
import { HeartIcon } from "@heroicons/react/solid"
|
||||||
|
import clsx from "clsx"
|
||||||
|
import { ExternalLink } from "~/modules/dom/external-link"
|
||||||
|
import { linkClass, maxWidthContainer } from "~/modules/ui/components"
|
||||||
|
|
||||||
|
export function AppFooter() {
|
||||||
|
return (
|
||||||
|
<footer className={clsx(maxWidthContainer, "text-xs opacity-75")}>
|
||||||
|
<address className="not-italic">
|
||||||
|
© {new Date().getFullYear()} itsMapleLeaf
|
||||||
|
</address>
|
||||||
|
<p>
|
||||||
|
Coded with <HeartIcon className="inline w-4 align-sub" /> using{" "}
|
||||||
|
<ExternalLink className={linkClass} href="https://remix.run">
|
||||||
|
Remix
|
||||||
|
</ExternalLink>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Uses{" "}
|
||||||
|
<ExternalLink className={linkClass} href="https://umami.is/">
|
||||||
|
umami
|
||||||
|
</ExternalLink>{" "}
|
||||||
|
for simple, non-identifying analytics.
|
||||||
|
</p>
|
||||||
|
</footer>
|
||||||
|
)
|
||||||
|
}
|
||||||
12
packages/website/app/modules/dom/external-link.tsx
Normal file
12
packages/website/app/modules/dom/external-link.tsx
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import type { ComponentPropsWithoutRef } from "react"
|
||||||
|
|
||||||
|
export function ExternalLink({
|
||||||
|
children,
|
||||||
|
...props
|
||||||
|
}: ComponentPropsWithoutRef<"a">) {
|
||||||
|
return (
|
||||||
|
<a target="_blank" rel="noopener noreferrer" {...props}>
|
||||||
|
{children}
|
||||||
|
</a>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import type { ComponentPropsWithoutRef } from "react"
|
import type { ComponentPropsWithoutRef } from "react"
|
||||||
import { Link } from "remix"
|
import { Link } from "remix"
|
||||||
|
import { ExternalLink } from "~/modules/dom/external-link"
|
||||||
|
|
||||||
export type AppLinkProps = ComponentPropsWithoutRef<"a"> & {
|
export type AppLinkProps = ComponentPropsWithoutRef<"a"> & {
|
||||||
type: "internal" | "external" | "router"
|
type: "internal" | "external" | "router"
|
||||||
@@ -17,9 +18,9 @@ export function AppLink({ type, to, children, ...props }: AppLinkProps) {
|
|||||||
|
|
||||||
if (type === "external") {
|
if (type === "external") {
|
||||||
return (
|
return (
|
||||||
<a href={to} target="_blank" rel="noopener noreferrer" {...props}>
|
<ExternalLink href={to} {...props}>
|
||||||
{children}
|
{children}
|
||||||
</a>
|
</ExternalLink>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,14 @@ export default function App() {
|
|||||||
<Meta />
|
<Meta />
|
||||||
<Links />
|
<Links />
|
||||||
<script defer src="https://unpkg.com/alpinejs@3.7.1/dist/cdn.min.js" />
|
<script defer src="https://unpkg.com/alpinejs@3.7.1/dist/cdn.min.js" />
|
||||||
|
{process.env.NODE_ENV === "production" && (
|
||||||
|
<script
|
||||||
|
async
|
||||||
|
defer
|
||||||
|
data-website-id="49c69ade-5593-4853-9686-c9ca9d519a18"
|
||||||
|
src="https://maple-umami.fly.dev/umami.js"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<GuideLinksProvider value={data.guideLinks}>
|
<GuideLinksProvider value={data.guideLinks}>
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
import packageJson from "reacord/package.json"
|
import packageJson from "reacord/package.json"
|
||||||
|
import { AppFooter } from "~/modules/app/app-footer"
|
||||||
import LandingExample from "~/modules/landing/landing-example.mdx"
|
import LandingExample from "~/modules/landing/landing-example.mdx"
|
||||||
import { MainNavigation } from "~/modules/navigation/main-navigation"
|
import { MainNavigation } from "~/modules/navigation/main-navigation"
|
||||||
import { maxWidthContainer } from "~/modules/ui/components"
|
import { maxWidthContainer } from "~/modules/ui/components"
|
||||||
|
|
||||||
export default function Landing() {
|
export default function Landing() {
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col min-w-0 min-h-screen text-center">
|
<div className="flex flex-col min-w-0 min-h-screen text-center pb-4">
|
||||||
<header className={maxWidthContainer}>
|
<header className={maxWidthContainer}>
|
||||||
<MainNavigation />
|
<MainNavigation />
|
||||||
</header>
|
</header>
|
||||||
@@ -24,6 +25,7 @@ export default function Landing() {
|
|||||||
</a>
|
</a>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
<AppFooter />
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user