mirror of
https://github.com/alrayyes/wiki.git
synced 2025-06-08 22:53:39 +00:00
fix indexing causing main thread freeze, various polish
This commit is contained in:
parent
e0ebee5aa9
commit
ab9da02c60
33 changed files with 255 additions and 141 deletions
quartz/components/pages
|
@ -6,7 +6,7 @@ import path from "path"
|
|||
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 => {
|
||||
|
@ -25,13 +25,15 @@ function TagContent(props: QuartzComponentProps) {
|
|||
|
||||
// @ts-ignore
|
||||
const content = toJsxRuntime(tree, { Fragment, jsx, jsxs, elementAttributeNameCase: 'html' })
|
||||
return <div>
|
||||
return <div class="popover-hint">
|
||||
<article>{content}</article>
|
||||
<hr/>
|
||||
<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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue