From 16d33fb77193710bede887d6a177d2144b78fb67 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Wed, 20 Sep 2023 23:08:54 +0000
Subject: [PATCH] feat: display name for folders, expand explorer a little bit (#489)
---
quartz/components/Explorer.tsx | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/quartz/components/Explorer.tsx b/quartz/components/Explorer.tsx
index 8597075..73c620f 100644
--- a/quartz/components/Explorer.tsx
+++ b/quartz/components/Explorer.tsx
@@ -11,10 +11,10 @@
folderClickBehavior: "collapse",
folderDefaultState: "collapsed",
useSavedState: true,
- // Sort order: folders first, then files. Sort folders and files alphabetically
sortFn: (a, b) => {
+ // Sort order: folders first, then files. Sort folders and files alphabetically
if ((!a.file && !b.file) || (a.file && b.file)) {
- return a.name.localeCompare(b.name)
+ return a.displayName.localeCompare(b.displayName)
}
if (a.file && !b.file) {
return 1
@@ -22,6 +22,7 @@
return -1
}
},
+ filterFn: (node) => node.name !== "tags",
order: ["filter", "map", "sort"],
} satisfies Options
@@ -79,7 +80,7 @@
data-savestate={opts.useSavedState}
data-tree={jsonTree}
>
- <h3>{opts.title}</h3>
+ <h1>{opts.title}</h1>
<svg
xmlns="http://www.w3.org/2000/svg"
width="14"
@@ -98,7 +99,7 @@
<div id="explorer-content">
<ul class="overflow" id="explorer-ul">
<ExplorerNode node={fileTree} opts={opts} fileData={fileData} />
- <div id="explorer-end" />
+ <li id="explorer-end" />
</ul>
</div>
</div>
--
Gitblit v1.10.0