100 lines
2.4 KiB
TypeScript
100 lines
2.4 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: [],
|
|
afterBody: [
|
|
Component.DesktopOnly(Component.Flex({
|
|
components: [
|
|
{
|
|
Component: Component.Graph(),
|
|
align: "start",
|
|
justify: "center",
|
|
basis: "50%",
|
|
},
|
|
{
|
|
Component: Component.Backlinks(),
|
|
align: "start",
|
|
justify: "center",
|
|
basis: "50%",
|
|
},
|
|
],
|
|
})),
|
|
],
|
|
footer: Component.Flex({
|
|
direction: "column",
|
|
components: [
|
|
{
|
|
Component: Component.Footer({
|
|
links: {
|
|
Repository: "https://git.dgse.cloud/dgroothuis/digital-garden"
|
|
},
|
|
}),
|
|
align: "start",
|
|
justify: "center",
|
|
basis: "100%",
|
|
},
|
|
{
|
|
Component: Component.Darkmode(),
|
|
align: "center",
|
|
justify: "center",
|
|
basis: "100%",
|
|
},
|
|
]
|
|
}),
|
|
}
|
|
|
|
// components for pages that display a single page (e.g. a single note)
|
|
export const defaultContentPageLayout: PageLayout = {
|
|
beforeBody: [
|
|
Component.ConditionalRender({
|
|
component: Component.Breadcrumbs(),
|
|
condition: (page) => page.fileData.slug !== "index",
|
|
}),
|
|
Component.ArticleTitle(),
|
|
Component.ContentMeta(),
|
|
Component.TagList(),
|
|
],
|
|
left: [
|
|
Component.PageTitle(),
|
|
Component.MobileOnly(Component.Spacer()),
|
|
Component.Search(),
|
|
Component.TableOfContents(),
|
|
Component.DesktopOnly(Component.Explorer({
|
|
title: "Explore",
|
|
folderClickBehavior: "collapse",
|
|
folderDefaultState: "collapsed",
|
|
useSavedState: true,
|
|
})),
|
|
Component.RecentNotes({
|
|
title: "Recent notes",
|
|
limit: 5,
|
|
filter: (f) => f.slug! !== "index",
|
|
})
|
|
],
|
|
right: [
|
|
],
|
|
}
|
|
|
|
// components for pages that display lists of pages (e.g. tags or folders)
|
|
export const defaultListPageLayout: PageLayout = {
|
|
beforeBody: [Component.Breadcrumbs(), Component.ArticleTitle(), Component.ContentMeta()],
|
|
left: [
|
|
Component.PageTitle(),
|
|
Component.MobileOnly(Component.Spacer()),
|
|
Component.Flex({
|
|
components: [
|
|
{
|
|
Component: Component.Search(),
|
|
grow: true,
|
|
},
|
|
{ Component: Component.Darkmode() },
|
|
],
|
|
}),
|
|
Component.Explorer(),
|
|
],
|
|
right: [],
|
|
}
|