Mara-Li
2024-01-29 b7152f743bc90411ffd5a9e59057a79be430751b
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>
2 files modified
32 ■■■■■ changed files
quartz/components/pages/FolderContent.tsx 12 ●●●●● patch | view | raw | blame | history
quartz/components/pages/TagContent.tsx 20 ●●●●● patch | view | raw | blame | history
quartz/components/pages/FolderContent.tsx
@@ -50,11 +50,13 @@
        <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>
    )
quartz/components/pages/TagContent.tsx
@@ -62,11 +62,13 @@
                  </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>
            )
          })}
@@ -83,9 +85,11 @@
    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>
    )