From ba9f243728cab171f86b40b9d50db485af272a39 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Sat, 01 Jul 2023 07:03:01 +0000
Subject: [PATCH] tag and folder pages
---
quartz/components/Header.tsx | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/quartz/components/Header.tsx b/quartz/components/Header.tsx
index 8b06863..06ae88b 100644
--- a/quartz/components/Header.tsx
+++ b/quartz/components/Header.tsx
@@ -1,9 +1,9 @@
-import { QuartzComponentProps } from "./types"
+import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
-export default function Header({ children }: QuartzComponentProps) {
- return <header>
+function Header({ children }: QuartzComponentProps) {
+ return (children.length > 0) ? <header>
{children}
- </header>
+ </header> : null
}
Header.css = `
@@ -11,13 +11,13 @@
display: flex;
flex-direction: row;
align-items: center;
- margin: 1em 0 2em 0;
- & > h1 {
- }
+ margin: 2em 0;
}
-header > h1 {
+header h1 {
margin: 0;
flex: auto;
}
`
+
+export default (() => Header) satisfies QuartzComponentConstructor
--
Gitblit v1.10.0