12664ae596
* feat: implement breadcrumbs * style: fix styling, move breadcrumbs to top * refactor: move `capitalize to `lang.ts`` * refactor: clean breadcrumb generation * feat: add options to breadcrumbs * feat: implement `resolveFrontmatterTitle` * feat: add `hideOnRoot` option * feat(consistency): capitalize every crumb * style: add `flex-wrap` to parent container * refactor: clean `Breadcrumbs.tsx` * feat(accessibility): use `nav`, add aria label * style: improve look in popovers by adding margin * docs: write docs for breadcrumb component * refactor: collapse `if` condition for hideOnRoot * chore: add todo for perf optimization * docs: update introduction
49 lines
1.3 KiB
TypeScript
49 lines
1.3 KiB
TypeScript
import { PageLayout, SharedLayout } from "./quartz/cfg"
|
|
import * as Component from "./quartz/components"
|
|
|
|
// components shared across all pages
|
|
export const sharedPageComponents: SharedLayout = {
|
|
head: Component.Head(),
|
|
header: [],
|
|
footer: Component.Footer({
|
|
links: {
|
|
GitHub: "https://github.com/jackyzha0/quartz",
|
|
"Discord Community": "https://discord.gg/cRFFHYye7t",
|
|
},
|
|
}),
|
|
}
|
|
|
|
// components for pages that display a single page (e.g. a single note)
|
|
export const defaultContentPageLayout: PageLayout = {
|
|
beforeBody: [
|
|
Component.Breadcrumbs(),
|
|
Component.ArticleTitle(),
|
|
Component.ContentMeta(),
|
|
Component.TagList(),
|
|
],
|
|
left: [
|
|
Component.PageTitle(),
|
|
Component.MobileOnly(Component.Spacer()),
|
|
Component.Search(),
|
|
Component.Darkmode(),
|
|
Component.DesktopOnly(Component.Explorer()),
|
|
],
|
|
right: [
|
|
Component.Graph(),
|
|
Component.DesktopOnly(Component.TableOfContents()),
|
|
Component.Backlinks(),
|
|
],
|
|
}
|
|
|
|
// components for pages that display lists of pages (e.g. tags or folders)
|
|
export const defaultListPageLayout: PageLayout = {
|
|
beforeBody: [Component.ArticleTitle()],
|
|
left: [
|
|
Component.PageTitle(),
|
|
Component.MobileOnly(Component.Spacer()),
|
|
Component.Search(),
|
|
Component.Darkmode(),
|
|
],
|
|
right: [],
|
|
}
|