Files
fristydev/components/site-footer.tsx
T

51 lines
1.5 KiB
TypeScript

import type { Dictionary } from "@/lib/i18n/get-dictionary";
import { APACHE_LICENSE_URL, SITE_URL, SOURCE_URL } from "@/lib/site";
export function SiteFooter({ dict }: { dict: Dictionary["footer"] }) {
const year = new Date().getFullYear();
const licenseLink = (
<a
href={APACHE_LICENSE_URL}
target="_blank"
rel="noopener noreferrer"
className="text-blurple-soft transition-colors hover:text-white"
>
{dict.licenseLabel}
</a>
);
const sourceLink = (
<a
href={SOURCE_URL}
target="_blank"
rel="noopener noreferrer"
className="text-blurple-soft transition-colors hover:text-white"
>
{dict.sourceLabel}
</a>
);
return (
<footer className="border-t border-white/5 py-8 text-center text-sm text-zinc-500">
<p>
© {year}{" "}
<a href={SITE_URL} className="transition-colors hover:text-white">
fristy.dev
</a>{" "}
· {dict.rights}
</p>
<p className="mt-1">
{dict.prefix}{" "}
{dict.licenseFirst ? (
<>
{licenseLink} {dict.middle} {sourceLink}
</>
) : (
<>
{sourceLink} {dict.middle} {licenseLink}
</>
)}
{dict.suffix}.
</p>
</footer>
);
}