Add 2 files
Browse filesFiles changed (2)
- index.html+404-374
- prompts.txt+1
2 unmodified lines345678920 unmodified lines303132333435363718 unmodified lines5657585960619 unmodified lines7172737475767730 unmodified lines1081091101111121131141151161171181191201211221233 unmodified lines1271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862877 unmodified lines2952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635642 unmodified lines<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Admin Événements - Église Semence AMour</title><script src="https://cdn.tailwindcss.com"></script><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"><style>20 unmodified linesbackground-color: var(--secondary);}.event-image-preview {max-height: 200px;object-fit: cover;}18 unmodified lines.menu-toggle.rotated {transform: rotate(90deg);}</style></head><body class="bg-gray-100">9 unmodified lines</div><nav class="mt-4"><a href="#" class="sidebar-link block py-2 px-4 bg-green-700"><i class="fas fa-tachometer-alt mr-2"></i> Tableau de bord</a>30 unmodified lines</div></div><a href="#" class="sidebar-link block py-2 px-4 hover:bg-green-700"><i class="fas fa-calendar-alt mr-2"></i> Événements</a><a href="#" class="sidebar-link block py-2 px-4 hover:bg-green-700"><i class="fas fa-users mr-2"></i> Membres</a><a href="#" class="sidebar-link block py-2 px-4 hover:bg-green-700"><i class="fas fa-file-alt mr-2"></i> Sermons</a><a href="#" class="sidebar-link block py-2 px-4 hover:bg-green-700"><i class="fas fa-cog mr-2"></i> Paramètres</a></nav>3 unmodified lines<div class="ml-64 flex-1 p-8"><div class="flex justify-between items-center mb-8"><h1 class="text-2xl font-bold text-gray-800"><i class="fas fa-calendar-alt mr-2 text-green-700"></i> Gestion des Événements</h1><button id="add-event-btn" class="btn-primary px-4 py-2 rounded text-white font-medium"><i class="fas fa-plus mr-1"></i> Ajouter un événement</button></div><!-- Event List --><div class="bg-white rounded-lg shadow overflow-hidden"><div class="overflow-x-auto"><table class="min-w-full divide-y divide-gray-200"><thead class="bg-gray-50"><tr><th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Image</th><th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Titre</th><th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date</th><th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Statut</th><th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th></tr></thead><tbody id="events-list" class="bg-white divide-y divide-gray-200"><!-- Events will be loaded here --></tbody></table></div></div></div></div><!-- Event Modal --><div id="event-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center hidden z-50"><div class="bg-white rounded-lg shadow-xl w-full max-w-2xl max-h-screen overflow-y-auto"><div class="p-6"><div class="flex justify-between items-center border-b pb-4"><h3 id="modal-title" class="text-xl font-bold text-gray-800">Nouvel Événement</h3><button id="close-modal" class="text-gray-500 hover:text-gray-700"><i class="fas fa-times"></i></button></div><form id="event-form" class="mt-4 space-y-4"><input type="hidden" id="event-id"><div><label for="event-title" class="block text-sm font-medium text-gray-700">Titre de l'événement</label><input type="text" id="event-title" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"></div><div class="grid grid-cols-1 md:grid-cols-2 gap-4"><div><label for="event-date" class="block text-sm font-medium text-gray-700">Date</label><input type="date" id="event-date" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"></div><div><label for="event-time" class="block text-sm font-medium text-gray-700">Heure</label><input type="time" id="event-time" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"></div></div><div><label for="event-location" class="block text-sm font-medium text-gray-700">Lieu</label><input type="text" id="event-location" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"></div><div><label for="event-description" class="block text-sm font-medium text-gray-700">Description</label><textarea id="event-description" rows="4" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"></textarea></div><div><label for="event-image" class="block text-sm font-medium text-gray-700">Image</label><input type="file" id="event-image" accept="image/*" class="mt-1 block w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-md file:border-0 file:text-sm file:font-semibold file:bg-green-50 file:text-green-700 hover:file:bg-green-100"><div id="image-preview-container" class="mt-2 hidden"><img id="image-preview" class="event-image-preview w-full rounded-md"></div></div><div><label for="event-status" class="block text-sm font-medium text-gray-700">Statut</label><select id="event-status" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"><option value="published">Publié</option><option value="draft">Brouillon</option></select></div><div class="flex justify-end space-x-3 pt-4"><button type="button" id="cancel-event" class="px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500">Annuler</button><button type="submit" id="save-event" class="btn-primary px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-green-700 hover:bg-green-800 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500">Enregistrer</button></div></form></div></div></div><!-- Confirmation Modal --><div id="confirm-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center hidden z-50"><div class="bg-white rounded-lg shadow-xl w-full max-w-md"><div class="p-6"><div class="flex justify-between items-center border-b pb-4"><h3 class="text-xl font-bold text-gray-800">Confirmation</h3><button id="close-confirm-modal" class="text-gray-500 hover:text-gray-700"><i class="fas fa-times"></i></button></div><div class="mt-4"><p id="confirm-message">Êtes-vous sûr de vouloir supprimer cet événement ?</p></div><div class="flex justify-end space-x-3 pt-6"><button type="button" id="cancel-delete" class="px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500">Annuler</button><button type="button" id="confirm-delete" class="px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-red-600 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500">Supprimer</button></div></div></div></div><script>// Local storage key for eventsconst EVENTS_STORAGE_KEY = 'semence_amour_events';// DOM Elementsconst eventsList = document.getElementById('events-list');const addEventBtn = document.getElementById('add-event-btn');const eventModal = document.getElementById('event-modal');const confirmModal = document.getElementById('confirm-modal');const eventForm = document.getElementById('event-form');const closeModalBtn = document.getElementById('close-modal');const closeConfirmModalBtn = document.getElementById('close-confirm-modal');const cancelEventBtn = document.getElementById('cancel-event');const cancelDeleteBtn = document.getElementById('cancel-delete');const confirmDeleteBtn = document.getElementById('confirm-delete');const eventImageInput = document.getElementById('event-image');const imagePreviewContainer = document.getElementById('image-preview-container');const imagePreview = document.getElementById('image-preview');// State variableslet currentEventId = null;let events = [];// Initialize the appfunction init() {loadEvents();renderEvents();setupEventListeners();setupMenuToggle();}// Setup menu toggle functionalityfunction setupMenuToggle() {7 unmodified lines});}// Load events from local storagefunction loadEvents() {const storedEvents = localStorage.getItem(EVENTS_STORAGE_KEY);if (storedEvents) {events = JSON.parse(storedEvents);} else {// Sample data for demoevents = [{id: '1',title: 'Retraite Spirituelle',date: '2023-09-15',time: '09:00',location: 'Centre de retraite',description: 'Un weekend de ressourcement spirituel dans la nature pour approfondir votre relation avec Dieu.',imageUrl: 'https://images.unsplash.com/photo-1506126613408-eca07ce68773?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1399&q=80',status: 'published',createdAt: new Date().toISOString()},{id: '2',title: 'Concert de Louange',date: '2023-09-30',time: '19:30',location: 'Église Semence AMour',description: 'Une soirée spéciale de louange avec des artistes chrétiens locaux et internationaux.',imageUrl: 'https://images.unsplash.com/photo-1529107386315-e1a2ed48a620?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80',status: 'published',createdAt: new Date().toISOString()}];saveEvents();}}// Save events to local storagefunction saveEvents() {localStorage.setItem(EVENTS_STORAGE_KEY, JSON.stringify(events));// In a real app, you would also update the main website hereupdateWebsiteEvents();}// Update the main website events (simulated)function updateWebsiteEvents() {console.log('Mise à jour des événements sur le site principal...');// In a real implementation, this would update your main website}// Render events in the tablefunction renderEvents() {eventsList.innerHTML = '';if (events.length === 0) {eventsList.innerHTML = `<tr><td colspan="5" class="px-6 py-4 text-center text-gray-500">Aucun événement trouvé</td></tr>`;return;}events.sort((a, b) => new Date(a.date) - new Date(b.date)).forEach(event => {const eventDate = new Date(event.date);const formattedDate = eventDate.toLocaleDateString('fr-FR', {weekday: 'long',year: 'numeric',month: 'long',day: 'numeric'});const statusBadge = event.status === 'published' ?'<span class="px-2 py-1 text-xs font-semibold leading-5 text-green-800 bg-green-100 rounded-full">Publié</span>' :'<span class="px-2 py-1 text-xs font-semibold leading-5 text-gray-800 bg-gray-100 rounded-full">Brouillon</span>';const row = document.createElement('tr');row.innerHTML = `<td class="px-6 py-4 whitespace-nowrap"><div class="flex-shrink-0 h-10 w-10"><img class="h-10 w-10 rounded-full object-cover" src="${event.imageUrl || 'https://via.placeholder.com/150'}" alt="${event.title}"></div></td><td class="px-6 py-4 whitespace-nowrap"><div class="text-sm font-medium text-gray-900">${event.title}</div></td><td class="px-6 py-4 whitespace-nowrap"><div class="text-sm text-gray-500">${formattedDate} à ${event.time}</div></td><td class="px-6 py-4 whitespace-nowrap">${statusBadge}</td><td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium"><button data-id="${event.id}" class="edit-event text-green-600 hover:text-green-900 mr-3">Modifier</button><button data-id="${event.id}" class="delete-event text-red-600 hover:text-red-900">Supprimer</button></td>`;eventsList.appendChild(row);});// Add event listeners to the new buttonsdocument.querySelectorAll('.edit-event').forEach(btn => {btn.addEventListener('click', (e) => {const eventId = e.target.getAttribute('data-id');editEvent(eventId);});});document.querySelectorAll('.delete-event').forEach(btn => {btn.addEventListener('click', (e) => {const eventId = e.target.getAttribute('data-id');showDeleteConfirmation(eventId);});});}// Show the event form modalfunction showEventModal(title, isEdit = false) {document.getElementById('modal-title').textContent = title;eventModal.classList.remove('hidden');}// Hide the event form modalfunction hideEventModal() {eventModal.classList.add('hidden');eventForm.reset();imagePreviewContainer.classList.add('hidden');currentEventId = null;}// Show the confirmation modalfunction showConfirmModal(message) {document.getElementById('confirm-message').textContent = message;confirmModal.classList.remove('hidden');}// Hide the confirmation modalfunction hideConfirmModal() {confirmModal.classList.add('hidden');currentEventId = null;}// Add a new eventfunction addNewEvent() {showEventModal('Nouvel Événement', false);}// Edit an existing eventfunction editEvent(eventId) {const event = events.find(e => e.id === eventId);if (!event) return;currentEventId = eventId;showEventModal('Modifier Événement', true);// Fill the form with event datadocument.getElementById('event-id').value = event.id;document.getElementById('event-title').value = event.title;document.getElementById('event-date').value = event.date;document.getElementById('event-time').value = event.time;document.getElementById('event-location').value = event.location;document.getElementById('event-description').value = event.description;document.getElementById('event-status').value = event.status;// Show image preview if availableif (event.imageUrl) {imagePreview.src = event.imageUrl;imagePreviewContainer.classList.remove('hidden');}}// Show delete confirmationfunction showDeleteConfirmation(eventId) {currentEventId = eventId;const event = events.find(e => e.id === eventId);showConfirmModal(`Êtes-vous sûr de vouloir supprimer l'événement "${event.title}" ?`);}// Delete an eventfunction deleteEvent() {events = events.filter(e => e.id !== currentEventId);saveEvents();renderEvents();hideConfirmModal();}// Save event (add or update)function saveEvent(eventData) {if (currentEventId) {// Update existing eventconst index = events.findIndex(e => e.id === currentEventId);if (index !== -1) {events[index] = { ...events[index], ...eventData };}} else {// Add new eventconst newEvent = {id: Date.now().toString(),...eventData,createdAt: new Date().toISOString()};events.unshift(newEvent);}saveEvents();renderEvents();hideEventModal();}// Handle image upload previewfunction handleImageUpload(e) {const file = e.target.files[0];if (file) {const reader = new FileReader();reader.onload = function(event) {imagePreview.src = event.target.result;imagePreviewContainer.classList.remove('hidden');};reader.readAsDataURL(file);}}// Setup event listenersfunction setupEventListeners() {// Add event buttonaddEventBtn.addEventListener('click', addNewEvent);// Close modal buttonscloseModalBtn.addEventListener('click', hideEventModal);closeConfirmModalBtn.addEventListener('click', hideConfirmModal);cancelEventBtn.addEventListener('click', hideEventModal);cancelDeleteBtn.addEventListener('click', hideConfirmModal);// Confirm delete buttonconfirmDeleteBtn.addEventListener('click', deleteEvent);// Image upload previeweventImageInput.addEventListener('change', handleImageUpload);// Form submissioneventForm.addEventListener('submit', (e) => {e.preventDefault();const eventData = {title: document.getElementById('event-title').value,date: document.getElementById('event-date').value,time: document.getElementById('event-time').value,location: document.getElementById('event-location').value,description: document.getElementById('event-description').value,status: document.getElementById('event-status').value};// Handle image upload (in a real app, you would upload to a server)if (eventImageInput.files.length > 0) {// For demo purposes, we'll just use a placeholder// In a real app, you would upload the image and get a URLeventData.imageUrl = 'https://via.placeholder.com/150';}saveEvent(eventData);});}// Initialize the applicationdocument.addEventListener('DOMContentLoaded', init);</script><p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=nestasoft/admin-v3" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body></html>2 unmodified lines345678920 unmodified lines303132333435363718 unmodified lines56575859606162636465666768697071727374759 unmodified lines8586878889909130 unmodified lines1221231241251261271281291301311321331341351361373 unmodified lines1411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933947 unmodified lines4024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935942 unmodified lines<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Admin Membres - Église Semence AMour</title><script src="https://cdn.tailwindcss.com"></script><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"><style>20 unmodified linesbackground-color: var(--secondary);}.member-photo-preview {max-height: 150px;object-fit: cover;}18 unmodified lines.menu-toggle.rotated {transform: rotate(90deg);}.tab-content {display: none;}.tab-content.active {display: block;}.tab-button.active {background-color: var(--accent);color: var(--primary);font-weight: 600;}</style></head><body class="bg-gray-100">9 unmodified lines</div><nav class="mt-4"><a href="#" class="sidebar-link block py-2 px-4"><i class="fas fa-tachometer-alt mr-2"></i> Tableau de bord</a>30 unmodified lines</div></div><a href="#" class="sidebar-link block py-2 px-4"><i class="fas fa-calendar-alt mr-2"></i> Événements</a><a href="#" class="sidebar-link block py-2 px-4 bg-green-700"><i class="fas fa-users mr-2"></i> Membres</a><a href="#" class="sidebar-link block py-2 px-4"><i class="fas fa-file-alt mr-2"></i> Sermons</a><a href="#" class="sidebar-link block py-2 px-4"><i class="fas fa-cog mr-2"></i> Paramètres</a></nav>3 unmodified lines<div class="ml-64 flex-1 p-8"><div class="flex justify-between items-center mb-8"><h1 class="text-2xl font-bold text-gray-800"><i class="fas fa-user-plus mr-2 text-green-700"></i> Ajouter un Membre</h1><div><a href="liste-membres.html" class="px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500"><i class="fas fa-list mr-1"></i> Voir la liste</a></div></div><!-- Member Form --><div class="bg-white rounded-lg shadow overflow-hidden"><div class="border-b border-gray-200"><div class="flex"><button class="tab-button active px-6 py-4 text-sm font-medium" data-tab="info-personnelles">Informations Personnelles</button><button class="tab-button px-6 py-4 text-sm font-medium" data-tab="info-spirituelles">Informations Spirituelles</button><button class="tab-button px-6 py-4 text-sm font-medium" data-tab="info-familiales">Informations Familiales</button></div></div><form id="member-form" class="p-6 space-y-6"><!-- Informations Personnelles Tab --><div id="info-personnelles" class="tab-content active"><div class="grid grid-cols-1 md:grid-cols-3 gap-6"><!-- Photo --><div class="col-span-1"><label class="block text-sm font-medium text-gray-700 mb-2">Photo</label><div class="mt-1 flex items-center"><div class="relative"><img id="photo-preview" class="member-photo-preview w-32 h-32 rounded-full bg-gray-200 object-cover" src="https://via.placeholder.com/150" alt="Photo du membre"><label for="member-photo" class="absolute bottom-0 right-0 bg-white rounded-full p-2 shadow-md cursor-pointer"><i class="fas fa-camera text-green-700"></i><input type="file" id="member-photo" accept="image/*" class="sr-only"></label></div></div></div><!-- Détails Personnels --><div class="col-span-2 space-y-4"><div class="grid grid-cols-1 md:grid-cols-2 gap-4"><div><label for="first-name" class="block text-sm font-medium text-gray-700">Prénom *</label><input type="text" id="first-name" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"></div><div><label for="last-name" class="block text-sm font-medium text-gray-700">Nom *</label><input type="text" id="last-name" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"></div></div><div class="grid grid-cols-1 md:grid-cols-2 gap-4"><div><label for="gender" class="block text-sm font-medium text-gray-700">Genre *</label><select id="gender" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"><option value="">Sélectionner</option><option value="male">Homme</option><option value="female">Femme</option></select></div><div><label for="birth-date" class="block text-sm font-medium text-gray-700">Date de naissance</label><input type="date" id="birth-date" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"></div></div><div class="grid grid-cols-1 md:grid-cols-2 gap-4"><div><label for="phone" class="block text-sm font-medium text-gray-700">Téléphone</label><input type="tel" id="phone" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"></div><div><label for="email" class="block text-sm font-medium text-gray-700">Email</label><input type="email" id="email" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"></div></div></div></div><div class="mt-6 grid grid-cols-1 md:grid-cols-3 gap-4"><div><label for="address" class="block text-sm font-medium text-gray-700">Adresse</label><input type="text" id="address" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"></div><div><label for="city" class="block text-sm font-medium text-gray-700">Ville</label><input type="text" id="city" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"></div><div><label for="postal-code" class="block text-sm font-medium text-gray-700">Code Postal</label><input type="text" id="postal-code" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"></div></div><div class="mt-6"><label for="profession" class="block text-sm font-medium text-gray-700">Profession</label><input type="text" id="profession" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"></div></div><!-- Informations Spirituelles Tab --><div id="info-spirituelles" class="tab-content"><div class="grid grid-cols-1 md:grid-cols-2 gap-6"><div><label for="baptism-date" class="block text-sm font-medium text-gray-700">Date de baptême</label><input type="date" id="baptism-date" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"></div><div><label for="baptism-place" class="block text-sm font-medium text-gray-700">Lieu de baptême</label><input type="text" id="baptism-place" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"></div></div><div class="mt-6 grid grid-cols-1 md:grid-cols-2 gap-6"><div><label for="membership-date" class="block text-sm font-medium text-gray-700">Date d'adhésion</label><input type="date" id="membership-date" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"></div><div><label for="membership-status" class="block text-sm font-medium text-gray-700">Statut d'adhésion</label><select id="membership-status" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"><option value="visitor">Visiteur</option><option value="member">Membre</option><option value="active-member">Membre actif</option><option value="inactive-member">Membre inactif</option></select></div></div><div class="mt-6"><label for="spiritual-gifts" class="block text-sm font-medium text-gray-700">Dons spirituels</label><div class="mt-2 grid grid-cols-2 md:grid-cols-4 gap-2"><div class="flex items-center"><input type="checkbox" id="gift-teaching" class="h-4 w-4 text-green-600 focus:ring-green-500 border-gray-300 rounded"><label for="gift-teaching" class="ml-2 block text-sm text-gray-700">Enseignement</label></div><div class="flex items-center"><input type="checkbox" id="gift-prophecy" class="h-4 w-4 text-green-600 focus:ring-green-500 border-gray-300 rounded"><label for="gift-prophecy" class="ml-2 block text-sm text-gray-700">Prophétie</label></div><div class="flex items-center"><input type="checkbox" id="gift-healing" class="h-4 w-4 text-green-600 focus:ring-green-500 border-gray-300 rounded"><label for="gift-healing" class="ml-2 block text-sm text-gray-700">Guérison</label></div><div class="flex items-center"><input type="checkbox" id="gift-miracles" class="h-4 w-4 text-green-600 focus:ring-green-500 border-gray-300 rounded"><label for="gift-miracles" class="ml-2 block text-sm text-gray-700">Miracles</label></div><div class="flex items-center"><input type="checkbox" id="gift-helping" class="h-4 w-4 text-green-600 focus:ring-green-500 border-gray-300 rounded"><label for="gift-helping" class="ml-2 block text-sm text-gray-700">Service</label></div><div class="flex items-center"><input type="checkbox" id="gift-leadership" class="h-4 w-4 text-green-600 focus:ring-green-500 border-gray-300 rounded"><label for="gift-leadership" class="ml-2 block text-sm text-gray-700">Leadership</label></div><div class="flex items-center"><input type="checkbox" id="gift-mercy" class="h-4 w-4 text-green-600 focus:ring-green-500 border-gray-300 rounded"><label for="gift-mercy" class="ml-2 block text-sm text-gray-700">Miséricorde</label></div><div class="flex items-center"><input type="checkbox" id="gift-giving" class="h-4 w-4 text-green-600 focus:ring-green-500 border-gray-300 rounded"><label for="gift-giving" class="ml-2 block text-sm text-gray-700">Générosité</label></div></div></div><div class="mt-6"><label for="ministries" class="block text-sm font-medium text-gray-700">Ministères impliqués</label><select id="ministries" multiple class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"><option value="worship">Louange</option><option value="prayer">Intercession</option><option value="evangelism">Évangélisation</option><option value="teaching">Enseignement</option><option value="youth">Jeunesse</option><option value="children">Enfants</option><option value="social">Action sociale</option><option value="media">Médias</option></select></div><div class="mt-6"><label for="spiritual-notes" class="block text-sm font-medium text-gray-700">Notes spirituelles</label><textarea id="spiritual-notes" rows="3" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"></textarea></div></div><!-- Informations Familiales Tab --><div id="info-familiales" class="tab-content"><div class="grid grid-cols-1 md:grid-cols-2 gap-6"><div><label for="marital-status" class="block text-sm font-medium text-gray-700">Situation familiale</label><select id="marital-status" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"><option value="single">Célibataire</option><option value="married">Marié(e)</option><option value="divorced">Divorcé(e)</option><option value="widowed">Veuf/Veuve</option><option value="separated">Séparé(e)</option></select></div><div id="spouse-container" class="hidden"><label for="spouse-name" class="block text-sm font-medium text-gray-700">Nom du conjoint</label><input type="text" id="spouse-name" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"></div></div><div class="mt-6"><label class="block text-sm font-medium text-gray-700">Enfants</label><div id="children-container" class="mt-2 space-y-4"><!-- Children will be added here dynamically --></div><button type="button" id="add-child-btn" class="mt-2 inline-flex items-center px-3 py-1 border border-gray-300 shadow-sm text-sm leading-4 font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500"><i class="fas fa-plus mr-1"></i> Ajouter un enfant</button></div><div class="mt-6"><label for="family-notes" class="block text-sm font-medium text-gray-700">Notes familiales</label><textarea id="family-notes" rows="3" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"></textarea></div></div><div class="pt-6 border-t border-gray-200 flex justify-end space-x-3"><button type="button" id="cancel-member" class="px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500">Annuler</button><button type="submit" id="save-member" class="btn-primary px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-green-700 hover:bg-green-800 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500">Enregistrer le membre</button></div></form></div></div></div><script>// Initialize the appdocument.addEventListener('DOMContentLoaded', function() {setupMenuToggle();setupTabs();setupForm();setupPhotoUpload();});// Setup menu toggle functionalityfunction setupMenuToggle() {7 unmodified lines});}// Setup tab functionalityfunction setupTabs() {const tabButtons = document.querySelectorAll('.tab-button');const tabContents = document.querySelectorAll('.tab-content');tabButtons.forEach(button => {button.addEventListener('click', () => {// Remove active class from all buttons and contentstabButtons.forEach(btn => btn.classList.remove('active'));tabContents.forEach(content => content.classList.remove('active'));// Add active class to clicked button and corresponding contentbutton.classList.add('active');const tabId = button.getAttribute('data-tab');document.getElementById(tabId).classList.add('active');});});}// Setup form functionalityfunction setupForm() {const maritalStatus = document.getElementById('marital-status');const spouseContainer = document.getElementById('spouse-container');// Show/hide spouse field based on marital statusmaritalStatus.addEventListener('change', function() {if (this.value === 'married') {spouseContainer.classList.remove('hidden');} else {spouseContainer.classList.add('hidden');}});// Add child functionalityconst addChildBtn = document.getElementById('add-child-btn');const childrenContainer = document.getElementById('children-container');let childCount = 0;addChildBtn.addEventListener('click', function() {childCount++;const childDiv = document.createElement('div');childDiv.className = 'grid grid-cols-1 md:grid-cols-3 gap-4 items-end';childDiv.innerHTML = `<div><label for="child-name-${childCount}" class="block text-sm font-medium text-gray-700">Nom complet</label><input type="text" id="child-name-${childCount}" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"></div><div><label for="child-gender-${childCount}" class="block text-sm font-medium text-gray-700">Genre</label><select id="child-gender-${childCount}" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"><option value="male">Garçon</option><option value="female">Fille</option></select></div><div class="flex items-end space-x-2"><div class="flex-1"><label for="child-birthdate-${childCount}" class="block text-sm font-medium text-gray-700">Date de naissance</label><input type="date" id="child-birthdate-${childCount}" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"></div><button type="button" class="delete-child mb-1 px-2 py-1 text-red-600 hover:text-red-800"><i class="fas fa-times"></i></button></div>`;childrenContainer.appendChild(childDiv);// Add event listener to delete buttonconst deleteBtn = childDiv.querySelector('.delete-child');deleteBtn.addEventListener('click', function() {childrenContainer.removeChild(childDiv);});});// Form submissionconst memberForm = document.getElementById('member-form');memberForm.addEventListener('submit', function(e) {e.preventDefault();// Gather form dataconst memberData = {personalInfo: {firstName: document.getElementById('first-name').value,lastName: document.getElementById('last-name').value,gender: document.getElementById('gender').value,birthDate: document.getElementById('birth-date').value,phone: document.getElementById('phone').value,email: document.getElementById('email').value,address: document.getElementById('address').value,city: document.getElementById('city').value,postalCode: document.getElementById('postal-code').value,profession: document.getElementById('profession').value,photo: document.getElementById('photo-preview').src},spiritualInfo: {baptismDate: document.getElementById('baptism-date').value,baptismPlace: document.getElementById('baptism-place').value,membershipDate: document.getElementById('membership-date').value,membershipStatus: document.getElementById('membership-status').value,spiritualGifts: getSelectedGifts(),ministries: getSelectedMinistries(),spiritualNotes: document.getElementById('spiritual-notes').value},familyInfo: {maritalStatus: document.getElementById('marital-status').value,spouseName: document.getElementById('marital-status').value === 'married' ? document.getElementById('spouse-name').value : '',children: getChildrenData(),familyNotes: document.getElementById('family-notes').value}};// In a real app, you would save to a database hereconsole.log('Member data to be saved:', memberData);// Show success messagealert('Membre enregistré avec succès!');// Reset formmemberForm.reset();document.getElementById('photo-preview').src = 'https://via.placeholder.com/150';childrenContainer.innerHTML = '';childCount = 0;});// Cancel buttondocument.getElementById('cancel-member').addEventListener('click', function() {if (confirm('Voulez-vous vraiment annuler ? Toutes les modifications seront perdues.')) {memberForm.reset();document.getElementById('photo-preview').src = 'https://via.placeholder.com/150';childrenContainer.innerHTML = '';childCount = 0;}});}// Get selected spiritual giftsfunction getSelectedGifts() {const gifts = [];if (document.getElementById('gift-teaching').checked) gifts.push('teaching');if (document.getElementById('gift-prophecy').checked) gifts.push('prophecy');if (document.getElementById('gift-healing').checked) gifts.push('healing');if (document.getElementById('gift-miracles').checked) gifts.push('miracles');if (document.getElementById('gift-helping').checked) gifts.push('helping');if (document.getElementById('gift-leadership').checked) gifts.push('leadership');if (document.getElementById('gift-mercy').checked) gifts.push('mercy');if (document.getElementById('gift-giving').checked) gifts.push('giving');return gifts;}// Get selected ministriesfunction getSelectedMinistries() {const select = document.getElementById('ministries');const selectedOptions = Array.from(select.selectedOptions).map(option => option.value);return selectedOptions;}// Get children datafunction getChildrenData() {const children = [];const childDivs = document.querySelectorAll('#children-container > div');childDivs.forEach((div, index) => {children.push({name: document.getElementById(`child-name-${index+1}`).value,gender: document.getElementById(`child-gender-${index+1}`).value,birthDate: document.getElementById(`child-birthdate-${index+1}`).value});});return children;}// Setup photo upload functionalityfunction setupPhotoUpload() {const photoInput = document.getElementById('member-photo');const photoPreview = document.getElementById('photo-preview');photoInput.addEventListener('change', function(e) {const file = e.target.files[0];if (file) {const reader = new FileReader();reader.onload = function(event) {photoPreview.src = event.target.result;};reader.readAsDataURL(file);}});}</script><p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=nestasoft/admin-v3" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body></html>
1créer la page d'ajout de membre
index.html+404-374
prompts.txt+1