Autosave box HTML, fix editor selection, make /shrines a canvas page
The HTML editor's selection was invisible: CodeMirror's focused-selection rule outranked ours and painted #233, and the opaque active line covered the selection layer. Match its selector and make the active line translucent. Unsaved HTML now saves on leaving a box (selecting another, clicking empty canvas, Done, closing the panel) instead of asking to discard. /shrines is no longer a hard-coded route but an ordinary canvas page, with links placed by hand as Link boxes; the backend no longer reserves the slug. The Shrine starter layout is gone, and the admin Pages tab gains a "New shrine" form that makes a blank page under shrines/. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -37,8 +37,17 @@ onMounted(async () => {
|
||||
"&": { height: "100%", fontSize: "13px", backgroundColor: "var(--color-surface-deep)", color: "var(--color-muted)" },
|
||||
".cm-content": { caretColor: "var(--color-primary)" },
|
||||
".cm-gutters": { backgroundColor: "var(--color-surface)", color: "var(--color-quaternary)", border: "none" },
|
||||
".cm-activeLine, .cm-activeLineGutter": { backgroundColor: "var(--color-surface-tint)" },
|
||||
"&.cm-focused .cm-selectionBackground, .cm-selectionBackground": { backgroundColor: "#24504a" },
|
||||
// The selection is drawn in a layer *behind* the text, so an opaque
|
||||
// active-line colour would hide it on the cursor's line: keep it
|
||||
// translucent.
|
||||
".cm-activeLine": { backgroundColor: "#55ffbb0d" },
|
||||
".cm-activeLineGutter": { backgroundColor: "var(--color-surface-tint)" },
|
||||
// Same selectors as CodeMirror's base theme — a shorter one loses to
|
||||
// its focused rule, which paints #233, all but invisible here.
|
||||
"& .cm-selectionBackground, &.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground": {
|
||||
backgroundColor: "#1f6b5c",
|
||||
},
|
||||
".cm-selectionMatch": { backgroundColor: "#55ffbb26" },
|
||||
".cm-scroller": { fontFamily: "ui-monospace, monospace" },
|
||||
},
|
||||
{ dark: true },
|
||||
|
||||
Reference in New Issue
Block a user