Légende statuts en haut du Binder
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+23
-22
@@ -381,7 +381,7 @@ window.dispatchEvent(new Event('tiptap-loaded'));
|
|||||||
.editor-saving { position: fixed; bottom: 20px; right: 20px; background: var(--accent); color: var(--bg); padding: 8px 18px; border-radius: 8px; font-size: 13px; font-family: 'Lora', serif; opacity: 0; transition: opacity 0.3s; z-index: 200; pointer-events: none; }
|
.editor-saving { position: fixed; bottom: 20px; right: 20px; background: var(--accent); color: var(--bg); padding: 8px 18px; border-radius: 8px; font-size: 13px; font-family: 'Lora', serif; opacity: 0; transition: opacity 0.3s; z-index: 200; pointer-events: none; }
|
||||||
.editor-saving.show { opacity: 1; }
|
.editor-saving.show { opacity: 1; }
|
||||||
.word-count { font-size: 12px; color: var(--text-hint); padding: 8px 32px; border-top: 1px solid var(--border-light); background: var(--bg); }
|
.word-count { font-size: 12px; color: var(--text-hint); padding: 8px 32px; border-top: 1px solid var(--border-light); background: var(--bg); }
|
||||||
.binder-legend { padding: 12px 20px; border-top: 1px solid var(--border); margin-top: auto; }
|
.binder-legend { padding: 12px 20px; border-bottom: 1px solid var(--border); }
|
||||||
.binder-legend-title { font-size: 11px; color: var(--text-hint); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
|
.binder-legend-title { font-size: 11px; color: var(--text-hint); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
|
||||||
.binder-legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); margin-bottom: 3px; }
|
.binder-legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); margin-bottom: 3px; }
|
||||||
.binder-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
|
.binder-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
|
||||||
@@ -1622,6 +1622,28 @@ function buildBinder() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
binder.innerHTML = '';
|
binder.innerHTML = '';
|
||||||
|
|
||||||
|
// Legend at top
|
||||||
|
const legend = document.createElement('div');
|
||||||
|
legend.className = 'binder-legend';
|
||||||
|
const legendTitle = document.createElement('div');
|
||||||
|
legendTitle.className = 'binder-legend-title';
|
||||||
|
legendTitle.textContent = 'Statuts';
|
||||||
|
legend.appendChild(legendTitle);
|
||||||
|
[['#c4a030', 'À étudier'], ['#5a7a3a', 'Validée'], ['#a08a76', 'Abandonnée'], ['#8b3030', 'En conflit']].forEach(([color, label]) => {
|
||||||
|
const item = document.createElement('div');
|
||||||
|
item.className = 'binder-legend-item';
|
||||||
|
const dot = document.createElement('span');
|
||||||
|
dot.className = 'binder-legend-dot';
|
||||||
|
dot.style.background = color;
|
||||||
|
const txt = document.createElement('span');
|
||||||
|
txt.textContent = label;
|
||||||
|
item.appendChild(dot);
|
||||||
|
item.appendChild(txt);
|
||||||
|
legend.appendChild(item);
|
||||||
|
});
|
||||||
|
binder.appendChild(legend);
|
||||||
|
|
||||||
let totalWords = 0;
|
let totalWords = 0;
|
||||||
|
|
||||||
ACTE_ORDER.forEach(acte => {
|
ACTE_ORDER.forEach(acte => {
|
||||||
@@ -1656,27 +1678,6 @@ function buildBinder() {
|
|||||||
totalDiv.style.cssText = 'padding: 16px 20px; margin-top: 12px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-hint);';
|
totalDiv.style.cssText = 'padding: 16px 20px; margin-top: 12px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-hint);';
|
||||||
totalDiv.textContent = totalWords > 0 ? `Total : ${totalWords.toLocaleString('fr-FR')} mots` : '';
|
totalDiv.textContent = totalWords > 0 ? `Total : ${totalWords.toLocaleString('fr-FR')} mots` : '';
|
||||||
binder.appendChild(totalDiv);
|
binder.appendChild(totalDiv);
|
||||||
|
|
||||||
// Legend — static content, no user input
|
|
||||||
const legend = document.createElement('div');
|
|
||||||
legend.className = 'binder-legend';
|
|
||||||
const legendTitle = document.createElement('div');
|
|
||||||
legendTitle.className = 'binder-legend-title';
|
|
||||||
legendTitle.textContent = 'Statuts';
|
|
||||||
legend.appendChild(legendTitle);
|
|
||||||
[['#c4a030', 'À étudier'], ['#5a7a3a', 'Validée'], ['#a08a76', 'Abandonnée'], ['#8b3030', 'En conflit']].forEach(([color, label]) => {
|
|
||||||
const item = document.createElement('div');
|
|
||||||
item.className = 'binder-legend-item';
|
|
||||||
const dot = document.createElement('span');
|
|
||||||
dot.className = 'binder-legend-dot';
|
|
||||||
dot.style.background = color;
|
|
||||||
const txt = document.createElement('span');
|
|
||||||
txt.textContent = label;
|
|
||||||
item.appendChild(dot);
|
|
||||||
item.appendChild(txt);
|
|
||||||
legend.appendChild(item);
|
|
||||||
});
|
|
||||||
binder.appendChild(legend);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function openScene(scene) {
|
async function openScene(scene) {
|
||||||
|
|||||||
Reference in New Issue
Block a user