quartz-research-note/quartz.layout.ts

72 lines
2.3 KiB
TypeScript
Raw Permalink Normal View History

import { PageLayout, SharedLayout } from "./quartz/cfg"
2023-07-26 06:37:24 +00:00
import * as Component from "./quartz/components"
// components shared across all pages
export const sharedPageComponents: SharedLayout = {
2023-07-26 06:37:24 +00:00
head: Component.Head(),
header: [],
2024-07-10 02:09:31 +00:00
afterBody: [],
2023-07-26 06:37:24 +00:00
footer: Component.Footer({
links: {
"Top": "https://matsuuratomoya.com",
"Mastodon": "https://social.matsuuratomoya.com/@tomoya",
"Twitter": "https://twitter.com/tomoya_nonymous",
"GitHub": "https://github.com/tomoyanonymous",
2023-07-26 06:37:24 +00:00
},
}),
}
// components for pages that display a single page (e.g. a single note)
2023-08-24 13:38:07 +00:00
const graph_cfg = {
localGraph: {
drag: true, // whether to allow panning the view around
zoom: true, // whether to allow zooming in and out
depth: 2, // how many hops of notes to display
scale: 1.1, // default view scale
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?
fontSize: 0.6, // what size should the node labels be?
opacityScale: 1, // how quickly do we fade out the labels when zooming out?
},
globalGraph: {
drag: true,
zoom: true,
depth: -1,
scale: 0.9,
repelForce: 0.5,
centerForce: 0.3,
linkDistance: 30,
fontSize: 0.6,
opacityScale: 1,
},
};
2023-07-26 06:37:24 +00:00
export const defaultContentPageLayout: PageLayout = {
beforeBody: [Component.Breadcrumbs(),
Component.ArticleTitle(), Component.ContentMeta(), /*Component.TagList()*/],
2023-07-26 06:37:24 +00:00
left: [
Component.PageTitle(),
Component.MobileOnly(Component.Spacer()),
Component.Search(),
Component.Darkmode(),
Component.DesktopOnly(Component.TableOfContents()),
],
2024-01-29 04:59:31 +00:00
right: [Component.Graph(graph_cfg), Component.Backlinks(), Component.RecentNotes({ title: "Recent writing" })],
2023-07-26 06:37:24 +00:00
}
// components for pages that display lists of pages (e.g. tags or folders)
export const defaultListPageLayout: PageLayout = {
2024-02-05 10:45:36 +00:00
beforeBody: [Component.Breadcrumbs(), Component.ArticleTitle(), Component.ContentMeta()],
2023-07-26 06:37:24 +00:00
left: [
Component.PageTitle(),
Component.MobileOnly(Component.Spacer()),
Component.Search(),
Component.Darkmode(),
2024-02-05 10:45:36 +00:00
Component.DesktopOnly(Component.Explorer()),
2023-07-26 06:37:24 +00:00
],
right: [
Component.Graph(),
Component.DesktopOnly(Component.TableOfContents()),
Component.Backlinks(),
],
}