Add quote indicator and distinct callout styling for Note/Tip/Warning/Important
- Description editor: blockquotes get a left accent line and muted color so it's clear when typing in "quote mode" (matches the existing active Quote toolbar button highlight). - Editor block cards: each text block's left border is colored by its level (info/success/warn/error) so Note/Tip/Warning/Important are distinguishable at a glance. - PDF/HTML/DOCX exports: callouts now get a level-specific accent color and tinted background/shading (blue/green/amber/red), instead of all looking identical except for the label text. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
@@ -674,6 +674,7 @@ class GuideEditor {
|
||||
}, header);
|
||||
|
||||
if (kind === 'text') {
|
||||
card.dataset.level = block.level || 'info';
|
||||
const position = makeSelect(block.position, [
|
||||
{ value: 'before-title', label: 'Before title' },
|
||||
{ value: 'after-title', label: 'After title' },
|
||||
@@ -696,7 +697,7 @@ class GuideEditor {
|
||||
body.dataset.blockField = 'body';
|
||||
body.value = (block.descriptionHtml || '').replace(/<[^>]+>/g, '');
|
||||
position.addEventListener('change', () => { block.position = position.value; save(); });
|
||||
level.addEventListener('change', () => { block.level = level.value; save(); });
|
||||
level.addEventListener('change', () => { block.level = level.value; card.dataset.level = level.value; save(); });
|
||||
title.addEventListener('input', () => { block.title = title.value; save(); });
|
||||
body.addEventListener('input', () => { block.descriptionHtml = `<p>${escapeHtml(body.value)}</p>`; save(); });
|
||||
card.append(
|
||||
|
||||
@@ -514,6 +514,12 @@ kbd {
|
||||
border-radius: 10px;
|
||||
background: var(--panel-2);
|
||||
}
|
||||
.rich-editor blockquote {
|
||||
margin: 6px 0;
|
||||
padding: 2px 0 2px 12px;
|
||||
border-left: 3px solid var(--accent);
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.block-card,
|
||||
.annotation-editor-inner {
|
||||
@@ -523,12 +529,17 @@ kbd {
|
||||
}
|
||||
.block-card {
|
||||
border: 1px solid var(--border);
|
||||
border-left: 4px solid var(--border);
|
||||
border-radius: 12px;
|
||||
padding: 10px;
|
||||
background: var(--panel-solid);
|
||||
}
|
||||
.block-card[draggable="true"] { cursor: grab; }
|
||||
.block-card[draggable="true"]:active { cursor: grabbing; }
|
||||
.block-card[data-level="info"] { border-left-color: #3b82f6; }
|
||||
.block-card[data-level="success"] { border-left-color: #10b981; }
|
||||
.block-card[data-level="warn"] { border-left-color: #f59e0b; }
|
||||
.block-card[data-level="error"] { border-left-color: #ef4444; }
|
||||
.annotation-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
Reference in New Issue
Block a user