Skip to content

Commit

Permalink
fix(cssclasses): apply frontmatter classes uniformly between page typ…
Browse files Browse the repository at this point in the history
  • Loading branch information
saberzero1 authored and dynamotn committed Dec 27, 2024
1 parent f46b731 commit c3384fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions quartz/components/pages/FolderContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default ((opts?: Partial<FolderContentOptions>) => {
})

const cssClasses: string[] = fileData.frontmatter?.cssclasses ?? []
const classes = ["popover-hint", ...cssClasses].join(" ")
const classes = cssClasses.join(" ")
const listProps = {
...props,
sort: options.sort,
Expand All @@ -84,8 +84,8 @@ export default ((opts?: Partial<FolderContentOptions>) => {
: htmlToJsx(fileData.filePath!, tree)

return (
<div class={classes}>
<article>{content}</article>
<div class="popover-hint">
<article class={classes}>{content}</article>
<div class="page-listing">
{options.showFolderCount && (
<p>
Expand Down
6 changes: 3 additions & 3 deletions quartz/components/pages/TagContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default ((opts?: Partial<TagContentOptions>) => {
? fileData.description
: htmlToJsx(fileData.filePath!, tree)
const cssClasses: string[] = fileData.frontmatter?.cssclasses ?? []
const classes = ["popover-hint", ...cssClasses].join(" ")
const classes = cssClasses.join(" ")
if (tag === "/") {
const tags = [
...new Set(
Expand All @@ -49,8 +49,8 @@ export default ((opts?: Partial<TagContentOptions>) => {
tagItemMap.set(tag, allPagesWithTag(tag))
}
return (
<div class={classes}>
<article>
<div class="popover-hint">
<article class={classes}>
<p>{content}</p>
</article>
<p>{i18n(ctx.language).pages.tagContent.totalTags({ count: tags.length })}</p>
Expand Down

0 comments on commit c3384fe

Please sign in to comment.