From 603c181ad27109327617a78e5f672ebf68edc267 Mon Sep 17 00:00:00 2001
From: Mara-Li <lili.simonetti@outlook.fr>
Date: Mon, 29 Jan 2024 06:13:59 +0000
Subject: [PATCH] feat: allow to config a translation for date (#739)

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

diff --git a/quartz/components/pages/FolderContent.tsx b/quartz/components/pages/FolderContent.tsx
index 1acb98a..436ed91 100644
--- a/quartz/components/pages/FolderContent.tsx
+++ b/quartz/components/pages/FolderContent.tsx
@@ -20,7 +20,6 @@
 }
 
 export default ((opts?: Partial<FolderContentOptions>) => {
-  // Merge options with defaults
   const options: FolderContentOptions = { ...defaultOptions, ...opts }
 
   function FolderContent(props: QuartzComponentProps) {
@@ -34,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,
@@ -46,11 +46,13 @@
         : 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>}
+        {options.showFolderCount && (
+          <p>{pluralize(allPagesInFolder.length, "item")} under this folder.</p>
+        )}
         <div>
           <PageList {...listProps} />
         </div>

--
Gitblit v1.10.0