Split CSS into base and theme, link them separately

- Move shared structural styles to frontend/src/assets/pagerite.css
  with conservative variables, and purple theme overrides to
  frontend/src/assets/themes/purple/theme.css.
- Backend now links the base and theme stylesheets as separate files
  so they can be swapped or augmented.
- Add blocking="render" to stylesheet links to avoid FOUC.
- Drop redundant defer from module script tags.
- Update related docs and comments.
This commit is contained in:
2026-08-16 19:51:17 +00:00
parent 840f15ee59
commit 6de0307856
10 changed files with 173 additions and 65 deletions
+5 -2
View File
@@ -1,5 +1,3 @@
import "./assets/style.css";
// Pagerite editor entries. Two separate apps, mounted in their own
// dynamically created host divs inside the static document:
// - PageEditor ("page" mode): pen next to an article heading — Markdown
@@ -8,6 +6,11 @@ import "./assets/style.css";
// (previewed into the real banner) and the site structure tree.
// The standalone /_/admin shell (#app in the DOM) mounts PageEditor with the
// page selected by location hash, as a no-dynamic-import fallback.
if (import.meta.env.DEV) {
import("./assets/pagerite.css");
import("./assets/themes/purple/theme.css");
}
import { createApp } from 'vue'
import PageEditor from './PageEditor.vue'
import SiteEditor from './SiteEditor.vue'