diff --git a/src/index.html b/src/index.html index e32cb26..32fa7f3 100644 --- a/src/index.html +++ b/src/index.html @@ -1502,9 +1502,68 @@ body.template-book .jewelSpineGuide, body.template-book .spineText { display: none !important; } + /* Markdown chapter editor — shown when a reflow entry is open + on the book canvas. Two-pane layout: textarea on the left, + paginated preview on the right. */ + #bookChapterEditor { display: none; } + body.template-book.editing-book-chapter #bookChapterEditor { + display: flex; + flex-direction: column; + width: 100%; gap: 10px; + padding: 14px 18px; + box-sizing: border-box; + min-height: calc(100vh - 160px); + } + .bookChapterEditorToolbar { + display: flex; align-items: center; gap: 10px; flex-wrap: wrap; + padding-bottom: 8px; border-bottom: 1px solid var(--line); + } + .bookChapterEditorToolbar input[type="text"] { + flex: 1; min-width: 160px; + font-size: 1rem; font-weight: 600; + padding: 4px 8px; + border: 1px solid var(--line); + } + .bookChapterEditorPages { + font-size: .78rem; color: var(--muted); white-space: nowrap; + } + .bookChapterEditorBody { + flex: 1; + display: grid; + grid-template-columns: 1fr 1fr; + gap: 10px; + min-height: 0; + } + #bookChapterEditorTextarea { + width: 100%; height: 100%; + padding: 12px; + font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; + font-size: 13px; line-height: 1.55; + border: 1px solid var(--line); background: #fff; + resize: none; + } + .bookChapterEditorPreviewWrap { + border: 1px solid var(--line); background: #fff; + overflow: auto; + padding: 16px 20px; + } + #bookChapterEditorPreview { font-family: Georgia, serif; line-height: 1.6; } + #bookChapterEditorPreview h1 { font-family: Helvetica, Arial, sans-serif; font-size: 2rem; margin: 0 0 .6em; } + #bookChapterEditorPreview h2 { font-family: Helvetica, Arial, sans-serif; font-size: 1.5rem; margin: 1.2em 0 .4em; } + #bookChapterEditorPreview h3 { font-family: Helvetica, Arial, sans-serif; font-size: 1.2rem; margin: 1em 0 .4em; } + #bookChapterEditorPreview p { margin: 0 0 .8em; } + #bookChapterEditorPreview blockquote { margin: .8em 1.2em; font-style: italic; color: #4b5563; } + #bookChapterEditorPreview code { background: #f5f5f5; padding: 1px 5px; font-size: .92em; } + #bookChapterEditorPreview pre { background: #f5f5f5; padding: 10px 12px; overflow-x: auto; } + #bookChapterEditorPreview pre code { background: none; padding: 0; } + #bookChapterEditorPreview a { color: #0066cc; } + #bookChapterEditorPreview hr { border: 0; border-top: 1px solid #cccccc; margin: 1.2em 0; } + #bookChapterEditorPreview ul, #bookChapterEditorPreview ol { padding-left: 1.4em; margin: 0 0 .8em; } + #bookChapterEditorPreview img { max-width: 100%; } + /* Book view shell — mirrors the deck-sorter layout pattern. */ #bookView { display: none; } - body.template-book:not(.editing-book-page) #bookView { + body.template-book:not(.editing-book-page):not(.editing-book-chapter) #bookView { display: flex; flex-direction: column; width: 100%; @@ -4259,6 +4318,21 @@
+
+
+ + + + + Markdown autosaves to this book. Phase D1 publishes as a NIP-23 article. +
+
+ +
+
+
+
+
@@ -4271,10 +4345,11 @@
+
-

Phase A4 skeleton: tiles are placeholders. Click a tile in Phase B to edit the page. Reflow / NIP-23 chapters arrive in Phase C.5; per-page Nostr publish in Phase D1.

+

Click a designed-page tile to edit it on the canvas. Click a chapter tile to edit its markdown. Per-page Nostr publish (per-event sidecars + manifest) lands in Phase D1.