From 76c092dcf20959bc52fcb13b28cee50cd4217e40 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Thu, 20 Jul 2023 04:59:48 +0000
Subject: [PATCH] add custom.scss

---
 quartz/components/pages/FolderContent.tsx |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/quartz/components/pages/FolderContent.tsx b/quartz/components/pages/FolderContent.tsx
index 4806843..9221eac 100644
--- a/quartz/components/pages/FolderContent.tsx
+++ b/quartz/components/pages/FolderContent.tsx
@@ -5,10 +5,11 @@
 
 import style from '../styles/listPage.scss'
 import { PageList } from "../PageList"
+import { canonicalizeServer } from "../../path"
 
-function TagContent(props: QuartzComponentProps) {
+function FolderContent(props: QuartzComponentProps) {
   const { tree, fileData, allFiles } = props
-  const folderSlug = fileData.slug!
+  const folderSlug = canonicalizeServer(fileData.slug!)
   const allPagesInFolder = allFiles.filter(file => {
     const fileSlug = file.slug ?? ""
     const prefixed = fileSlug.startsWith(folderSlug)
@@ -22,16 +23,17 @@
     ...props,
     allFiles: allPagesInFolder
   }
-
+  
   // @ts-ignore
   const content = toJsxRuntime(tree, { Fragment, jsx, jsxs, elementAttributeNameCase: 'html' })
-  return <div>
+  return <div class="popover-hint">
     <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