site/quartz/components/CustomFooter.tsx
2024-10-14 08:09:33 +02:00

26 lines
743 B
TypeScript

import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
import style from "./styles/footer.scss"
import { version } from "../../package.json"
import { i18n } from "../i18n"
interface Options {
links: Record<string, string>
rings: Record<string, string>
}
export default ((opts?: Options) => {
const Footer: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => {
const year = new Date().getFullYear()
const links = opts?.links ?? []
const rings = opts?.rings ?? []
return (
<footer class={`${displayClass ?? ""}`}>
Component.Footer_links(links, rings)
</footer>
)
}
Footer.css = style
return Footer
}) satisfies QuartzComponentConstructor