Schedule Training button in Training tab and Add Incident button in Incidents tab is not functional. Add flow to it
b49c754
verified
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Safety Sentinel | HSE Compliance Dashboard</title> | |
| <link rel="icon" type="image/x-icon" href="/static/favicon.ico"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.waves.min.js"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
| <style> | |
| @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap'); | |
| body { | |
| font-family: 'Inter', sans-serif; | |
| } | |
| .safety-gradient { | |
| background: linear-gradient(135deg, #2b5876 0%, #4e4376 100%); | |
| } | |
| .incident-card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); | |
| } | |
| .glow { | |
| box-shadow: 0 0 15px rgba(59, 130, 246, 0.5); | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-50"> | |
| <div id="vanta-bg" class="fixed inset-0 -z-10"></div> | |
| <!-- Navigation --> | |
| <nav class="bg-white bg-opacity-90 backdrop-blur-md border-b border-gray-200 fixed w-full z-10"> | |
| <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> | |
| <div class="flex justify-between h-16"> | |
| <div class="flex items-center"> | |
| <div class="flex-shrink-0 flex items-center"> | |
| <i data-feather="shield" class="h-8 w-8 text-blue-600"></i> | |
| <span class="ml-2 text-xl font-bold text-gray-900">Safety Sentinel</span> | |
| </div> | |
| </div> | |
| <div class="hidden md:ml-6 md:flex md:items-center md:space-x-8"> | |
| <a href="#" class="text-blue-600 border-b-2 border-blue-600 px-1 pt-1 text-sm font-medium">Dashboard</a> | |
| <a href="incidents.html" class="text-gray-500 hover:text-gray-700 px-1 pt-1 text-sm font-medium">Incidents</a> | |
| <a href="compliance.html" class="text-gray-500 hover:text-gray-700 px-1 pt-1 text-sm font-medium">Compliance</a> | |
| <a href="reports.html" class="text-gray-500 hover:text-gray-700 px-1 pt-1 text-sm font-medium">Reports</a> | |
| <a href="training.html" class="text-gray-500 hover:text-gray-700 px-1 pt-1 text-sm font-medium">Training</a> | |
| </div> | |
| <div class="flex items-center"> | |
| <a href="incidents.html" class="bg-blue-600 text-white px-4 py-2 rounded-md text-sm font-medium hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"> | |
| <i data-feather="plus" class="h-4 w-4 inline mr-1"></i> New Incident | |
| </a> | |
| <div class="ml-4 relative flex-shrink-0"> | |
| <div> | |
| <button type="button" class="bg-white rounded-full flex text-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500" id="user-menu"> | |
| <span class="sr-only">Open user menu</span> | |
| <img class="h-8 w-8 rounded-full" src="http://static.photos/people/200x200/42" alt=""> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </nav> | |
| <!-- Main Content --> | |
| <div class="pt-24 pb-12 px-4 sm:px-6 lg:px-8 max-w-7xl mx-auto"> | |
| <!-- Header --> | |
| <div class="flex flex-col md:flex-row md:items-center md:justify-between mb-8"> | |
| <div> | |
| <h1 class="text-3xl font-bold text-gray-900">HSE Compliance Dashboard</h1> | |
| <p class="mt-2 text-sm text-gray-600">Monitor safety metrics and compliance in real-time</p> | |
| </div> | |
| <div class="mt-4 md:mt-0 flex space-x-3"> | |
| <div class="relative"> | |
| <select class="appearance-none bg-white border border-gray-300 rounded-md pl-3 pr-10 py-2 text-left cursor-default focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 sm:text-sm"> | |
| <option>Oil & Gas Refinery</option> | |
| <option>Chemical Plant</option> | |
| <option>Construction Site</option> | |
| </select> | |
| <i data-feather="chevron-down" class="absolute right-3 top-2.5 h-4 w-4 text-gray-400"></i> | |
| </div> | |
| <div class="relative"> | |
| <select class="appearance-none bg-white border border-gray-300 rounded-md pl-3 pr-10 py-2 text-left cursor-default focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 sm:text-sm"> | |
| <option>Last 7 days</option> | |
| <option>Last 30 days</option> | |
| <option>Last 90 days</option> | |
| </select> | |
| <i data-feather="chevron-down" class="absolute right-3 top-2.5 h-4 w-4 text-gray-400"></i> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Stats Cards --> | |
| <div class="grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-4 mb-8"> | |
| <div class="bg-white overflow-hidden shadow rounded-lg"> | |
| <div class="px-4 py-5 sm:p-6"> | |
| <div class="flex items-center"> | |
| <div class="flex-shrink-0 bg-blue-500 rounded-md p-3"> | |
| <i data-feather="activity" class="h-6 w-6 text-white"></i> | |
| </div> | |
| <div class="ml-5 w-0 flex-1"> | |
| <dl> | |
| <dt class="text-sm font-medium text-gray-500 truncate">Active Incidents</dt> | |
| <dd> | |
| <div class="text-lg font-medium text-gray-900">12</div> | |
| </dd> | |
| </dl> | |
| </div> | |
| </div> | |
| <div class="mt-4"> | |
| <div class="border-t border-gray-200 pt-3"> | |
| <p class="text-xs text-gray-500"> | |
| <span class="text-green-600 font-semibold">2.1%</span> from last week | |
| </p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white overflow-hidden shadow rounded-lg"> | |
| <div class="px-4 py-5 sm:p-6"> | |
| <div class="flex items-center"> | |
| <div class="flex-shrink-0 bg-red-500 rounded-md p-3"> | |
| <i data-feather="alert-triangle" class="h-6 w-6 text-white"></i> | |
| </div> | |
| <div class="ml-5 w-0 flex-1"> | |
| <dl> | |
| <dt class="text-sm font-medium text-gray-500 truncate">High Risk</dt> | |
| <dd> | |
| <div class="text-lg font-medium text-gray-900">4</div> | |
| </dd> | |
| </dl> | |
| </div> | |
| </div> | |
| <div class="mt-4"> | |
| <div class="border-t border-gray-200 pt-3"> | |
| <p class="text-xs text-gray-500"> | |
| <span class="text-red-600 font-semibold">10.5%</span> from last week | |
| </p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white overflow-hidden shadow rounded-lg"> | |
| <div class="px-4 py-5 sm:p-6"> | |
| <div class="flex items-center"> | |
| <div class="flex-shrink-0 bg-green-500 rounded-md p-3"> | |
| <i data-feather="check-circle" class="h-6 w-6 text-white"></i> | |
| </div> | |
| <div class="ml-5 w-0 flex-1"> | |
| <dl> | |
| <dt class="text-sm font-medium text-gray-500 truncate">Compliance Rate</dt> | |
| <dd> | |
| <div class="text-lg font-medium text-gray-900">94%</div> | |
| </dd> | |
| </dl> | |
| </div> | |
| </div> | |
| <div class="mt-4"> | |
| <div class="border-t border-gray-200 pt-3"> | |
| <p class="text-xs text-gray-500"> | |
| <span class="text-green-600 font-semibold">1.3%</span> from last week | |
| </p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white overflow-hidden shadow rounded-lg"> | |
| <div class="px-4 py-5 sm:p-6"> | |
| <div class="flex items-center"> | |
| <div class="flex-shrink-0 bg-yellow-500 rounded-md p-3"> | |
| <i data-feather="clock" class="h-6 w-6 text-white"></i> | |
| </div> | |
| <div class="ml-5 w-0 flex-1"> | |
| <dl> | |
| <dt class="text-sm font-medium text-gray-500 truncate">Days Since Last Incident</dt> | |
| <dd> | |
| <div class="text-lg font-medium text-gray-900">17</div> | |
| </dd> | |
| </dl> | |
| </div> | |
| </div> | |
| <div class="mt-4"> | |
| <div class="border-t border-gray-200 pt-3"> | |
| <p class="text-xs text-gray-500"> | |
| <span class="text-red-600 font-semibold">5 days</span> less than last month | |
| </p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Main Grid --> | |
| <div class="grid grid-cols-1 lg:grid-cols-3 gap-8"> | |
| <!-- Incident Overview Chart --> | |
| <div class="bg-white p-6 rounded-lg shadow lg:col-span-2"> | |
| <div class="flex items-center justify-between mb-4"> | |
| <h2 class="text-lg font-medium text-gray-900">Incident Overview</h2> | |
| <div class="flex space-x-2"> | |
| <button class="px-3 py-1 bg-blue-100 text-blue-700 rounded-md text-sm font-medium">Daily</button> | |
| <button class="px-3 py-1 bg-gray-100 text-gray-700 rounded-md text-sm font-medium">Weekly</button> | |
| <button class="px-3 py-1 bg-gray-100 text-gray-700 rounded-md text-sm font-medium">Monthly</button> | |
| </div> | |
| </div> | |
| <div class="h-80"> | |
| <canvas id="incidentChart"></canvas> | |
| </div> | |
| </div> | |
| <!-- Recent Incidents --> | |
| <div class="bg-white p-6 rounded-lg shadow"> | |
| <div class="flex items-center justify-between mb-4"> | |
| <h2 class="text-lg font-medium text-gray-900">Recent Incidents</h2> | |
| <a href="#" class="text-sm font-medium text-blue-600 hover:text-blue-500">View all</a> | |
| </div> | |
| <div class="space-y-4"> | |
| <div class="flex items-start"> | |
| <div class="flex-shrink-0 mt-1"> | |
| <div class="bg-red-100 p-2 rounded-full"> | |
| <i data-feather="alert-octagon" class="h-5 w-5 text-red-600"></i> | |
| </div> | |
| </div> | |
| <div class="ml-3"> | |
| <p class="text-sm font-medium text-gray-900">Gas Leak Detected</p> | |
| <p class="text-sm text-gray-500">North Processing Unit • 2 hours ago</p> | |
| <div class="mt-1 flex space-x-2"> | |
| <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-red-100 text-red-800">Critical</span> | |
| <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800">Investigation</span> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="flex items-start"> | |
| <div class="flex-shrink-0 mt-1"> | |
| <div class="bg-yellow-100 p-2 rounded-full"> | |
| <i data-feather="alert-triangle" class="h-5 w-5 text-yellow-600"></i> | |
| </div> | |
| </div> | |
| <div class="ml-3"> | |
| <p class="text-sm font-medium text-gray-900">PPE Non-compliance</p> | |
| <p class="text-sm text-gray-500">Central Storage • 5 hours ago</p> | |
| <div class="mt-1 flex space-x-2"> | |
| <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800">Medium</span> | |
| <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-purple-100 text-purple-800">Training</span> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="flex items-start"> | |
| <div class="flex-shrink-0 mt-1"> | |
| <div class="bg-blue-100 p-2 rounded-full"> | |
| <i data-feather="alert-circle" class="h-5 w-5 text-blue-600"></i> | |
| </div> | |
| </div> | |
| <div class="ml-3"> | |
| <p class="text-sm font-medium text-gray-900">Near Miss Report</p> | |
| <p class="text-sm text-gray-500">Loading Dock • Yesterday</p> | |
| <div class="mt-1 flex space-x-2"> | |
| <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800">Low</span> | |
| <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800">Resolved</span> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="flex items-start"> | |
| <div class="flex-shrink-0 mt-1"> | |
| <div class="bg-orange-100 p-2 rounded-full"> | |
| <i data-feather="alert-octagon" class="h-5 w-5 text-orange-600"></i> | |
| </div> | |
| </div> | |
| <div class="ml-3"> | |
| <p class="text-sm font-medium text-gray-900">Equipment Failure</p> | |
| <p class="text-sm text-gray-500">Compression Station • Yesterday</p> | |
| <div class="mt-1 flex space-x-2"> | |
| <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-orange-100 text-orange-800">High</span> | |
| <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800">Repair</span> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Compliance Status --> | |
| <div class="bg-white p-6 rounded-lg shadow lg:col-span-3"> | |
| <div class="flex items-center justify-between mb-4"> | |
| <h2 class="text-lg font-medium text-gray-900">Compliance Status by Department</h2> | |
| <a href="#" class="text-sm font-medium text-blue-600 hover:text-blue-500">Export Report</a> | |
| </div> | |
| <div class="overflow-x-auto"> | |
| <table class="min-w-full divide-y divide-gray-200"> | |
| <thead class="bg-gray-50"> | |
| <tr> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Department</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Safety Checks</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Incidents</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Training</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Compliance</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th> | |
| </tr> | |
| </thead> | |
| <tbody class="bg-white divide-y divide-gray-200"> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Processing</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">98/100</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">3</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">92%</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">95%</td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Compliant</span> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Maintenance</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">87/100</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">5</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">85%</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">89%</td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">Review</span> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Logistics</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">95/100</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">88%</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">93%</td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Compliant</span> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Storage</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">82/100</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">7</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">79%</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">84%</td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">Action Required</span> | |
| </td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| <!-- Safety Alerts --> | |
| <div class="bg-white p-6 rounded-lg shadow lg:col-span-2"> | |
| <div class="flex items-center justify-between mb-4"> | |
| <h2 class="text-lg font-medium text-gray-900">Safety Alerts & Notifications</h2> | |
| <button class="text-sm font-medium text-blue-600 hover:text-blue-500">Mark all as read</button> | |
| </div> | |
| <div class="space-y-4"> | |
| <div class="flex items-start bg-red-50 rounded-md p-4"> | |
| <div class="flex-shrink-0"> | |
| <i data-feather="alert-octagon" class="h-5 w-5 text-red-600"></i> | |
| </div> | |
| <div class="ml-3"> | |
| <p class="text-sm font-medium text-gray-900">Emergency Drill Scheduled</p> | |
| <p class="text-sm text-gray-500">Full facility emergency drill scheduled for tomorrow at 10:00 AM.</p> | |
| <p class="mt-1 text-xs text-gray-500">2 hours ago • <a href="#" class="text-blue-600 hover:text-blue-500">View Details</a></p> | |
| </div> | |
| </div> | |
| <div class="flex items-start bg-yellow-50 rounded-md p-4"> | |
| <div class="flex-shrink-0"> | |
| <i data-feather="alert-triangle" class="h-5 w-5 text-yellow-600"></i> | |
| </div> | |
| <div class="ml-3"> | |
| <p class="text-sm font-medium text-gray-900">Safety Training Update</p> | |
| <p class="text-sm text-gray-500">New safety training modules available. Complete by end of week.</p> | |
| <p class="mt-1 text-xs text-gray-500">Yesterday • <a href="#" class="text-blue-600 hover:text-blue-500">View Details</a></p> | |
| </div> | |
| </div> | |
| <div class="flex items-start bg-blue-50 rounded-md p-4"> | |
| <div class="flex-shrink-0"> | |
| <i data-feather="info" class="h-5 w-5 text-blue-600"></i> | |
| </div> | |
| <div class="ml-3"> | |
| <p class="text-sm font-medium text-gray-900">PPE Policy Update</p> | |
| <p class="text-sm text-gray-500">Revised PPE requirements effective immediately in all processing areas.</p> | |
| <p class="mt-1 text-xs text-gray-500">2 days ago • <a href="#" class="text-blue-600 hover:text-blue-500">View Details</a></p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Quick Actions --> | |
| <div class="bg-white p-6 rounded-lg shadow"> | |
| <h2 class="text-lg font-medium text-gray-900 mb-4">Quick Actions</h2> | |
| <div class="grid grid-cols-2 gap-4"> | |
| <a href="new-report.html" class="flex flex-col items-center justify-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50"> | |
| <div class="bg-blue-100 p-3 rounded-full mb-2"> | |
| <i data-feather="plus" class="h-6 w-6 text-blue-600"></i> | |
| </div> | |
| <span class="text-sm font-medium text-gray-700">New Incident</span> | |
| </a> | |
| <a href="safety-checklist.html" class="flex flex-col items-center justify-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50"> | |
| <div class="bg-green-100 p-3 rounded-full mb-2"> | |
| <i data-feather="check" class="h-6 w-6 text-green-600"></i> | |
| </div> | |
| <span class="text-sm font-medium text-gray-700">Safety Check</span> | |
| </a> | |
| <a href="report-generator.html" class="flex flex-col items-center justify-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50"> | |
| <div class="bg-purple-100 p-3 rounded-full mb-2"> | |
| <i data-feather="file-text" class="h-6 w-6 text-purple-600"></i> | |
| </div> | |
| <span class="text-sm font-medium text-gray-700">Generate Report</span> | |
| </a> | |
| <a href="training-management.html" class="flex flex-col items-center justify-center p-4 border border-gray-200 rounded-lg hover:bg-gray-50"> | |
| <div class="bg-yellow-100 p-3 rounded-full mb-2"> | |
| <i data-feather="users" class="h-6 w-6 text-yellow-600"></i> | |
| </div> | |
| <span class="text-sm font-medium text-gray-700">Team Training</span> | |
| </a> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| // Vanta.js Background | |
| VANTA.WAVES({ | |
| el: "#vanta-bg", | |
| mouseControls: true, | |
| touchControls: true, | |
| gyroControls: false, | |
| minHeight: 200.00, | |
| minWidth: 200.00, | |
| scale: 1.00, | |
| scaleMobile: 1.00, | |
| color: 0x172b4d, | |
| shininess: 35.00, | |
| waveHeight: 15.00, | |
| waveSpeed: 0.75, | |
| zoom: 0.8 | |
| }); | |
| // Chart.js Implementation | |
| document.addEventListener('DOMContentLoaded', function() { | |
| feather.replace(); | |
| const ctx = document.getElementById('incidentChart').getContext('2d'); | |
| const incidentChart = new Chart(ctx, { | |
| type: 'bar', | |
| data: { | |
| labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'], | |
| datasets: [ | |
| { | |
| label: 'Near Miss', | |
| data: [3, 5, 2, 4, 2, 3, 1], | |
| backgroundColor: 'rgba(59, 130, 246, 0.7)', | |
| borderColor: 'rgba(59, 130, 246, 1)', | |
| borderWidth: 1 | |
| }, | |
| { | |
| label: 'Minor', | |
| data: [2, 3, 1, 5, 3, 2, 4], | |
| backgroundColor: 'rgba(234, 179, 8, 0.7)', | |
| borderColor: 'rgba(234, 179, 8, 1)', | |
| borderWidth: 1 | |
| }, | |
| { | |
| label: 'Major', | |
| data: [1, 0, 2, 1, 0, 1, 2], | |
| backgroundColor: 'rgba(239, 68, 68, 0.7)', | |
| borderColor: 'rgba(239, 68, 68, 1)', | |
| borderWidth: 1 | |
| } | |
| ] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| scales: { | |
| y: { | |
| beginAtZero: true | |
| } | |
| }, | |
| plugins: { | |
| legend: { | |
| position: 'top', | |
| }, | |
| tooltip: { | |
| mode: 'index', | |
| intersect: false, | |
| } | |
| } | |
| } | |
| }); | |
| }); | |
| // Mobile menu toggle (would be implemented with Alpine.js or similar in a real app) | |
| </script> | |
| </body> | |
| </html> | |