From 158b5f19616428418f943657dc289388fc5025c1 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Mon, 24 Aug 2026 21:41:33 +0000 Subject: [PATCH] Editor panel layout fixes, use body scroll and bidirectional sync with editor. --- docs/design-principles.md | 2 +- docs/editing.md | 2 +- frontend/src/PageEditor.vue | 48 ++++++++++++++++++++++-------- frontend/src/assets/pagerite.css | 51 +++++++++++--------------------- frontend/src/main.js | 26 +++++++++++++++- 5 files changed, 80 insertions(+), 49 deletions(-) diff --git a/docs/design-principles.md b/docs/design-principles.md index a60bf17..2bf7f01 100644 --- a/docs/design-principles.md +++ b/docs/design-principles.md @@ -45,7 +45,7 @@ Pagerite is a single-user CMS/blog. This document records the initial high-level ## Editing - Editing happens **in place**, in two modes opened by two pens: - - **Page mode** — the 🖊️ next to a page's heading (including 404s, which is how new pages start) opens a CodeMirror Markdown editor docked to the left of the article: the host sits inside `#content` (below the banner, never over the footer), the content shifts right and the sidebar hides while editing. Preview renders server-side per keystroke (no debouncing) straight into the visible article's heading and body. + - **Page mode** — the 🖊️ next to a page's heading (including 404s, which is how new pages start) opens a CodeMirror Markdown editor docked to the left of the article: the panel is fixed to the viewport's left edge (its top tracks the banner's bottom until the banner scrolls away), the content shifts right and the sidebar hides while editing. Preview renders server-side per keystroke (no debouncing) straight into the visible article's heading and body. - **Site mode** — the 🖊️ on the banner opens a panel with the site **brand** (applied to the header live), a **theme** selector (swapping the theme stylesheet in place), **font** picks (heading/body/brand — stored as plain `:root` rows inside the custom CSS, referencing the base stylesheet's per-family font variables), a **site-wide custom CSS** field (injected into `