styles groupés, logo entête

This commit is contained in:
Tykayn 2025-05-28 17:05:34 +02:00 committed by tykayn
parent ccab916286
commit 1e02b7062d
13 changed files with 261 additions and 142 deletions

View file

@ -7,3 +7,32 @@
// any CSS you import will output into a single css file (app.css in this case)
import './styles/app.css';
console.log('Hello World de app.js');
function labourer() {
window.location.href = '/admin/labourer/' + document.getElementById('app_admin_labourer').value;
}
// Attendre le chargement du DOM
document.addEventListener('DOMContentLoaded', () => {
// Générer une couleur pastel aléatoire
const genererCouleurPastel = () => {
// Utiliser des valeurs plus claires (180-255) pour obtenir des tons pastel
const r = Math.floor(Math.random() * 75 + 180);
const g = Math.floor(Math.random() * 75 + 180);
const b = Math.floor(Math.random() * 75 + 180);
return `rgb(${r}, ${g}, ${b})`;
};
const randombg = genererCouleurPastel();
// Appliquer la couleur au body
document.body.style.backgroundColor = randombg;
// Appliquer le style pour .body-landing
const bodyLanding = document.querySelector('.body-landing');
if (bodyLanding) {
bodyLanding.style.backgroundColor = randombg;
}
});

View file

@ -1,3 +1,9 @@
body {
background-color: lightgray;
background-color: rgb(236, 236, 236);
}
.body-landing .container {
background-color: white;
border-radius: 10px;
padding: 20px;
}