Spaces:
Running
Running
un oncle m'a demandé de developper une application mobile pour donner des cours d'anglais. Trois profils possibles (Professeur, etudiant et administrateur). Un professeur ouvre une session de cours (audio uniquement) et un etudiant peux participer au cours. - Initial Deployment
7e1eaaf
verified
| <html lang="fr"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>English Audio Classroom</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> | |
| /* Custom styles for audio player */ | |
| .audio-player { | |
| background: linear-gradient(135deg, #4f46e5, #7c3aed); | |
| } | |
| .waveform { | |
| height: 60px; | |
| background-color: rgba(255, 255, 255, 0.2); | |
| border-radius: 30px; | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .wave { | |
| position: absolute; | |
| height: 100%; | |
| width: 4px; | |
| background-color: white; | |
| border-radius: 2px; | |
| animation: wave 1.5s infinite ease-in-out; | |
| } | |
| @keyframes wave { | |
| 0%, 100% { transform: scaleY(0.5); } | |
| 50% { transform: scaleY(1.5); } | |
| } | |
| /* Custom scrollbar */ | |
| .custom-scrollbar::-webkit-scrollbar { | |
| width: 6px; | |
| } | |
| .custom-scrollbar::-webkit-scrollbar-track { | |
| background: #f1f1f1; | |
| } | |
| .custom-scrollbar::-webkit-scrollbar-thumb { | |
| background: #888; | |
| border-radius: 3px; | |
| } | |
| .custom-scrollbar::-webkit-scrollbar-thumb:hover { | |
| background: #555; | |
| } | |
| /* Animation for new message */ | |
| @keyframes slideIn { | |
| from { transform: translateX(20px); opacity: 0; } | |
| to { transform: translateX(0); opacity: 1; } | |
| } | |
| .new-message { | |
| animation: slideIn 0.3s ease-out; | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-100 font-sans"> | |
| <!-- Auth Screen --> | |
| <div id="auth-screen" class="min-h-screen flex flex-col items-center justify-center p-4"> | |
| <div class="bg-white rounded-2xl shadow-xl p-8 w-full max-w-md"> | |
| <div class="text-center mb-8"> | |
| <h1 class="text-3xl font-bold text-indigo-700">English Audio Classroom</h1> | |
| <p class="text-gray-600 mt-2">Apprenez l'anglais en ligne avec des professeurs qualifiés</p> | |
| </div> | |
| <div class="space-y-4"> | |
| <button onclick="loginAs('teacher')" class="w-full flex items-center justify-center space-x-3 bg-indigo-600 hover:bg-indigo-700 text-white py-3 px-4 rounded-lg transition"> | |
| <i class="fas fa-chalkboard-teacher text-xl"></i> | |
| <span>Je suis Professeur</span> | |
| </button> | |
| <button onclick="loginAs('student')" class="w-full flex items-center justify-center space-x-3 bg-purple-600 hover:bg-purple-700 text-white py-3 px-4 rounded-lg transition"> | |
| <i class="fas fa-user-graduate text-xl"></i> | |
| <span>Je suis Étudiant</span> | |
| </button> | |
| <button onclick="loginAs('admin')" class="w-full flex items-center justify-center space-x-3 bg-gray-600 hover:bg-gray-700 text-white py-3 px-4 rounded-lg transition"> | |
| <i class="fas fa-user-shield text-xl"></i> | |
| <span>Je suis Administrateur</span> | |
| </button> | |
| </div> | |
| <div class="mt-6 text-center text-sm text-gray-500"> | |
| En vous connectant, vous acceptez nos conditions d'utilisation | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Teacher Dashboard --> | |
| <div id="teacher-dashboard" class="hidden min-h-screen bg-gray-50"> | |
| <header class="bg-indigo-700 text-white p-4 shadow-md"> | |
| <div class="flex justify-between items-center"> | |
| <div class="flex items-center space-x-3"> | |
| <button onclick="backToAuth()" class="p-2 rounded-full hover:bg-indigo-600"> | |
| <i class="fas fa-arrow-left"></i> | |
| </button> | |
| <h1 class="text-xl font-bold">Tableau de bord Professeur</h1> | |
| </div> | |
| <div class="flex items-center space-x-2"> | |
| <span class="text-sm">Prof. Dupont</span> | |
| <div class="w-8 h-8 rounded-full bg-indigo-500 flex items-center justify-center"> | |
| <i class="fas fa-user"></i> | |
| </div> | |
| </div> | |
| </div> | |
| </header> | |
| <main class="p-4"> | |
| <div class="mb-6"> | |
| <h2 class="text-lg font-semibold text-gray-800 mb-2">Cours programmés</h2> | |
| <div class="bg-white rounded-xl shadow p-4"> | |
| <div class="flex justify-between items-center mb-3"> | |
| <div> | |
| <h3 class="font-medium">Anglais débutant</h3> | |
| <p class="text-sm text-gray-500">Aujourd'hui, 14h00 - 15h30</p> | |
| </div> | |
| <button class="bg-indigo-100 text-indigo-700 px-3 py-1 rounded-full text-sm font-medium"> | |
| 12 étudiants | |
| </button> | |
| </div> | |
| <div class="flex space-x-2"> | |
| <button onclick="startClass()" class="flex-1 bg-indigo-600 hover:bg-indigo-700 text-white py-2 px-4 rounded-lg transition flex items-center justify-center space-x-2"> | |
| <i class="fas fa-play"></i> | |
| <span>Commencer le cours</span> | |
| </button> | |
| <button class="bg-white border border-gray-300 hover:bg-gray-50 text-gray-700 py-2 px-4 rounded-lg transition"> | |
| <i class="fas fa-edit"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="mb-6"> | |
| <h2 class="text-lg font-semibold text-gray-800 mb-2">Historique des cours</h2> | |
| <div class="space-y-3"> | |
| <div class="bg-white rounded-xl shadow p-4"> | |
| <div class="flex justify-between items-center"> | |
| <div> | |
| <h3 class="font-medium">Conversation avancée</h3> | |
| <p class="text-sm text-gray-500">Hier, 10h00 - 11h30</p> | |
| </div> | |
| <button class="text-indigo-600 hover:text-indigo-800"> | |
| <i class="fas fa-chart-bar"></i> | |
| </button> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-xl shadow p-4"> | |
| <div class="flex justify-between items-center"> | |
| <div> | |
| <h3 class="font-medium">Grammaire intermédiaire</h3> | |
| <p class="text-sm text-gray-500">Lundi, 16h00 - 17h30</p> | |
| </div> | |
| <button class="text-indigo-600 hover:text-indigo-800"> | |
| <i class="fas fa-chart-bar"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <button class="w-full bg-white border-2 border-dashed border-gray-300 hover:border-indigo-400 text-gray-500 hover:text-indigo-600 py-6 rounded-xl transition flex flex-col items-center justify-center"> | |
| <i class="fas fa-plus-circle text-2xl mb-2"></i> | |
| <span>Programmer un nouveau cours</span> | |
| </button> | |
| </main> | |
| <nav class="fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200 flex justify-around p-2"> | |
| <a href="#" class="p-3 text-indigo-600"> | |
| <i class="fas fa-home text-xl"></i> | |
| </a> | |
| <a href="#" class="p-3 text-gray-500 hover:text-indigo-600"> | |
| <i class="fas fa-calendar-alt text-xl"></i> | |
| </a> | |
| <a href="#" class="p-3 text-gray-500 hover:text-indigo-600"> | |
| <i class="fas fa-users text-xl"></i> | |
| </a> | |
| <a href="#" class="p-3 text-gray-500 hover:text-indigo-600"> | |
| <i class="fas fa-cog text-xl"></i> | |
| </a> | |
| </nav> | |
| </div> | |
| <!-- Student Dashboard --> | |
| <div id="student-dashboard" class="hidden min-h-screen bg-gray-50"> | |
| <header class="bg-purple-700 text-white p-4 shadow-md"> | |
| <div class="flex justify-between items-center"> | |
| <div class="flex items-center space-x-3"> | |
| <button onclick="backToAuth()" class="p-2 rounded-full hover:bg-purple-600"> | |
| <i class="fas fa-arrow-left"></i> | |
| </button> | |
| <h1 class="text-xl font-bold">Tableau de bord Étudiant</h1> | |
| </div> | |
| <div class="flex items-center space-x-2"> | |
| <span class="text-sm">Marie Lambert</span> | |
| <div class="w-8 h-8 rounded-full bg-purple-500 flex items-center justify-center"> | |
| <i class="fas fa-user"></i> | |
| </div> | |
| </div> | |
| </div> | |
| </header> | |
| <main class="p-4 pb-20"> | |
| <div class="mb-6"> | |
| <h2 class="text-lg font-semibold text-gray-800 mb-2">Cours disponibles</h2> | |
| <div class="grid grid-cols-1 gap-4"> | |
| <div class="bg-white rounded-xl shadow overflow-hidden"> | |
| <div class="p-4"> | |
| <div class="flex justify-between items-start"> | |
| <div> | |
| <h3 class="font-medium">Anglais débutant</h3> | |
| <p class="text-sm text-gray-500">Prof. Dupont</p> | |
| </div> | |
| <span class="bg-purple-100 text-purple-800 text-xs px-2 py-1 rounded-full">En cours</span> | |
| </div> | |
| <p class="text-sm text-gray-600 mt-2">Session de conversation pour débutants. Thème: Se présenter.</p> | |
| </div> | |
| <div class="bg-gray-50 px-4 py-3 flex justify-end space-x-2"> | |
| <button onclick="joinClass()" class="bg-purple-600 hover:bg-purple-700 text-white py-2 px-4 rounded-lg transition"> | |
| Rejoindre le cours | |
| </button> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-xl shadow overflow-hidden"> | |
| <div class="p-4"> | |
| <div class="flex justify-between items-start"> | |
| <div> | |
| <h3 class="font-medium">Grammaire avancée</h3> | |
| <p class="text-sm text-gray-500">Prof. Martin</p> | |
| </div> | |
| <span class="bg-yellow-100 text-yellow-800 text-xs px-2 py-1 rounded-full">À venir</span> | |
| </div> | |
| <p class="text-sm text-gray-600 mt-2">Les temps verbaux complexes et leur utilisation.</p> | |
| </div> | |
| <div class="bg-gray-50 px-4 py-3 flex justify-end space-x-2"> | |
| <button class="bg-gray-200 hover:bg-gray-300 text-gray-700 py-2 px-4 rounded-lg transition"> | |
| S'inscrire | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="mb-6"> | |
| <h2 class="text-lg font-semibold text-gray-800 mb-2">Mes cours</h2> | |
| <div class="space-y-3"> | |
| <div class="bg-white rounded-xl shadow p-4"> | |
| <div class="flex justify-between items-center"> | |
| <div> | |
| <h3 class="font-medium">Anglais intermédiaire</h3> | |
| <p class="text-sm text-gray-500">Tous les mercredis, 18h-19h30</p> | |
| </div> | |
| <button class="text-purple-600 hover:text-purple-800"> | |
| <i class="fas fa-chevron-right"></i> | |
| </button> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-xl shadow p-4"> | |
| <div class="flex justify-between items-center"> | |
| <div> | |
| <h3 class="font-medium">Préparation TOEFL</h3> | |
| <p class="text-sm text-gray-500">Tous les samedis, 10h-12h</p> | |
| </div> | |
| <button class="text-purple-600 hover:text-purple-800"> | |
| <i class="fas fa-chevron-right"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </main> | |
| <nav class="fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200 flex justify-around p-2"> | |
| <a href="#" class="p-3 text-purple-600"> | |
| <i class="fas fa-home text-xl"></i> | |
| </a> | |
| <a href="#" class="p-3 text-gray-500 hover:text-purple-600"> | |
| <i class="fas fa-book text-xl"></i> | |
| </a> | |
| <a href="#" class="p-3 text-gray-500 hover:text-purple-600"> | |
| <i class="fas fa-chart-line text-xl"></i> | |
| </a> | |
| <a href="#" class="p-3 text-gray-500 hover:text-purple-600"> | |
| <i class="fas fa-cog text-xl"></i> | |
| </a> | |
| </nav> | |
| </div> | |
| <!-- Admin Dashboard --> | |
| <div id="admin-dashboard" class="hidden min-h-screen bg-gray-50"> | |
| <header class="bg-gray-800 text-white p-4 shadow-md"> | |
| <div class="flex justify-between items-center"> | |
| <div class="flex items-center space-x-3"> | |
| <button onclick="backToAuth()" class="p-2 rounded-full hover:bg-gray-700"> | |
| <i class="fas fa-arrow-left"></i> | |
| </button> | |
| <h1 class="text-xl font-bold">Tableau de bord Admin</h1> | |
| </div> | |
| <div class="flex items-center space-x-2"> | |
| <span class="text-sm">Admin</span> | |
| <div class="w-8 h-8 rounded-full bg-gray-600 flex items-center justify-center"> | |
| <i class="fas fa-user-shield"></i> | |
| </div> | |
| </div> | |
| </div> | |
| </header> | |
| <main class="p-4 pb-20"> | |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> | |
| <div class="bg-white rounded-xl shadow p-4"> | |
| <div class="flex items-center justify-between mb-3"> | |
| <h2 class="font-semibold text-gray-800">Statistiques</h2> | |
| <i class="fas fa-chart-pie text-gray-400"></i> | |
| </div> | |
| <div class="space-y-3"> | |
| <div> | |
| <p class="text-sm text-gray-500">Cours ce mois</p> | |
| <p class="text-xl font-bold">42</p> | |
| </div> | |
| <div> | |
| <p class="text-sm text-gray-500">Étudiants actifs</p> | |
| <p class="text-xl font-bold">156</p> | |
| </div> | |
| <div> | |
| <p class="text-sm text-gray-500">Professeurs</p> | |
| <p class="text-xl font-bold">8</p> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-xl shadow p-4"> | |
| <div class="flex items-center justify-between mb-3"> | |
| <h2 class="font-semibold text-gray-800">Actions rapides</h2> | |
| <i class="fas fa-bolt text-gray-400"></i> | |
| </div> | |
| <div class="grid grid-cols-2 gap-2"> | |
| <button class="bg-blue-50 hover:bg-blue-100 text-blue-600 p-3 rounded-lg flex flex-col items-center"> | |
| <i class="fas fa-user-plus mb-1"></i> | |
| <span class="text-xs">Ajouter prof</span> | |
| </button> | |
| <button class="bg-green-50 hover:bg-green-100 text-green-600 p-3 rounded-lg flex flex-col items-center"> | |
| <i class="fas fa-user-graduate mb-1"></i> | |
| <span class="text-xs">Ajouter étudiant</span> | |
| </button> | |
| <button class="bg-purple-50 hover:bg-purple-100 text-purple-600 p-3 rounded-lg flex flex-col items-center"> | |
| <i class="fas fa-calendar-plus mb-1"></i> | |
| <span class="text-xs">Créer cours</span> | |
| </button> | |
| <button class="bg-red-50 hover:bg-red-100 text-red-600 p-3 rounded-lg flex flex-col items-center"> | |
| <i class="fas fa-file-export mb-1"></i> | |
| <span class="text-xs">Exporter données</span> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="mb-6"> | |
| <h2 class="text-lg font-semibold text-gray-800 mb-2">Dernières activités</h2> | |
| <div class="bg-white rounded-xl shadow overflow-hidden"> | |
| <div class="overflow-y-auto max-h-64 custom-scrollbar"> | |
| <div class="divide-y divide-gray-200"> | |
| <div class="p-4"> | |
| <div class="flex items-start space-x-3"> | |
| <div class="bg-blue-100 text-blue-600 p-2 rounded-full"> | |
| <i class="fas fa-user-plus"></i> | |
| </div> | |
| <div> | |
| <p class="text-sm font-medium">Nouveau professeur ajouté</p> | |
| <p class="text-xs text-gray-500">Prof. Leclerc a rejoint la plateforme</p> | |
| <p class="text-xs text-gray-400 mt-1">Il y a 2 heures</p> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="p-4"> | |
| <div class="flex items-start space-x-3"> | |
| <div class="bg-green-100 text-green-600 p-2 rounded-full"> | |
| <i class="fas fa-chalkboard-teacher"></i> | |
| </div> | |
| <div> | |
| <p class="text-sm font-medium">Cours terminé</p> | |
| <p class="text-xs text-gray-500">Anglais débutant par Prof. Dupont</p> | |
| <p class="text-xs text-gray-400 mt-1">Il y a 5 heures</p> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="p-4"> | |
| <div class="flex items-start space-x-3"> | |
| <div class="bg-purple-100 text-purple-600 p-2 rounded-full"> | |
| <i class="fas fa-user-graduate"></i> | |
| </div> | |
| <div> | |
| <p class="text-sm font-medium">Nouvel étudiant</p> | |
| <p class="text-xs text-gray-500">Sophie Martin s'est inscrite</p> | |
| <p class="text-xs text-gray-400 mt-1">Hier, 18:30</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </main> | |
| <nav class="fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200 flex justify-around p-2"> | |
| <a href="#" class="p-3 text-gray-800"> | |
| <i class="fas fa-tachometer-alt text-xl"></i> | |
| </a> | |
| <a href="#" class="p-3 text-gray-500 hover:text-gray-800"> | |
| <i class="fas fa-users text-xl"></i> | |
| </a> | |
| <a href="#" class="p-3 text-gray-500 hover:text-gray-800"> | |
| <i class="fas fa-calendar-alt text-xl"></i> | |
| </a> | |
| <a href="#" class="p-3 text-gray-500 hover:text-gray-800"> | |
| <i class="fas fa-cog text-xl"></i> | |
| </a> | |
| </nav> | |
| </div> | |
| <!-- Classroom Screen --> | |
| <div id="classroom-screen" class="hidden min-h-screen bg-gray-900 text-white"> | |
| <header class="bg-gray-800 p-4 shadow-md"> | |
| <div class="flex justify-between items-center"> | |
| <button onclick="backToDashboard()" class="p-2 rounded-full hover:bg-gray-700"> | |
| <i class="fas fa-arrow-left"></i> | |
| </button> | |
| <h1 class="text-xl font-bold">Anglais débutant</h1> | |
| <div class="w-8 h-8 rounded-full bg-indigo-600 flex items-center justify-center"> | |
| <i class="fas fa-chalkboard-teacher"></i> | |
| </div> | |
| </div> | |
| <div class="mt-2 flex justify-between items-center text-sm"> | |
| <span>Prof. Dupont</span> | |
| <span class="bg-green-500 text-white px-2 py-1 rounded-full flex items-center"> | |
| <span class="w-2 h-2 bg-white rounded-full mr-1 animate-pulse"></span> | |
| En direct | |
| </span> | |
| </div> | |
| </header> | |
| <main class="p-4 pb-24"> | |
| <div class="mb-6 bg-gray-800 rounded-xl p-4"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <h2 class="font-medium">Participants (12)</h2> | |
| <button class="text-gray-400 hover:text-white"> | |
| <i class="fas fa-ellipsis-h"></i> | |
| </button> | |
| </div> | |
| <div class="grid grid-cols-3 gap-3"> | |
| <div class="bg-gray-700 rounded-lg p-3 flex flex-col items-center"> | |
| <div class="w-12 h-12 rounded-full bg-purple-500 flex items-center justify-center mb-2"> | |
| <i class="fas fa-user"></i> | |
| </div> | |
| <span class="text-sm truncate w-full text-center">Marie L.</span> | |
| <div class="w-3 h-3 rounded-full bg-green-500 mt-1"></div> | |
| </div> | |
| <div class="bg-gray-700 rounded-lg p-3 flex flex-col items-center"> | |
| <div class="w-12 h-12 rounded-full bg-blue-500 flex items-center justify-center mb-2"> | |
| <i class="fas fa-user"></i> | |
| </div> | |
| <span class="text-sm truncate w-full text-center">Jean D.</span> | |
| <div class="w-3 h-3 rounded-full bg-green-500 mt-1"></div> | |
| </div> | |
| <div class="bg-gray-700 rounded-lg p-3 flex flex-col items-center"> | |
| <div class="w-12 h-12 rounded-full bg-green-500 flex items-center justify-center mb-2"> | |
| <i class="fas fa-user"></i> | |
| </div> | |
| <span class="text-sm truncate w-full text-center">Sophie M.</span> | |
| <div class="w-3 h-3 rounded-full bg-green-500 mt-1"></div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="mb-6"> | |
| <h2 class="font-medium mb-2">Chat du cours</h2> | |
| <div class="bg-gray-800 rounded-xl p-4 h-48 overflow-y-auto custom-scrollbar" id="chat-messages"> | |
| <div class="space-y-3"> | |
| <div class="flex items-start space-x-2"> | |
| <div class="w-8 h-8 rounded-full bg-indigo-600 flex items-center justify-center flex-shrink-0"> | |
| <i class="fas fa-chalkboard-teacher text-sm"></i> | |
| </div> | |
| <div class="bg-gray-700 rounded-lg p-3 max-w-xs"> | |
| <p class="text-sm">Bienvenue à tous dans ce cours d'anglais pour débutants!</p> | |
| </div> | |
| </div> | |
| <div class="flex items-start space-x-2"> | |
| <div class="w-8 h-8 rounded-full bg-purple-500 flex items-center justify-center flex-shrink-0"> | |
| <i class="fas fa-user text-sm"></i> | |
| </div> | |
| <div class="bg-gray-700 rounded-lg p-3 max-w-xs"> | |
| <p class="text-sm">Bonjour professeur!</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="audio-player rounded-xl p-4 mb-4"> | |
| <div class="flex items-center justify-between mb-4"> | |
| <h3 class="font-medium">Audio en direct</h3> | |
| <div class="flex items-center space-x-2"> | |
| <button class="w-8 h-8 rounded-full bg-white bg-opacity-20 hover:bg-opacity-30 flex items-center justify-center"> | |
| <i class="fas fa-volume-up"></i> | |
| </button> | |
| <button class="w-8 h-8 rounded-full bg-white bg-opacity-20 hover:bg-opacity-30 flex items-center justify-center"> | |
| <i class="fas fa-headphones"></i> | |
| </button> | |
| </div> | |
| </div> | |
| <div class="waveform mb-3"> | |
| <div class="wave" style="left: 10%;"></div> | |
| <div class="wave" style="left: 20%;"></div> | |
| <div class="wave" style="left: 30%;"></div> | |
| <div class="wave" style="left: 40%;"></div> | |
| <div class="wave" style="left: 50%;"></div> | |
| <div class="wave" style="left: 60%;"></div> | |
| <div class="wave" style="left: 70%;"></div> | |
| <div class="wave" style="left: 80%;"></div> | |
| <div class="wave" style="left: 90%;"></div> | |
| </div> | |
| <div class="flex justify-between text-xs text-white text-opacity-70"> | |
| <span>00:45</span> | |
| <span>30:00</span> | |
| </div> | |
| </div> | |
| </main> | |
| <footer class="fixed bottom-0 left-0 right-0 bg-gray-800 p-4 border-t border-gray-700"> | |
| <div class="flex items-center space-x-2"> | |
| <input type="text" placeholder="Écrire un message..." class="flex-1 bg-gray-700 border border-gray-600 rounded-full py-2 px-4 focus:outline-none focus:ring-2 focus:ring-indigo-500"> | |
| <button class="w-10 h-10 rounded-full bg-indigo-600 hover:bg-indigo-700 flex items-center justify-center"> | |
| <i class="fas fa-paper-plane"></i> | |
| </button> | |
| <button id="mic-button" class="w-10 h-10 rounded-full bg-red-600 hover:bg-red-700 flex items-center justify-center"> | |
| <i class="fas fa-microphone"></i> | |
| </button> | |
| </div> | |
| </footer> | |
| </div> | |
| <script> | |
| // Navigation functions | |
| function loginAs(role) { | |
| document.getElementById('auth-screen').classList.add('hidden'); | |
| if (role === 'teacher') { | |
| document.getElementById('teacher-dashboard').classList.remove('hidden'); | |
| } else if (role === 'student') { | |
| document.getElementById('student-dashboard').classList.remove('hidden'); | |
| } else if (role === 'admin') { | |
| document.getElementById('admin-dashboard').classList.remove('hidden'); | |
| } | |
| } | |
| function backToAuth() { | |
| document.getElementById('teacher-dashboard').classList.add('hidden'); | |
| document.getElementById('student-dashboard').classList.add('hidden'); | |
| document.getElementById('admin-dashboard').classList.add('hidden'); | |
| document.getElementById('classroom-screen').classList.add('hidden'); | |
| document.getElementById('auth-screen').classList.remove('hidden'); | |
| } | |
| function startClass() { | |
| document.getElementById('teacher-dashboard').classList.add('hidden'); | |
| document.getElementById('classroom-screen').classList.remove('hidden'); | |
| // Change header for teacher | |
| const header = document.querySelector('#classroom-screen header'); | |
| header.className = 'bg-indigo-800 p-4 shadow-md'; | |
| // Change mic button behavior for teacher | |
| const micButton = document.getElementById('mic-button'); | |
| micButton.innerHTML = '<i class="fas fa-microphone-slash"></i>'; | |
| micButton.classList.remove('bg-red-600', 'hover:bg-red-700'); | |
| micButton.classList.add('bg-green-600', 'hover:bg-green-700'); | |
| } | |
| function joinClass() { | |
| document.getElementById('student-dashboard').classList.add('hidden'); | |
| document.getElementById('classroom-screen').classList.remove('hidden'); | |
| } | |
| function backToDashboard() { | |
| document.getElementById('classroom-screen').classList.add('hidden'); | |
| // Determine which dashboard to show based on user role | |
| if (document.querySelector('#classroom-screen header').classList.contains('bg-indigo-800')) { | |
| document.getElementById('teacher-dashboard').classList.remove('hidden'); | |
| } else { | |
| document.getElementById('student-dashboard').classList.remove('hidden'); | |
| } | |
| } | |
| // Toggle mic button | |
| document.getElementById('mic-button').addEventListener('click', function() { | |
| const icon = this.querySelector('i'); | |
| if (icon.classList.contains('fa-microphone')) { | |
| icon.className = 'fas fa-microphone-slash'; | |
| this.classList.remove('bg-red-600', 'hover:bg-red-700'); | |
| this.classList.add('bg-gray-600', 'hover:bg-gray-700'); | |
| } else { | |
| icon.className = 'fas fa-microphone'; | |
| this.classList.remove('bg-gray-600', 'hover:bg-gray-700'); | |
| this.classList.add('bg-red-600', 'hover:bg-red-700'); | |
| } | |
| }); | |
| // Simulate incoming messages | |
| setInterval(() => { | |
| if (!document.getElementById('classroom-screen').classList.contains('hidden')) { | |
| const messages = [ | |
| "Est-ce que quelqu'un a des questions?", | |
| "Je ne comprends pas cette partie...", | |
| "Très bien! Continuez comme ça!", | |
| "Comment dit-on 'merci' en anglais?", | |
| "C'est 'thank you'" | |
| ]; | |
| const randomMessage = messages[Math.floor(Math.random() * messages.length)]; | |
| const isTeacher = Math.random() > 0.5; | |
| const messageDiv = document.createElement('div'); | |
| messageDiv.className = 'flex items-start space-x-2 new-message'; | |
| const avatarDiv = document.createElement('div'); | |
| avatarDiv.className = 'w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0'; | |
| avatarDiv.innerHTML = isTeacher ? | |
| '<i class="fas fa-chalkboard-teacher text-sm"></i>' : | |
| '<i class="fas fa-user text-sm"></i>'; | |
| avatarDiv.classList.add(isTeacher ? 'bg-indigo-600' : 'bg-purple-500'); | |
| const contentDiv = document.createElement('div'); | |
| contentDiv.className = 'bg-gray-700 rounded-lg p-3 max-w-xs'; | |
| contentDiv.innerHTML = `<p class="text-sm">${randomMessage}</p>`; | |
| messageDiv.appendChild(avatarDiv); | |
| messageDiv.appendChild(contentDiv); | |
| document.getElementById('chat-messages').querySelector('.space-y-3').appendChild(messageDiv); | |
| document.getElementById('chat-messages').scrollTop = document.getElementById('chat-messages').scrollHeight; | |
| } | |
| }, 10000); | |
| </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=pingdwende/test" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |