FEAT: side A/B
All checks were successful
Deploy App / build (push) Successful in 14s
Deploy App / deploy (push) Successful in 9s

This commit is contained in:
valere
2025-11-15 21:56:37 +01:00
parent 3424d2d6fc
commit 1b8b998622
49 changed files with 563 additions and 822 deletions

View File

@@ -35,6 +35,7 @@ export const useUiStore = defineStore('ui', {
selectBox(id: string) {
const dataStore = useDataStore()
dataStore.boxes.forEach((box) => {
id = id.replace(/[AB]$/, '')
box.state = box.id === id ? 'box-selected' : 'box-hidden'
})
},
@@ -57,7 +58,7 @@ export const useUiStore = defineStore('ui', {
// Récupérer la position de l'élément
const elementRect = boxElement.getBoundingClientRect()
// Calculer la position de défilement (une boîte plus haut)
const offsetPosition = elementRect.top + window.pageYOffset - (elementRect.height * 1.5)
const offsetPosition = elementRect.top + window.pageYOffset - elementRect.height * 1.5
// Faire défiler à la nouvelle position
window.scrollTo({
top: offsetPosition,