From 0a3379a8530f365e2bd85e8ea20a1dfc8126c39c Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Fri, 02 Feb 2024 18:10:25 +0000
Subject: [PATCH] fix(search): null checks and focus fixes
---
quartz/components/pages/FolderContent.tsx | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/quartz/components/pages/FolderContent.tsx b/quartz/components/pages/FolderContent.tsx
index 67cfa8d..47fb02f 100644
--- a/quartz/components/pages/FolderContent.tsx
+++ b/quartz/components/pages/FolderContent.tsx
@@ -33,7 +33,8 @@
const isDirectChild = fileParts.length === folderParts.length + 1
return prefixed && isDirectChild
})
-
+ const cssClasses: string[] = fileData.frontmatter?.cssclasses ?? []
+ const classes = ["popover-hint", ...cssClasses].join(" ")
const listProps = {
...props,
allFiles: allPagesInFolder,
@@ -45,15 +46,17 @@
: htmlToJsx(fileData.filePath!, tree)
return (
- <div class="popover-hint">
+ <div class={classes}>
<article>
<p>{content}</p>
</article>
- {options.showFolderCount && (
- <p>{pluralize(allPagesInFolder.length, "item")} under this folder.</p>
- )}
- <div>
- <PageList {...listProps} />
+ <div class="page-listing">
+ {options.showFolderCount && (
+ <p>{pluralize(allPagesInFolder.length, "item")} under this folder.</p>
+ )}
+ <div>
+ <PageList {...listProps} />
+ </div>
</div>
</div>
)
--
Gitblit v1.10.0