From d2fb50b83c9557f1cd36e4706e9a11aa8f01e458 Mon Sep 17 00:00:00 2001
From: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
Date: Tue, 06 Feb 2024 07:06:19 +0000
Subject: [PATCH] fix(links): show backdrop on links highlighted in headers alias (#816)
---
quartz/components/ArticleTitle.tsx | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/quartz/components/ArticleTitle.tsx b/quartz/components/ArticleTitle.tsx
index c25769e..7768de6 100644
--- a/quartz/components/ArticleTitle.tsx
+++ b/quartz/components/ArticleTitle.tsx
@@ -1,14 +1,15 @@
import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
+import { classNames } from "../util/lang"
-function ArticleTitle({ fileData }: QuartzComponentProps) {
+function ArticleTitle({ fileData, displayClass }: QuartzComponentProps) {
const title = fileData.frontmatter?.title
- const displayTitle = fileData.slug === "index" ? undefined : title
- if (displayTitle) {
- return <h1 class="article-title">{displayTitle}</h1>
+ if (title) {
+ return <h1 class={classNames(displayClass, "article-title")}>{title}</h1>
} else {
return null
}
}
+
ArticleTitle.css = `
.article-title {
margin: 2rem 0 0 0;
--
Gitblit v1.10.0