Skip to content

Commit

Permalink
feat: div that encapsulate PageList component (#750)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
Mara-Li and jackyzha0 committed Jan 29, 2024
1 parent 603c181 commit b7152f7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
12 changes: 7 additions & 5 deletions quartz/components/pages/FolderContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ export default ((opts?: Partial<FolderContentOptions>) => {
<article>
<p>{content}</p>
</article>
{options.showFolderCount && (
<p>{pluralize(allPagesInFolder.length, "item")} under this folder.</p>
)}
<div>
<PageList {...listProps} />
<div class="page-listing">
{options.showFolderCount && (
<p>{pluralize(allPagesInFolder.length, "item")} under this folder.</p>
)}
<div>
<PageList {...listProps} />
</div>
</div>
</div>
)
Expand Down
20 changes: 12 additions & 8 deletions quartz/components/pages/TagContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,13 @@ function TagContent(props: QuartzComponentProps) {
</a>
</h2>
{content && <p>{content}</p>}
<p>
{pluralize(pages.length, "item")} with this tag.{" "}
{pages.length > numPages && `Showing first ${numPages}.`}
</p>
<PageList limit={numPages} {...listProps} />
<div class="page-listing">
<p>
{pluralize(pages.length, "item")} with this tag.{" "}
{pages.length > numPages && `Showing first ${numPages}.`}
</p>
<PageList limit={numPages} {...listProps} />
</div>
</div>
)
})}
Expand All @@ -83,9 +85,11 @@ function TagContent(props: QuartzComponentProps) {
return (
<div class={classes}>
<article>{content}</article>
<p>{pluralize(pages.length, "item")} with this tag.</p>
<div>
<PageList {...listProps} />
<div class="page-listing">
<p>{pluralize(pages.length, "item")} with this tag.</p>
<div>
<PageList {...listProps} />
</div>
</div>
</div>
)
Expand Down

0 comments on commit b7152f7

Please sign in to comment.