From 8cf3e3001f2cbd18da73fcc92ae5f4b76d3ecf21 Mon Sep 17 00:00:00 2001
From: Patsagorn Y. <49602385+ptsgrn@users.noreply.github.com>
Date: Thu, 16 Jan 2025 20:44:33 +0000
Subject: [PATCH] feat(i18n): Thai translations (#1722)
---
quartz/components/ArticleTitle.tsx | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/quartz/components/ArticleTitle.tsx b/quartz/components/ArticleTitle.tsx
index 37950c4..318aeb2 100644
--- a/quartz/components/ArticleTitle.tsx
+++ b/quartz/components/ArticleTitle.tsx
@@ -1,13 +1,19 @@
-import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
+import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
+import { classNames } from "../util/lang"
-function ArticleTitle({ fileData }: QuartzComponentProps) {
+const ArticleTitle: QuartzComponent = ({ fileData, displayClass }: QuartzComponentProps) => {
const title = fileData.frontmatter?.title
- const displayTitle = fileData.slug === "index" ? undefined : title
- if (displayTitle) {
- return <h1>{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;
+}
+`
+
export default (() => ArticleTitle) satisfies QuartzComponentConstructor
--
Gitblit v1.10.0