digital-garden/.quartz/quartz.layout.ts

76 lines
2.3 KiB
TypeScript
Raw Normal View History

2024-09-02 08:40:46 +03:00
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: [],
footer: Component.Footer({
links: {
"B.log": "https://struchkov.dev"
},
}),
}
// components for pages that display a single page (e.g. a single note)
export const defaultContentPageLayout: PageLayout = {
beforeBody: [
Component.Breadcrumbs(),
Component.ArticleTitle(),
Component.ContentMeta(),
],
left: [
Component.PageTitle(),
Component.MobileOnly(Component.Spacer()),
Component.Search(),
Component.Darkmode(),
Component.DesktopOnly(Component.Explorer()),
],
right: [
Component.Graph({
localGraph: {
drag: true, // whether to allow panning the view around
zoom: true, // whether to allow zooming in and out
depth: 1, // how many hops of notes to display
2024-09-02 21:35:14 +03:00
scale: 2, // default view scale
2024-09-02 08:40:46 +03:00
repelForce: 0.5, // how much nodes should repel each other
centerForce: 0.3, // how much force to use when trying to center the nodes
linkDistance: 30, // how long should the links be by default?
2024-09-02 21:35:14 +03:00
fontSize: 0.5, // what size should the node labels be?
opacityScale: 2, // how quickly do we fade out the labels when zooming out?
2024-09-02 08:40:46 +03:00
removeTags: [], // what tags to remove from the graph
2024-09-02 21:35:14 +03:00
showTags: false, // whether to show tags in the graph
2024-09-02 08:40:46 +03:00
},
globalGraph: {
drag: true,
zoom: true,
depth: -1,
2024-09-02 21:35:14 +03:00
scale: 2,
2024-09-02 08:40:46 +03:00
repelForce: 0.5,
centerForce: 0.3,
linkDistance: 30,
2024-09-02 21:35:14 +03:00
fontSize: 0.5,
2024-09-02 08:40:46 +03:00
opacityScale: 1,
removeTags: [], // what tags to remove from the graph
2024-09-02 21:35:14 +03:00
showTags: false, // whether to show tags in the graph
2024-09-02 08:40:46 +03:00
},
}),
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.Breadcrumbs(), Component.ArticleTitle(), Component.ContentMeta()],
left: [
Component.PageTitle(),
Component.MobileOnly(Component.Spacer()),
Component.Search(),
Component.Darkmode(),
Component.DesktopOnly(Component.Explorer()),
],
right: [],
}