From 9acaa1c8ac8c8afd3fa08d3b1f58a60006fcfc6f Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Fri, 09 Aug 2024 01:19:45 +0000
Subject: [PATCH] feat: custom global latex macros (closes #1325)
---
quartz/components/Header.tsx | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/quartz/components/Header.tsx b/quartz/components/Header.tsx
index 197c4e5..eba17ae 100644
--- a/quartz/components/Header.tsx
+++ b/quartz/components/Header.tsx
@@ -1,9 +1,7 @@
-import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
+import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
-function Header({ children }: QuartzComponentProps) {
- return <header>
- {children}
- </header>
+const Header: QuartzComponent = ({ children }: QuartzComponentProps) => {
+ return children.length > 0 ? <header>{children}</header> : null
}
Header.css = `
@@ -11,12 +9,11 @@
display: flex;
flex-direction: row;
align-items: center;
- margin: 1em 0 2em 0;
- & > h1 {
- }
+ margin: 2rem 0;
+ gap: 1.5rem;
}
-header > h1 {
+header h1 {
margin: 0;
flex: auto;
}
--
Gitblit v1.10.0