Skip to content

Commit

Permalink
fix:tag page includes status
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Vogel committed Mar 31, 2024
1 parent 2dc3a47 commit 523562b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
16 changes: 8 additions & 8 deletions quartz/components/pages/TagContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ const TagContent: QuartzComponent = (props: QuartzComponentProps) => {
}

const tag = simplifySlug(slug.slice("tags/".length) as FullSlug)
const allPagesWithTag = (tag: string) =>
allFiles.filter((file) =>
(file.frontmatter?.tags ?? []).flatMap(getAllSegmentPrefixes).includes(tag),
)
// const allPagesWithTag = (tag: string) =>
// allFiles.filter((file) => {
// const tags = (file.frontmatter?.tags ?? []).concat(file.frontmatter?.status ? [file.frontmatter.status] : []);
// return tags.flatMap(getAllSegmentPrefixes).includes(tag);
// });
// allFiles.filter((file) =>
// (file.frontmatter?.tags ?? []).flatMap(getAllSegmentPrefixes).includes(tag),
// )
const allPagesWithTag = (tag: string) =>
allFiles.filter((file) => {
const tags = (file.frontmatter?.tags ?? []).concat(file.frontmatter?.status ? [file.frontmatter.status] : []);
return tags.flatMap(getAllSegmentPrefixes).includes(tag);
});

const content =
(tree as Root).children.length === 0
Expand Down
6 changes: 4 additions & 2 deletions quartz/styles/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ body[data-slug^="tags\/"] li[data-status="evergreen"] > div:before {
text-shadow: 0 0 0 rgb(102, 128, 11);
padding-right: 10px;
}

body[data-slug^="tags\/"] li[data-status="evergreen"] .meta {
opacity:1;
}
//tag page book style
body[data-slug^="tags\/"] li:has(a[href*="/Book/"]) > div:before {
content: "📖 ";
Expand Down Expand Up @@ -470,7 +472,7 @@ circle[id^="tags/"] {

// tag page
li.section-li > .section {
grid-template-columns: 6em 1fr 3fr;
grid-template-columns: 3em 1fr 3fr;
}
@media all and (min-width: $fullPageWidth) {
.page>#quartz-body .sidebar.left{
Expand Down

0 comments on commit 523562b

Please sign in to comment.