From b8c011410d6bcd6837f4efd6a3948196a0f7aeea Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Sat, 10 Jun 2023 06:06:02 +0000
Subject: [PATCH] toc

---
 quartz/components/Header.tsx |   29 +++++++++++++++++++----------
 1 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/quartz/components/Header.tsx b/quartz/components/Header.tsx
index 7da4a8e..8b06863 100644
--- a/quartz/components/Header.tsx
+++ b/quartz/components/Header.tsx
@@ -1,14 +1,23 @@
-import { resolveToRoot } from "../path"
+import { QuartzComponentProps } from "./types"
 
-export interface HeaderProps {
-  title: string
-  slug: string
-}
-
-export default function({ title, slug }: HeaderProps) {
-  const baseDir = resolveToRoot(slug)
+export default function Header({ children }: QuartzComponentProps) {
   return <header>
-    <h1><a href={baseDir}>{title}</a></h1>
+    {children}
   </header>
-
 }
+
+Header.css = `
+header {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  margin: 1em 0 2em 0;
+  & > h1 {
+  }
+}
+
+header > h1 {
+  margin: 0;
+  flex: auto;
+}
+`

--
Gitblit v1.10.0