mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-26 13:26:22 +00:00
feat: div that encapsulate PageList component (#750)
* feat: div that encapsulate PageList component * change class to follow review Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com> * apply page-listing div to TagContent --------- Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
This commit is contained in:
parent
603c181ad2
commit
b7152f743b
2 changed files with 19 additions and 13 deletions
|
@ -50,11 +50,13 @@ export default ((opts?: Partial<FolderContentOptions>) => {
|
||||||
<article>
|
<article>
|
||||||
<p>{content}</p>
|
<p>{content}</p>
|
||||||
</article>
|
</article>
|
||||||
{options.showFolderCount && (
|
<div class="page-listing">
|
||||||
<p>{pluralize(allPagesInFolder.length, "item")} under this folder.</p>
|
{options.showFolderCount && (
|
||||||
)}
|
<p>{pluralize(allPagesInFolder.length, "item")} under this folder.</p>
|
||||||
<div>
|
)}
|
||||||
<PageList {...listProps} />
|
<div>
|
||||||
|
<PageList {...listProps} />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
@ -62,11 +62,13 @@ function TagContent(props: QuartzComponentProps) {
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
{content && <p>{content}</p>}
|
{content && <p>{content}</p>}
|
||||||
<p>
|
<div class="page-listing">
|
||||||
{pluralize(pages.length, "item")} with this tag.{" "}
|
<p>
|
||||||
{pages.length > numPages && `Showing first ${numPages}.`}
|
{pluralize(pages.length, "item")} with this tag.{" "}
|
||||||
</p>
|
{pages.length > numPages && `Showing first ${numPages}.`}
|
||||||
<PageList limit={numPages} {...listProps} />
|
</p>
|
||||||
|
<PageList limit={numPages} {...listProps} />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
|
@ -83,9 +85,11 @@ function TagContent(props: QuartzComponentProps) {
|
||||||
return (
|
return (
|
||||||
<div class={classes}>
|
<div class={classes}>
|
||||||
<article>{content}</article>
|
<article>{content}</article>
|
||||||
<p>{pluralize(pages.length, "item")} with this tag.</p>
|
<div class="page-listing">
|
||||||
<div>
|
<p>{pluralize(pages.length, "item")} with this tag.</p>
|
||||||
<PageList {...listProps} />
|
<div>
|
||||||
|
<PageList {...listProps} />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue