1
0
mirror of https://gitlab.com/MisterBiggs/brain-quartz.git synced 2025-06-15 17:26:40 +00:00
2025-06-04 21:44:51 -06:00

30 lines
904 B
TypeScript

import { i18n } from "../../i18n"
import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "../types"
import Graph from "../Graph"
const NotFound: QuartzComponent = ({ cfg }: QuartzComponentProps) => {
// If baseUrl contains a pathname after the domain, use this as the home link
const url = new URL(`https://${cfg.baseUrl ?? "example.com"}`)
const baseDir = url.pathname
const GraphComponent = Graph({
localGraph: {
depth: -1, // Shows all nodes
scale: 0.9, // You might want to adjust scale for the full graph
}
})
return (
<article class="popover-hint">
<h1>404</h1>
<p>{i18n(cfg.locale).pages.error.notFound}</p>
<a href={baseDir}>{i18n(cfg.locale).pages.error.home}</a>
<br /><br />
<GraphComponent cfg={cfg} />
</article>
)
}
export default (() => NotFound) satisfies QuartzComponentConstructor