From a72b1a422485d4f2258e58c1f76f933cb24cf455 Mon Sep 17 00:00:00 2001
From: Felix Nie <hongtuo.nie@u.nus.edu>
Date: Sun, 16 Mar 2025 19:08:45 +0000
Subject: [PATCH] fix(explorer): vertically center the Explorer toggle under mobile view (#1847)
---
quartz/util/resources.tsx | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/quartz/util/resources.tsx b/quartz/util/resources.tsx
index 72ae9e6..d95333e 100644
--- a/quartz/util/resources.tsx
+++ b/quartz/util/resources.tsx
@@ -1,5 +1,6 @@
import { randomUUID } from "crypto"
import { JSX } from "preact/jsx-runtime"
+import { QuartzPluginData } from "../plugins/vfile"
export type JSResource = {
loadTime: "beforeDOMReady" | "afterDOMReady"
@@ -62,4 +63,12 @@
export interface StaticResources {
css: CSSResource[]
js: JSResource[]
+ additionalHead: (JSX.Element | ((pageData: QuartzPluginData) => JSX.Element))[]
+}
+
+export type StringResource = string | string[] | undefined
+export function concatenateResources(...resources: StringResource[]): StringResource {
+ return resources
+ .filter((resource): resource is string | string[] => resource !== undefined)
+ .flat()
}
--
Gitblit v1.10.0