diff --git a/content b/content index 0e08875..7d9d580 160000 --- a/content +++ b/content @@ -1 +1 @@ -Subproject commit 0e0887535b6658adb965cb575c683bcc1fabb882 +Subproject commit 7d9d5803fb54073a73e6ef0f0032fb940f7d209c diff --git a/quartz.layout.ts b/quartz.layout.ts index 981d91a..92996e2 100644 --- a/quartz.layout.ts +++ b/quartz.layout.ts @@ -33,6 +33,9 @@ export const defaultContentPageLayout: PageLayout = { Component: Component.Search(), grow: true, }, + { + Component: Component.Darkmode(), + } ], }), Component.Explorer(), @@ -55,7 +58,6 @@ export const defaultListPageLayout: PageLayout = { Component: Component.Search(), grow: true, }, - { Component: Component.Darkmode() }, ], }), Component.Explorer(), diff --git a/quartz/components/Darkmode.tsx b/quartz/components/Darkmode.tsx index afc23d7..834eb57 100644 --- a/quartz/components/Darkmode.tsx +++ b/quartz/components/Darkmode.tsx @@ -1,45 +1,13 @@ -// @ts-ignore +// @ts-ignore: this is safe, we don't want to actually make darkmode.inline.ts a module as +// modules are automatically deferred and we don't want that to happen for critical beforeDOMLoads +// see: https://v8.dev/features/modules#defer import darkmodeScript from "./scripts/darkmode.inline" import styles from "./styles/darkmode.scss" import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types" -import { i18n } from "../i18n" import { classNames } from "../util/lang" -const Darkmode: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => { - return ( - - ) +const Darkmode: QuartzComponent = ({ displayClass }: QuartzComponentProps) => { + return
} Darkmode.beforeDOMLoaded = darkmodeScript