diff --git a/browse/css/tree.css b/browse/css/tree.css index dfff4fc..4f4994a 100644 --- a/browse/css/tree.css +++ b/browse/css/tree.css @@ -538,6 +538,16 @@ html, body { background: var(--bg); border: 1px solid var(--border); } +.md-shell__download { + /* Slightly tighter than the Save button so a row of three doesn't + crowd the title. The base .btn styles still drive padding/color. */ + font-variant-numeric: tabular-nums; + letter-spacing: 0.02em; +} +.md-shell__download[disabled] { + opacity: 0.55; + cursor: progress; +} /* Editor host: a single grid cell with overflow:hidden so Toast UI's internal scrollers handle the content. */ @@ -623,34 +633,41 @@ html, body { transition: background-color 0.3s ease; } -/* ── Front matter list ──────────────────────────────────────────────────── */ -.md-fm__empty { +/* ── Front matter editor ────────────────────────────────────────────────── */ +.md-fm__body { + /* Body cell owns the textarea; sized by the sidebar's grid row. */ + padding: 0; + display: block; + overflow: hidden; +} +.md-fm__textarea { + width: 100%; + height: 100%; + box-sizing: border-box; + margin: 0; + padding: 0.4rem 0.6rem; + border: 0; + background: transparent; + color: var(--text); + font-family: var(--font-mono, ui-monospace, SFMono-Regular, Consolas, monospace); + font-size: 0.8rem; + line-height: 1.45; + resize: none; + outline: none; + white-space: pre; + overflow: auto; + tab-size: 2; +} +.md-fm__textarea::placeholder { color: var(--text-muted); font-style: italic; - font-size: 0.82rem; - margin: 0; - padding: 0.5rem 0.75rem; } -.md-fm__list { - margin: 0; - padding: 0.3rem 0.75rem; - display: grid; - grid-template-columns: minmax(4.5rem, max-content) 1fr; - gap: 0.2rem 0.6rem; - font-size: 0.8rem; +.md-fm__textarea:focus { + background: var(--surface-2, rgba(0, 0, 0, 0.025)); } -.md-fm__list dt { - font-weight: 600; +.md-fm__textarea[readonly] { color: var(--text-muted); - text-transform: lowercase; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} -.md-fm__list dd { - margin: 0; - color: var(--text); - overflow-wrap: anywhere; + cursor: not-allowed; } /* ── Sort control ────────────────────────────────────────────────────────── */ diff --git a/browse/js/preview-markdown.js b/browse/js/preview-markdown.js index 66854cf..5847f81 100644 --- a/browse/js/preview-markdown.js +++ b/browse/js/preview-markdown.js @@ -2,22 +2,31 @@ // // Layout (CSS Grid): // ┌─────────────────────────────────────────────────────────────────┐ -// │ toolbar: Save | ● modified | status | source │ -// ├────────────────────────────────────────┬────────────────────────┤ -// │ │ Outline │ -// │ │ • Heading 1 │ -// │ Toast UI Editor │ • Subheading │ -// │ (md / wysiwyg / preview) │ • Heading 2 │ -// │ ├────────────────────────┤ -// │ │ Front matter │ -// │ │ title: Foo │ -// │ │ revision: A │ -// └────────────────────────────────────────┴────────────────────────┘ +// │ info: name | dirty | status | source | DOCX HTML PDF | Save │ +// ├────────────────────────┬────────────────────────────────────────┤ +// │ YAML front matter │ │ +// │ ┌──────────────────┐ │ │ +// │ │ title: Foo │ │ Toast UI Editor │ +// │ │ revision: A │ │ (md / wysiwyg / preview) │ +// │ └──────────────────┘ │ │ +// ├────────────────────────┤ │ +// │ Outline │ │ +// │ • Heading 1 │ │ +// │ • Subheading │ │ +// │ • Heading 2 │ │ +// └────────────────────────┴────────────────────────────────────────┘ // Grid keeps every cell's size definite, which is what Toast UI needs // to compute its inner scroll regions correctly. The previous nested- // flexbox layout produced indeterminate heights and a fragile TOC // pane width — grid fixes both. // +// Front matter is edited in a dedicated