feat: board opacity controller

This commit is contained in:
leokontente 2025-06-04 10:43:37 +02:00
parent f52e91520b
commit acc04b29fb
2 changed files with 20 additions and 8 deletions

View file

@ -48,6 +48,9 @@ block header
path(d="M9.405 1.05c-.413-1.4-2.397-1.4-2.81 0l-.1.34a1.464 1.464 0 0 1-2.105.872l-.31-.17c-1.283-.698-2.686.705-1.987 1.987l.169.311c.446.82.023 1.841-.872 2.105l-.34.1c-1.4.413-1.4 2.397 0 2.81l.34.1a1.464 1.464 0 0 1 .872 2.105l-.17.31c-.698 1.283.705 2.686 1.987 1.987l.311-.169a1.464 1.464 0 0 1 2.105.872l.1.34c.413 1.4 2.397 1.4 2.81 0l.1-.34a1.464 1.464 0 0 1 2.105-.872l.31.17c1.283.698 2.686-.705 1.987-1.987l-.169-.311a1.464 1.464 0 0 1 .872-2.105l.34-.1c1.4-.413 1.4-2.397 0-2.81l-.34-.1a1.464 1.464 0 0 1-.872-2.105l.17-.31c.698-1.283-.705-2.686-1.987-1.987l-.311.169a1.464 1.464 0 0 1-2.105-.872l-.1-.34zM8 10.93a2.929 2.929 0 1 1 0-5.86 2.929 2.929 0 0 1 0 5.858z")
block body
div(style="margin: 1em;")
label(for="opacity-range") Transparence du tableau :
input#opacity-range(type="range", min="0", max="1", step="0.01", value="1")
div.container
div.board-container
div.board-outline
@ -59,3 +62,11 @@ block body
span(style="font-weight:bold; font-size:16px;") +
div#delete-col.col-icon(title="Supprimer une colonne", style="width:20px; height:20px; display:flex; justify-content:center; align-items:center; border:1px solid #000; cursor:pointer; margin-top:4px;")
span(style="font-weight:bold; font-size:16px;")
script.
document.addEventListener('DOMContentLoaded', function () {
const slider = document.getElementById('opacity-range');
slider.addEventListener('input', function () {
document.documentElement.style.setProperty('--board-opacity', slider.value);
});
});