| <!DOCTYPE html> |
| <html lang="en"> |
| <head> |
| <meta charset="UTF-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| <title>Attendance System</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> |
| |
| @keyframes fadeIn { |
| from { opacity: 0; transform: translateY(10px); } |
| to { opacity: 1; transform: translateY(0); } |
| } |
| |
| .fade-in { |
| animation: fadeIn 0.3s ease-out forwards; |
| } |
| |
| |
| ::-webkit-scrollbar { |
| width: 8px; |
| } |
| |
| ::-webkit-scrollbar-track { |
| background: #f1f1f1; |
| border-radius: 10px; |
| } |
| |
| ::-webkit-scrollbar-thumb { |
| background: #888; |
| border-radius: 10px; |
| } |
| |
| ::-webkit-scrollbar-thumb:hover { |
| background: #555; |
| } |
| |
| |
| @keyframes pulse { |
| 0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); } |
| 70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); } |
| 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); } |
| } |
| |
| .pulse { |
| animation: pulse 2s infinite; |
| } |
| </style> |
| </head> |
| <body class="bg-gray-100 font-sans"> |
| <div class="min-h-screen flex flex-col"> |
| |
| <header class="bg-blue-600 text-white shadow-lg"> |
| <div class="container mx-auto px-4 py-4 flex justify-between items-center"> |
| <div class="flex items-center space-x-2"> |
| <i class="fas fa-fingerprint text-2xl"></i> |
| <h1 class="text-2xl font-bold">AttendancePro</h1> |
| </div> |
| <div class="flex items-center space-x-4"> |
| <div class="relative"> |
| <i class="fas fa-bell text-xl cursor-pointer hover:text-blue-200"></i> |
| <span class="absolute -top-1 -right-1 bg-red-500 text-white text-xs rounded-full h-4 w-4 flex items-center justify-center">3</span> |
| </div> |
| <div class="flex items-center space-x-2 cursor-pointer group"> |
| <img src="https://randomuser.me/api/portraits/men/32.jpg" alt="Profile" class="w-8 h-8 rounded-full border-2 border-white"> |
| <span class="font-medium group-hover:text-blue-200">John Doe</span> |
| </div> |
| </div> |
| </div> |
| </header> |
|
|
| |
| <main class="flex-grow container mx-auto px-4 py-6"> |
| <div class="grid grid-cols-1 lg:grid-cols-3 gap-6"> |
| |
| <div class="lg:col-span-2 space-y-6"> |
| |
| <div class="bg-white rounded-xl shadow-md overflow-hidden fade-in"> |
| <div class="p-6"> |
| <div class="flex justify-between items-center mb-4"> |
| <h2 class="text-xl font-bold text-gray-800">Today's Attendance</h2> |
| <span class="text-sm text-gray-500">Monday, June 12, 2023</span> |
| </div> |
| |
| <div class="grid grid-cols-2 gap-4 mb-6"> |
| <div class="bg-blue-50 p-4 rounded-lg border border-blue-100"> |
| <div class="flex items-center justify-between"> |
| <div> |
| <p class="text-sm text-gray-500">Check In</p> |
| <p class="text-xl font-bold text-blue-600">08:15 AM</p> |
| </div> |
| <i class="fas fa-sign-in-alt text-blue-400 text-2xl"></i> |
| </div> |
| </div> |
| <div class="bg-orange-50 p-4 rounded-lg border border-orange-100"> |
| <div class="flex items-center justify-between"> |
| <div> |
| <p class="text-sm text-gray-500">Check Out</p> |
| <p class="text-xl font-bold text-orange-600">--:--</p> |
| </div> |
| <i class="fas fa-sign-out-alt text-orange-400 text-2xl"></i> |
| </div> |
| </div> |
| </div> |
| |
| <div class="flex justify-center"> |
| <button id="checkInBtn" class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-8 rounded-full text-lg flex items-center space-x-2 transition-all duration-300 transform hover:scale-105 pulse"> |
| <i class="fas fa-fingerprint"></i> |
| <span>Check In Now</span> |
| </button> |
| </div> |
| </div> |
| </div> |
| |
| |
| <div class="bg-white rounded-xl shadow-md overflow-hidden fade-in" style="animation-delay: 0.1s;"> |
| <div class="p-6"> |
| <h2 class="text-xl font-bold text-gray-800 mb-4">This Month Summary</h2> |
| |
| <div class="grid grid-cols-4 gap-4 text-center mb-6"> |
| <div class="p-3"> |
| <p class="text-sm text-gray-500">Work Days</p> |
| <p class="text-2xl font-bold">22</p> |
| </div> |
| <div class="p-3"> |
| <p class="text-sm text-gray-500">Present</p> |
| <p class="text-2xl font-bold text-green-600">18</p> |
| </div> |
| <div class="p-3"> |
| <p class="text-sm text-gray-500">Late</p> |
| <p class="text-2xl font-bold text-yellow-600">2</p> |
| </div> |
| <div class="p-3"> |
| <p class="text-sm text-gray-500">Absent</p> |
| <p class="text-2xl font-bold text-red-600">2</p> |
| </div> |
| </div> |
| |
| <div class="h-64"> |
| <canvas id="attendanceChart"></canvas> |
| </div> |
| </div> |
| </div> |
| </div> |
| |
| |
| <div class="space-y-6"> |
| |
| <div class="bg-white rounded-xl shadow-md overflow-hidden fade-in" style="animation-delay: 0.2s;"> |
| <div class="p-6"> |
| <h2 class="text-xl font-bold text-gray-800 mb-4">Recent Activity</h2> |
| |
| <div class="space-y-4 max-h-96 overflow-y-auto pr-2"> |
| <div class="flex items-start space-x-3"> |
| <div class="bg-green-100 p-2 rounded-full"> |
| <i class="fas fa-check-circle text-green-500"></i> |
| </div> |
| <div> |
| <p class="font-medium">Checked in</p> |
| <p class="text-sm text-gray-500">Today at 08:15 AM</p> |
| </div> |
| </div> |
| |
| <div class="flex items-start space-x-3"> |
| <div class="bg-blue-100 p-2 rounded-full"> |
| <i class="fas fa-calendar-day text-blue-500"></i> |
| </div> |
| <div> |
| <p class="font-medium">Day off approved</p> |
| <p class="text-sm text-gray-500">Yesterday at 03:42 PM</p> |
| </div> |
| </div> |
| |
| <div class="flex items-start space-x-3"> |
| <div class="bg-yellow-100 p-2 rounded-full"> |
| <i class="fas fa-exclamation-triangle text-yellow-500"></i> |
| </div> |
| <div> |
| <p class="font-medium">Late check-in</p> |
| <p class="text-sm text-gray-500">Monday at 09:23 AM</p> |
| </div> |
| </div> |
| |
| <div class="flex items-start space-x-3"> |
| <div class="bg-red-100 p-2 rounded-full"> |
| <i class="fas fa-times-circle text-red-500"></i> |
| </div> |
| <div> |
| <p class="font-medium">Missed check-out</p> |
| <p class="text-sm text-gray-500">Friday at 06:00 PM</p> |
| </div> |
| </div> |
| |
| <div class="flex items-start space-x-3"> |
| <div class="bg-green-100 p-2 rounded-full"> |
| <i class="fas fa-check-circle text-green-500"></i> |
| </div> |
| <div> |
| <p class="font-medium">Checked out</p> |
| <p class="text-sm text-gray-500">Thursday at 05:45 PM</p> |
| </div> |
| </div> |
| </div> |
| </div> |
| </div> |
| |
| |
| <div class="bg-white rounded-xl shadow-md overflow-hidden fade-in" style="animation-delay: 0.3s;"> |
| <div class="p-6"> |
| <h2 class="text-xl font-bold text-gray-800 mb-4">Quick Actions</h2> |
| |
| <div class="grid grid-cols-2 gap-3"> |
| <button class="bg-purple-100 hover:bg-purple-200 text-purple-700 py-3 px-4 rounded-lg flex flex-col items-center transition-all duration-200"> |
| <i class="fas fa-calendar-plus text-xl mb-2"></i> |
| <span class="text-sm">Request Leave</span> |
| </button> |
| <button class="bg-indigo-100 hover:bg-indigo-200 text-indigo-700 py-3 px-4 rounded-lg flex flex-col items-center transition-all duration-200"> |
| <i class="fas fa-clock text-xl mb-2"></i> |
| <span class="text-sm">Overtime</span> |
| </button> |
| <button class="bg-teal-100 hover:bg-teal-200 text-teal-700 py-3 px-4 rounded-lg flex flex-col items-center transition-all duration-200"> |
| <i class="fas fa-file-export text-xl mb-2"></i> |
| <span class="text-sm">Export Data</span> |
| </button> |
| <button class="bg-amber-100 hover:bg-amber-200 text-amber-700 py-3 px-4 rounded-lg flex flex-col items-center transition-all duration-200"> |
| <i class="fas fa-cog text-xl mb-2"></i> |
| <span class="text-sm">Settings</span> |
| </button> |
| </div> |
| </div> |
| </div> |
| </div> |
| </div> |
| |
| |
| <div class="mt-8 bg-white rounded-xl shadow-md overflow-hidden fade-in" style="animation-delay: 0.4s;"> |
| <div class="p-6"> |
| <div class="flex justify-between items-center mb-4"> |
| <h2 class="text-xl font-bold text-gray-800">Attendance History</h2> |
| <div class="flex space-x-2"> |
| <select class="bg-gray-100 border border-gray-300 text-gray-700 py-2 px-3 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"> |
| <option>June 2023</option> |
| <option>May 2023</option> |
| <option>April 2023</option> |
| </select> |
| <button class="bg-gray-100 hover:bg-gray-200 text-gray-700 py-2 px-3 rounded-lg"> |
| <i class="fas fa-filter"></i> |
| </button> |
| </div> |
| </div> |
| |
| <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">Date</th> |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Day</th> |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Check In</th> |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Check Out</th> |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th> |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Working Hours</th> |
| </tr> |
| </thead> |
| <tbody class="bg-white divide-y divide-gray-200"> |
| <tr> |
| <td class="px-6 py-4 whitespace-nowrap">12/06/2023</td> |
| <td class="px-6 py-4 whitespace-nowrap">Monday</td> |
| <td class="px-6 py-4 whitespace-nowrap">08:15 AM</td> |
| <td class="px-6 py-4 whitespace-nowrap">--:--</td> |
| <td class="px-6 py-4 whitespace-nowrap"><span class="px-2 py-1 text-xs rounded-full bg-blue-100 text-blue-800">On Duty</span></td> |
| <td class="px-6 py-4 whitespace-nowrap">--:--</td> |
| </tr> |
| <tr> |
| <td class="px-6 py-4 whitespace-nowrap">09/06/2023</td> |
| <td class="px-6 py-4 whitespace-nowrap">Friday</td> |
| <td class="px-6 py-4 whitespace-nowrap">08:05 AM</td> |
| <td class="px-6 py-4 whitespace-nowrap">05:30 PM</td> |
| <td class="px-6 py-4 whitespace-nowrap"><span class="px-2 py-1 text-xs rounded-full bg-green-100 text-green-800">Completed</span></td> |
| <td class="px-6 py-4 whitespace-nowrap">9h 25m</td> |
| </tr> |
| <tr> |
| <td class="px-6 py-4 whitespace-nowrap">08/06/2023</td> |
| <td class="px-6 py-4 whitespace-nowrap">Thursday</td> |
| <td class="px-6 py-4 whitespace-nowrap">09:23 AM</td> |
| <td class="px-6 py-4 whitespace-nowrap">05:45 PM</td> |
| <td class="px-6 py-4 whitespace-nowrap"><span class="px-2 py-1 text-xs rounded-full bg-yellow-100 text-yellow-800">Late</span></td> |
| <td class="px-6 py-4 whitespace-nowrap">8h 22m</td> |
| </tr> |
| <tr> |
| <td class="px-6 py-4 whitespace-nowrap">07/06/2023</td> |
| <td class="px-6 py-4 whitespace-nowrap">Wednesday</td> |
| <td class="px-6 py-4 whitespace-nowrap">08:00 AM</td> |
| <td class="px-6 py-4 whitespace-nowrap">05:15 PM</td> |
| <td class="px-6 py-4 whitespace-nowrap"><span class="px-2 py-1 text-xs rounded-full bg-green-100 text-green-800">Completed</span></td> |
| <td class="px-6 py-4 whitespace-nowrap">9h 15m</td> |
| </tr> |
| <tr> |
| <td class="px-6 py-4 whitespace-nowrap">06/06/2023</td> |
| <td class="px-6 py-4 whitespace-nowrap">Tuesday</td> |
| <td class="px-6 py-4 whitespace-nowrap">--:--</td> |
| <td class="px-6 py-4 whitespace-nowrap">--:--</td> |
| <td class="px-6 py-4 whitespace-nowrap"><span class="px-2 py-1 text-xs rounded-full bg-red-100 text-red-800">Absent</span></td> |
| <td class="px-6 py-4 whitespace-nowrap">--:--</td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| </div> |
| </main> |
| |
| |
| <footer class="bg-gray-800 text-white py-4"> |
| <div class="container mx-auto px-4 text-center"> |
| <p>© 2023 AttendancePro. All rights reserved.</p> |
| </div> |
| </footer> |
| </div> |
|
|
| |
| <div id="checkInModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden"> |
| <div class="bg-white rounded-xl p-6 w-full max-w-md transform transition-all duration-300 scale-95 opacity-0" id="modalContent"> |
| <div class="flex justify-between items-center mb-4"> |
| <h3 class="text-xl font-bold text-gray-800">Check In Confirmation</h3> |
| <button id="closeModal" class="text-gray-500 hover:text-gray-700"> |
| <i class="fas fa-times"></i> |
| </button> |
| </div> |
| |
| <div class="mb-6"> |
| <div class="flex items-center justify-center mb-4"> |
| <div class="bg-blue-100 p-4 rounded-full"> |
| <i class="fas fa-fingerprint text-blue-500 text-4xl"></i> |
| </div> |
| </div> |
| <p class="text-center text-gray-600">You're about to check in at:</p> |
| <p class="text-center text-2xl font-bold my-2" id="currentTime">--:-- --</p> |
| <p class="text-center text-gray-600" id="currentDate">Monday, June 12, 2023</p> |
| </div> |
| |
| <div class="flex space-x-3"> |
| <button id="cancelCheckIn" class="flex-grow bg-gray-200 hover:bg-gray-300 text-gray-800 py-2 px-4 rounded-lg transition-colors duration-200"> |
| Cancel |
| </button> |
| <button id="confirmCheckIn" class="flex-grow bg-blue-600 hover:bg-blue-700 text-white py-2 px-4 rounded-lg transition-colors duration-200"> |
| Confirm |
| </button> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <div id="successToast" class="fixed bottom-4 right-4 bg-green-500 text-white px-6 py-3 rounded-lg shadow-lg flex items-center space-x-3 transform translate-y-10 opacity-0 transition-all duration-300 z-50"> |
| <i class="fas fa-check-circle text-xl"></i> |
| <div> |
| <p class="font-medium">Success!</p> |
| <p class="text-sm">You have successfully checked in.</p> |
| </div> |
| </div> |
|
|
| <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> |
| <script> |
| |
| const checkInBtn = document.getElementById('checkInBtn'); |
| const checkInModal = document.getElementById('checkInModal'); |
| const modalContent = document.getElementById('modalContent'); |
| const closeModal = document.getElementById('closeModal'); |
| const cancelCheckIn = document.getElementById('cancelCheckIn'); |
| const confirmCheckIn = document.getElementById('confirmCheckIn'); |
| const successToast = document.getElementById('successToast'); |
| const currentTime = document.getElementById('currentTime'); |
| const currentDate = document.getElementById('currentDate'); |
| |
| |
| function updateTime() { |
| const now = new Date(); |
| const timeString = now.toLocaleTimeString('en-US', { hour: '2-digit', minute: '2-digit' }); |
| const dateString = now.toLocaleDateString('en-US', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }); |
| |
| currentTime.textContent = timeString; |
| currentDate.textContent = dateString; |
| } |
| |
| |
| checkInBtn.addEventListener('click', () => { |
| updateTime(); |
| checkInModal.classList.remove('hidden'); |
| setTimeout(() => { |
| modalContent.classList.remove('scale-95', 'opacity-0'); |
| modalContent.classList.add('scale-100', 'opacity-100'); |
| }, 10); |
| }); |
| |
| |
| function hideModal() { |
| modalContent.classList.remove('scale-100', 'opacity-100'); |
| modalContent.classList.add('scale-95', 'opacity-0'); |
| setTimeout(() => { |
| checkInModal.classList.add('hidden'); |
| }, 300); |
| } |
| |
| closeModal.addEventListener('click', hideModal); |
| cancelCheckIn.addEventListener('click', hideModal); |
| |
| |
| confirmCheckIn.addEventListener('click', () => { |
| hideModal(); |
| |
| |
| setTimeout(() => { |
| |
| successToast.classList.remove('translate-y-10', 'opacity-0'); |
| successToast.classList.add('translate-y-0', 'opacity-100'); |
| |
| |
| document.querySelector('.bg-orange-50 .text-xl').textContent = '--:--'; |
| document.querySelector('.bg-blue-50 .text-xl').textContent = currentTime.textContent; |
| checkInBtn.textContent = 'Check Out Now'; |
| checkInBtn.classList.remove('bg-blue-600', 'pulse'); |
| checkInBtn.classList.add('bg-red-600'); |
| checkInBtn.innerHTML = '<i class="fas fa-sign-out-alt"></i><span>Check Out Now</span>'; |
| |
| |
| setTimeout(() => { |
| successToast.classList.remove('translate-y-0', 'opacity-100'); |
| successToast.classList.add('translate-y-10', 'opacity-0'); |
| }, 3000); |
| }, 500); |
| }); |
| |
| |
| const ctx = document.getElementById('attendanceChart').getContext('2d'); |
| const attendanceChart = new Chart(ctx, { |
| type: 'bar', |
| data: { |
| labels: ['Week 1', 'Week 2', 'Week 3', 'Week 4'], |
| datasets: [ |
| { |
| label: 'Present', |
| data: [5, 4, 5, 4], |
| backgroundColor: '#10B981', |
| borderRadius: 4 |
| }, |
| { |
| label: 'Late', |
| data: [0, 1, 1, 0], |
| backgroundColor: '#F59E0B', |
| borderRadius: 4 |
| }, |
| { |
| label: 'Absent', |
| data: [0, 0, 1, 1], |
| backgroundColor: '#EF4444', |
| borderRadius: 4 |
| } |
| ] |
| }, |
| options: { |
| responsive: true, |
| maintainAspectRatio: false, |
| scales: { |
| x: { |
| stacked: true, |
| grid: { |
| display: false |
| } |
| }, |
| y: { |
| stacked: true, |
| beginAtZero: true, |
| ticks: { |
| stepSize: 1 |
| } |
| } |
| }, |
| plugins: { |
| legend: { |
| position: 'top', |
| } |
| } |
| } |
| }); |
| |
| |
| document.addEventListener('DOMContentLoaded', () => { |
| const fadeElements = document.querySelectorAll('.fade-in'); |
| fadeElements.forEach((el, index) => { |
| setTimeout(() => { |
| el.style.opacity = '1'; |
| el.style.transform = 'translateY(0)'; |
| }, index * 100); |
| }); |
| }); |
| </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=usups/absensi" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> |
| </html> |