From 6d5491fdcbccfad7af6c6dcc63ce2f67abd3850c Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Sat, 17 Jun 2023 19:07:40 +0000
Subject: [PATCH] collapsible toc
---
quartz/components/Header.tsx | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/quartz/components/Header.tsx b/quartz/components/Header.tsx
index 8eb2d70..197c4e5 100644
--- a/quartz/components/Header.tsx
+++ b/quartz/components/Header.tsx
@@ -1,10 +1,25 @@
-import style from './styles/header.scss'
-import { QuartzComponentProps } from "./types"
+import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
-export default function Header({ children }: QuartzComponentProps) {
+function Header({ children }: QuartzComponentProps) {
return <header>
{children}
</header>
}
-Header.css = style
+Header.css = `
+header {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ margin: 1em 0 2em 0;
+ & > h1 {
+ }
+}
+
+header > h1 {
+ margin: 0;
+ flex: auto;
+}
+`
+
+export default (() => Header) satisfies QuartzComponentConstructor
--
Gitblit v1.10.0