From 81e943b6d2f3c248e69b3ed0bc34cfe61aeda1ee Mon Sep 17 00:00:00 2001 From: vanadium23 Date: Sun, 1 Dec 2024 22:36:51 +0300 Subject: [PATCH] feat(layout): make header outside of center * make header above all content * make beforeBody --> pageHeader --- quartz.layout.ts | 6 ++---- quartz/cfg.ts | 3 +-- quartz/components/renderPage.tsx | 9 +-------- quartz/plugins/emitters/404.tsx | 1 - quartz/plugins/emitters/contentPage.tsx | 4 ++-- quartz/plugins/emitters/folderPage.tsx | 4 ++-- quartz/plugins/emitters/tagPage.tsx | 4 ++-- 7 files changed, 10 insertions(+), 21 deletions(-) diff --git a/quartz.layout.ts b/quartz.layout.ts index a1828a9c69a20..c02dae015e87a 100644 --- a/quartz.layout.ts +++ b/quartz.layout.ts @@ -16,8 +16,7 @@ export const sharedPageComponents: SharedLayout = { // components for pages that display a single page (e.g. a single note) export const defaultContentPageLayout: PageLayout = { - pageHeader: [], - beforeBody: [ + pageHeader: [ Component.Breadcrumbs(), Component.ArticleTitle(), Component.ContentMeta(), @@ -39,8 +38,7 @@ export const defaultContentPageLayout: PageLayout = { // components for pages that display lists of pages (e.g. tags or folders) export const defaultListPageLayout: PageLayout = { - pageHeader: [], - beforeBody: [Component.Breadcrumbs(), Component.ArticleTitle(), Component.ContentMeta()], + pageHeader: [Component.Breadcrumbs(), Component.ArticleTitle(), Component.ContentMeta()], left: [ Component.PageTitle(), Component.MobileOnly(Component.Spacer()), diff --git a/quartz/cfg.ts b/quartz/cfg.ts index 97a195b39ba37..efcae90218044 100644 --- a/quartz/cfg.ts +++ b/quartz/cfg.ts @@ -86,7 +86,6 @@ export interface FullPageLayout { head: QuartzComponent header: QuartzComponent[] pageHeader: QuartzComponent[] - beforeBody: QuartzComponent[] pageBody: QuartzComponent afterBody: QuartzComponent[] left: QuartzComponent[] @@ -94,5 +93,5 @@ export interface FullPageLayout { footer: QuartzComponent } -export type PageLayout = Pick +export type PageLayout = Pick export type SharedLayout = Pick diff --git a/quartz/components/renderPage.tsx b/quartz/components/renderPage.tsx index 99be1d07f45cf..4e03ce3e80bb7 100644 --- a/quartz/components/renderPage.tsx +++ b/quartz/components/renderPage.tsx @@ -13,7 +13,6 @@ interface RenderComponents { head: QuartzComponent header: QuartzComponent[] pageHeader: QuartzComponent[] - beforeBody: QuartzComponent[] pageBody: QuartzComponent afterBody: QuartzComponent[] left: QuartzComponent[] @@ -193,7 +192,6 @@ export function renderPage( head: Head, header, pageHeader, - beforeBody, pageBody: Content, afterBody, left, @@ -234,13 +232,8 @@ export function renderPage( {LeftComponent}