Init photobooth - borne photo evenementielle RPi4
Backend FastAPI complet : camera gphoto2, filtres/overlays Pillow, chroma key OpenCV, multi-shot/collage, GIF, impression CUPS, email SMTP, QR code. Frontend web vanilla (HTML/CSS/JS) pour Chromium kiosk. Menu admin cache (appui long coin ecran). Toutes les fonctionnalites activables/desactivables. Scripts install + systemd pour RPi4. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
27
frontend/js/gallery.js
Normal file
27
frontend/js/gallery.js
Normal file
@@ -0,0 +1,27 @@
|
||||
/* Module galerie */
|
||||
|
||||
async function chargerGalerie() {
|
||||
const photos = await apiGet('/api/galerie');
|
||||
const grille = document.getElementById('grille-galerie');
|
||||
grille.innerHTML = '';
|
||||
|
||||
if (photos.length === 0) {
|
||||
grille.innerHTML = '<p style="color:var(--texte-secondaire);grid-column:1/-1;text-align:center">Aucune photo pour le moment</p>';
|
||||
return;
|
||||
}
|
||||
|
||||
for (const photo of photos) {
|
||||
const img = document.createElement('img');
|
||||
img.src = '/' + photo.chemin;
|
||||
img.alt = photo.nom;
|
||||
img.loading = 'lazy';
|
||||
img.addEventListener('click', () => voirPhoto(photo));
|
||||
grille.appendChild(img);
|
||||
}
|
||||
}
|
||||
|
||||
function voirPhoto(photo) {
|
||||
photoFinale = photo.nom;
|
||||
document.getElementById('photo-partage').src = '/' + photo.chemin;
|
||||
allerA('partage');
|
||||
}
|
||||
Reference in New Issue
Block a user