From b90590b9f487cdd49f019375fa5a09aad2e8ec1f Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Sat, 08 Jul 2023 21:36:02 +0000
Subject: [PATCH] polish
---
quartz/components/pages/FolderContent.tsx | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/quartz/components/pages/FolderContent.tsx b/quartz/components/pages/FolderContent.tsx
index 4806843..5aa7f09 100644
--- a/quartz/components/pages/FolderContent.tsx
+++ b/quartz/components/pages/FolderContent.tsx
@@ -6,7 +6,7 @@
import style from '../styles/listPage.scss'
import { PageList } from "../PageList"
-function TagContent(props: QuartzComponentProps) {
+function FolderContent(props: QuartzComponentProps) {
const { tree, fileData, allFiles } = props
const folderSlug = fileData.slug!
const allPagesInFolder = allFiles.filter(file => {
@@ -23,15 +23,19 @@
allFiles: allPagesInFolder
}
+ const desc = props.fileData.description
+
// @ts-ignore
const content = toJsxRuntime(tree, { Fragment, jsx, jsxs, elementAttributeNameCase: 'html' })
- return <div>
+ return <div class="popover-hint">
+ {desc && <p>{desc}</p>}
<article>{content}</article>
+ <p>{allPagesInFolder.length} items under this folder.</p>
<div>
<PageList {...listProps} />
</div>
</div>
}
-TagContent.css = style + PageList.css
-export default (() => TagContent) satisfies QuartzComponentConstructor
+FolderContent.css = style + PageList.css
+export default (() => FolderContent) satisfies QuartzComponentConstructor
--
Gitblit v1.10.0