Mise à jour du nouveau design :D #16

Open
Nono wants to merge 16 commits from feat/new-design into main
Showing only changes of commit 9b307813d6 - Show all commits

View file

@ -1,10 +1,6 @@
const stepSize = 100; const stepSize = 1;
const main = document.querySelector('main'); const main = document.querySelector('main');
for(let guideDraggable of document.querySelectorAll("#page-guide main > *")) {
guideDraggable.classList.add("draggable");
}
const draggables = document.querySelectorAll(".draggable"); const draggables = document.querySelectorAll(".draggable");
const randomStarts = document.querySelectorAll(".randomStart"); const randomStarts = document.querySelectorAll(".randomStart");
@ -13,8 +9,8 @@ var zIndex = 2;
activateDraggables(); activateDraggables();
/** /**
* *
* @param {number} n * @param {number} n
* @returns {number} * @returns {number}
*/ */
function stepedSize(n) { function stepedSize(n) {
@ -24,8 +20,6 @@ function stepedSize(n) {
function move(e) { function move(e) {
e.preventDefault(); e.preventDefault();
let target = e.target; let target = e.target;
target.style['z-index'] = zIndex;
zIndex++;
target.moving = true; target.moving = true;
@ -75,6 +69,7 @@ function randomizeDragables() {
randY = Math.floor(Math.random() * maxY); randY = Math.floor(Math.random() * maxY);
randomStart.style.left = randX + "px"; randomStart.style.left = randX + "px";
randomStart.style.top = randY + "px"; randomStart.style.top = randY + "px";
randomStart.style.rotate = Math.floor(Math.random() * 61) - 30 + "deg";
} }
} }