Fix Vision: remove height slider, fix multiline save in list descriptions

- Remove hero height slider (unnecessary UI element)
- Use innerText instead of textContent for description save/restore
  to preserve line breaks in "Ce qu'on veut / ne veut pas" items

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Etienne Delvarre
2026-06-03 11:48:59 +02:00
parent 2bea3eb4de
commit cb80b7ccd1
+1 -16
View File
@@ -310,11 +310,6 @@ window.dispatchEvent(new Event('tiptap-loaded'));
.hero-banner:hover .hero-controls { opacity: 1; } .hero-banner:hover .hero-controls { opacity: 1; }
.hero-btn { font-size: 12px; color: rgba(255,255,255,0.8); background: rgba(44,24,16,0.5); padding: 4px 12px; border-radius: 6px; border: none; cursor: pointer; backdrop-filter: blur(4px); } .hero-btn { font-size: 12px; color: rgba(255,255,255,0.8); background: rgba(44,24,16,0.5); padding: 4px 12px; border-radius: 6px; border: none; cursor: pointer; backdrop-filter: blur(4px); }
.hero-btn:hover { background: rgba(44,24,16,0.7); color: #fff; } .hero-btn:hover { background: rgba(44,24,16,0.7); color: #fff; }
.hero-height-control { position: absolute; bottom: -28px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 8px; opacity: 0; transition: opacity 0.2s; background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; padding: 4px 12px; }
.hero-banner:hover + .hero-height-control, .hero-height-control:hover { opacity: 1; }
.hero-height-control label { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.hero-height-control input[type="range"] { width: 120px; accent-color: var(--accent); }
.hero-height-control + input[type="file"] { margin-bottom: 8px; }
.hero-overlay .three-words { font-family: 'Playfair Display', serif; font-size: 32px; font-weight: 700; color: rgba(255,255,255,0.7); letter-spacing: 2px; } .hero-overlay .three-words { font-family: 'Playfair Display', serif; font-size: 32px; font-weight: 700; color: rgba(255,255,255,0.7); letter-spacing: 2px; }
.hero-overlay .hero-sub { font-size: 14px; color: rgba(255,255,255,0.75); margin-top: 6px; font-style: italic; } .hero-overlay .hero-sub { font-size: 14px; color: rgba(255,255,255,0.75); margin-top: 6px; font-style: italic; }
@@ -602,10 +597,6 @@ window.dispatchEvent(new Event('tiptap-loaded'));
<div class="hero-sub" id="v-hero-sub" contenteditable="true" onclick="event.stopPropagation()"></div> <div class="hero-sub" id="v-hero-sub" contenteditable="true" onclick="event.stopPropagation()"></div>
</div> </div>
</div> </div>
<div class="hero-height-control" id="hero-height-control">
<label>Hauteur</label>
<input type="range" min="150" max="600" value="400" id="hero-height-slider" oninput="setHeroHeight(this.value)" onchange="saveHeroMeta()">
</div>
<input type="file" id="hero-file-input" accept="image/*" style="display:none;" onchange="uploadHeroImage(this)"> <input type="file" id="hero-file-input" accept="image/*" style="display:none;" onchange="uploadHeroImage(this)">
<div class="v-card"> <div class="v-card">
@@ -1632,7 +1623,7 @@ function renderList(section, containerId, cssClass) {
descEl.focus(); descEl.focus();
}; };
descEl.addEventListener('blur', () => { descEl.addEventListener('blur', () => {
const v = descEl.textContent.trim(); const v = descEl.innerText.trim();
if (v !== (items[i].desc || '')) { items[i].desc = v; saveVisionSection(section, JSON.stringify(items)); } if (v !== (items[i].desc || '')) { items[i].desc = v; saveVisionSection(section, JSON.stringify(items)); }
descEl.style.display = 'none'; descEl.style.display = 'none';
if (v) { if (v) {
@@ -1933,12 +1924,6 @@ function applyHeroMeta() {
const banner = document.getElementById('hero-banner'); const banner = document.getElementById('hero-banner');
banner.style.backgroundPosition = `center ${heroMeta.posY}%`; banner.style.backgroundPosition = `center ${heroMeta.posY}%`;
banner.style.height = heroMeta.height + 'px'; banner.style.height = heroMeta.height + 'px';
document.getElementById('hero-height-slider').value = heroMeta.height;
}
function setHeroHeight(val) {
heroMeta.height = parseInt(val);
document.getElementById('hero-banner').style.height = val + 'px';
} }
function saveHeroMeta() { function saveHeroMeta() {