From c8f5dbbad3a85749d8a74f5e3e3b222fe547d5d6 Mon Sep 17 00:00:00 2001 From: Luca Salvarani Date: Mon, 2 Oct 2023 02:20:55 +0200 Subject: [PATCH] fix: Fix `Backlinks` not applying the display class (#519) * fix: Fix `Backlinks` not applying the display class Fix #518 * fix: Apply `displayClass` to all layout components * refactor: Use same style * fix: Remove `undefined` class using coalescing operator --- quartz/components/ArticleTitle.tsx | 4 ++-- quartz/components/Backlinks.tsx | 4 ++-- quartz/components/Breadcrumbs.tsx | 4 ++-- quartz/components/ContentMeta.tsx | 4 ++-- quartz/components/Darkmode.tsx | 6 +++--- quartz/components/Explorer.tsx | 2 +- quartz/components/Footer.tsx | 6 +++--- quartz/components/Graph.tsx | 6 +++--- quartz/components/PageTitle.tsx | 4 ++-- quartz/components/RecentNotes.tsx | 5 ++--- quartz/components/Search.tsx | 6 +++--- quartz/components/Spacer.tsx | 3 +-- quartz/components/TableOfContents.tsx | 2 +- quartz/components/TagList.tsx | 4 ++-- 14 files changed, 29 insertions(+), 31 deletions(-) diff --git a/quartz/components/ArticleTitle.tsx b/quartz/components/ArticleTitle.tsx index b8d58c6b..a52b2a46 100644 --- a/quartz/components/ArticleTitle.tsx +++ b/quartz/components/ArticleTitle.tsx @@ -1,9 +1,9 @@ import { QuartzComponentConstructor, QuartzComponentProps } from "./types" -function ArticleTitle({ fileData }: QuartzComponentProps) { +function ArticleTitle({ fileData, displayClass }: QuartzComponentProps) { const title = fileData.frontmatter?.title if (title) { - return

{title}

+ return

{title}

} else { return null } diff --git a/quartz/components/Backlinks.tsx b/quartz/components/Backlinks.tsx index e88966b1..c4172ce2 100644 --- a/quartz/components/Backlinks.tsx +++ b/quartz/components/Backlinks.tsx @@ -2,11 +2,11 @@ import { QuartzComponentConstructor, QuartzComponentProps } from "./types" import style from "./styles/backlinks.scss" import { resolveRelative, simplifySlug } from "../util/path" -function Backlinks({ fileData, allFiles }: QuartzComponentProps) { +function Backlinks({ fileData, allFiles, displayClass }: QuartzComponentProps) { const slug = simplifySlug(fileData.slug!) const backlinkFiles = allFiles.filter((file) => file.links?.includes(slug)) return ( -