| | |
| | | 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 => { |
| | |
| | | |
| | | // @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 |