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

92 lines
3.3 KiB
TypeScript
Raw Normal View History

2024-09-04 20:08:38 +03:00
import {PageLayout, SharedLayout} from "./quartz/cfg"
2024-09-02 08:40:46 +03:00
import * as Component from "./quartz/components"
// components shared across all pages
export const sharedPageComponents: SharedLayout = {
2024-09-04 20:08:38 +03:00
head: Component.Head(),
header: [],
afterBody: [
2024-09-05 00:46:14 +03:00
Component.Backlinks(),
2024-09-04 20:08:38 +03:00
Component.Remark({
options: {
host: 'https://comments.struchkov.dev',
siteId: 'gardenru',
locale: 'ru',
}
}),
2024-09-03 12:18:07 +03:00
],
footer: [Component.Footer({
2024-09-04 20:08:38 +03:00
links: {
"About Me": "https://mark.struchkov.dev/cv/",
"B.log": "https://struchkov.dev",
"CV": "https://mark.struchkov.dev/cv/?utm_source=gardenru&utm_medium=organic&utm_campaign=static",
},
}),
]
2024-09-02 08:40:46 +03:00
}
2024-09-05 00:46:14 +03:00
const githubSourceConfig = {
repoLink: "https://github.com/upagge/digital-garden",
branch: "master"
}
2024-09-02 08:40:46 +03:00
// components for pages that display a single page (e.g. a single note)
export const defaultContentPageLayout: PageLayout = {
2024-09-04 20:08:38 +03:00
beforeBody: [
Component.Breadcrumbs(),
Component.ArticleTitle(),
Component.ContentMeta(),
],
left: [
Component.PageTitle(),
Component.MobileOnly(Component.Spacer()),
Component.Search(),
Component.DesktopOnly(Component.RecentNotes({showTags: false, limit: 4})),
2024-09-05 22:19:07 +03:00
Component.Ads(),
2024-09-04 20:08:38 +03:00
Component.Darkmode(),
],
right: [
2024-09-05 21:51:55 +03:00
Component.DesktopOnly(Component.Graph({
2024-09-04 20:08:38 +03:00
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
scale: 2, // 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.5, // what size should the node labels be?
opacityScale: 2, // how quickly do we fade out the labels when zooming out?
removeTags: [], // what tags to remove from the graph
showTags: false, // whether to show tags in the graph
},
globalGraph: {
drag: true,
zoom: true,
depth: -1,
scale: 2,
repelForce: 0.5,
centerForce: 0.3,
linkDistance: 30,
fontSize: 0.5,
opacityScale: 1,
removeTags: [], // what tags to remove from the graph
showTags: false, // whether to show tags in the graph
},
2024-09-05 21:51:55 +03:00
})),
Component.DesktopOnly(Component.TableOfContents()),
2024-09-05 21:51:55 +03:00
Component.DesktopOnly(Component.GithubSource(githubSourceConfig)),
2024-09-04 20:08:38 +03:00
],
2024-09-02 08:40:46 +03:00
}
// components for pages that display lists of pages (e.g. tags or folders)
export const defaultListPageLayout: PageLayout = {
2024-09-04 20:08:38 +03:00
beforeBody: [Component.Breadcrumbs(), Component.ArticleTitle(), Component.ContentMeta()],
left: [
Component.PageTitle(),
Component.MobileOnly(Component.Spacer()),
Component.Search(),
Component.Darkmode(),
Component.DesktopOnly(Component.Explorer()),
],
right: [],
2024-09-02 08:40:46 +03:00
}