Full height site editor panel.

This commit is contained in:
2026-08-19 02:19:30 +00:00
parent 178d22c05c
commit e175b39f35
+19 -24
View File
@@ -561,7 +561,7 @@ onUnmounted(() => {
</div> </div>
</section> </section>
<section class="block" @paste="onBrandPaste"> <section class="block grow" @paste="onBrandPaste">
<div class="block-head"> <div class="block-head">
<span class="field-label">brand code (replaces the brand link)</span> <span class="field-label">brand code (replaces the brand link)</span>
<button <button
@@ -581,7 +581,7 @@ onUnmounted(() => {
<div ref="brandEl" class="brand-cm" /> <div ref="brandEl" class="brand-cm" />
</section> </section>
<section class="block"> <section class="block grow">
<div class="block-head"> <div class="block-head">
<span class="field-label">custom CSS (applies to every page, on top of the theme)</span> <span class="field-label">custom CSS (applies to every page, on top of the theme)</span>
</div> </div>
@@ -595,6 +595,7 @@ onUnmounted(() => {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow-y: auto; overflow-y: auto;
background: var(--surface);
} }
.block { .block {
@@ -606,6 +607,13 @@ onUnmounted(() => {
background: var(--surface); background: var(--surface);
} }
/* Editor blocks (brand HTML, custom CSS) share the leftover panel height
equally; their CodeMirror windows fill the block and scroll internally. */
.block.grow {
flex: 1;
min-height: 7rem;
}
.block-head { .block-head {
display: flex; display: flex;
align-items: center; align-items: center;
@@ -775,42 +783,29 @@ onUnmounted(() => {
border-color: var(--accent); border-color: var(--accent);
} }
/* Small CodeMirror window for the custom brand HTML; scrolls internally. */ /* CodeMirror windows for the brand HTML and custom CSS: fill the growing
.brand-cm { block, scroll internally. */
border: 1px solid var(--line); .brand-cm,
border-radius: 4px;
overflow: hidden;
}
.brand-cm :deep(.cm-editor) {
max-height: 7rem;
font-size: 0.85rem;
}
.brand-cm :deep(.cm-scroller) {
overflow: auto;
}
.brand-cm :deep(.cm-gutters) {
display: none;
}
/* CodeMirror window for site-wide custom CSS. */
.css-cm { .css-cm {
flex: 1;
min-height: 0;
border: 1px solid var(--line); border: 1px solid var(--line);
border-radius: 4px; border-radius: 4px;
overflow: hidden; overflow: hidden;
} }
.brand-cm :deep(.cm-editor),
.css-cm :deep(.cm-editor) { .css-cm :deep(.cm-editor) {
max-height: 12rem; height: 100%;
font-size: 0.85rem; font-size: 0.85rem;
} }
.brand-cm :deep(.cm-scroller),
.css-cm :deep(.cm-scroller) { .css-cm :deep(.cm-scroller) {
overflow: auto; overflow: auto;
} }
.brand-cm :deep(.cm-gutters),
.css-cm :deep(.cm-gutters) { .css-cm :deep(.cm-gutters) {
display: none; display: none;
} }