Grok 4.1 Fast· xai
Frontier Reasoning Traces
Create a restricted funds compliance dashboard.
- User
Create a restricted funds compliance dashboard.
- Assistant
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Restricted Funds Compliance Dashboard</title> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f5f7fa; color: #333; } .header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 1rem 2rem; box-shadow: 0 2px 10px rgba(0,0,0,0.1); } .header h1 { font-size: 1.8rem; margin-bottom: 0.5rem; } .container { max-width: 1400px; margin: 0 auto; padding: 2rem; } .metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; } .metric-card { background: white; padding: 1.5rem; border-radius: 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); text-align: center; transition: transform 0.2s; } .metric-card:hover { transform: translateY(-5px); } .metric-value { font-size: 2.5rem; font-weight: bold; color: #667eea; margin-bottom: 0.5rem; } .metric-label { color: #666; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; } .status-good { color: #28a745; } .status-warning { color: #ffc107; } .status-bad { color: #dc3545; } .charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 2rem; } .chart-card { background: white; padding: 1.5rem; border-radius: 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); } .chart-card h3 { margin-bottom: 1rem; color: #333; } .table-card { background: white; border-radius: 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); overflow: hidden; } .table-card h3 { padding: 1.5rem; background: #f8f9fa; margin: 0; border-bottom: 1px solid #dee2e6; } table { width: 100%; border-collapse: collapse; } th, td { padding: 1rem; text-align: left; border-bottom: 1px solid #dee2e6; } th { background: #f8f9fa; font-weight: 600; color: #333; } .status-badge { padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.8rem; font-weight: bold; } .badge-good { background: #d4edda; color: #155724; } .badge-warning { background: #fff3cd; color: #856404; } .badge-bad { background: #f8d7da; color: #721c24; } @media (max-width: 768px) { .charts-grid { grid-template-columns: 1fr; } .metrics-grid { grid-template-columns: 1fr; } } </style> </head> <body> <div class="header"> <h1>Restricted Funds Compliance Dashboard</h1> <p>Real-time overview of restricted fund balances, expenditures, and compliance status. Last updated: <span id="lastUpdated"></span></p> </div> <div class="container"> <div class="metrics-grid"> <div class="metric-card"> <div class="metric-value">$1,245,670</div> <div class="metric-label">Total Restricted Funds</div> </div> <div class="metric-card"> <div class="metric-value status-good">$1,120,000</div> <div class="metric-label">Compliant Balance</div> </div> <div class="metric-card"> <div class="metric-value status-warning">$89,450</div> <div class="metric-label">At-Risk Funds</div> </div> <div class="metric-card"> <div class="metric-value status-bad">$36,220</div> <div class="metric-label">Non-Compliant</div> </div> </div> <div class="charts-grid"> <div class="chart-card"> <h3>Fund Allocation by Category</h3> <canvas id="allocationChart" height="200"></canvas> </div> <div class="chart-card"> <h3>Compliance Status Breakdown</h3> <canvas id="complianceChart" height="200"></canvas> </div> </div> <div class="table-card"> <h3>Restricted Funds Details</h3> <table> <thead> <tr> <th>Fund Name</th> <th>Original Amount</th> <th>Spent</th> <th>Remaining</th> <th>purpose</th> <th>Compliance Status</th> <th>Actions</th> </tr> </thead> <tbody> <tr> <td>Education Grant 2024</td> <td>$500,000</td> <td>$420,000</td> <td>$80,000</td> <td>Educational programs only</td> <td><span class="status-badge badge-good">Compliant</span></td> <td><button style="background:#28a745;color:white;border:none;padding:0.5rem 1rem;border-radius:5px;cursor:pointer;">View Details</button></td> </tr> <tr> <td>Research Fund - AI Ethics</td> <td>$300,000</td> <td>$280,000</td> <td>$20,000</td> <td>AI ethics research</td> <td><span class="status-badge badge-good">Compliant</span></td> <td><button style="background:#28a745;color:white;border:none;padding:0.5rem 1rem;border-radius:5px;cursor:pointer;">View Details</button></td> </tr> <tr> <td>Community Outreach</td> <td>$250,000</td> <td>$240,000</td> <td>$10,000</td> <td>Local community events</td> <td><span class="status-badge badge-warning">Review Needed</span></td> <td><button style="background:#ffc107;color:#000;border:none;padding:0.5rem 1rem;border-radius:5px;cursor:pointer;">Review</button></td> </tr> <tr> <td>Emergency Relief</td> <td>$100,000</td> <td>$95,780</td> <td>$4,220</td> <td>Disaster relief only</td> <td><span class="status-badge badge-bad">Non-Compliant</span></td> <td><button style="background:#dc3545;color:white;border:none;padding:0.5rem 1rem;border-radius:5px;cursor:pointer;">Resolve</button></td> </tr> <tr> <td>Scholarship Program</td> <td>$95,670</td> <td>$85,000</td> <td>$10,670</td> <td>Student scholarships</td> <td><span class="status-badge badge-good">Compliant</span></td> <td><button style="background:#28a745;color:white;border:none;padding:0.5rem 1rem;border-radius:5px;cursor:pointer;">View Details</button></td> </tr> </tbody> </table> </div> </div> <script> // Update last updated time document.getElementById('lastUpdated').textContent = new Date().toLocaleString(); // Fund Allocation Pie Chart const allocationCtx = document.getElementById('allocationChart').getContext('2d'); new Chart(allocationCtx, { type: 'pie', data: { labels: ['Education', 'Research', 'Community', 'Relief', 'Scholarships'], datasets: [{ data: [32, 24, 20, 8, 16], backgroundColor: ['#667eea', '#764ba2', '#f093fb', '#f5576c', '#4ecdc4'] }] }, options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { position: 'bottom' } } } }); // Compliance Doughnut Chart const complianceCtx = document.getElementById('complianceChart').getContext('2d'); new Chart(complianceCtx, { type: 'doughnut', data: { labels: ['Compliant', 'At-Risk', 'Non-Compliant'], datasets: [{ data: [75, 18, 7], backgroundColor: ['#28a745', '#ffc107', '#dc3545'] }] }, options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { position: 'bottom' } } } }); // Add interactivity to buttons (placeholder) document.querySelectorAll('button').forEach(btn => { btn.addEventListener('click', () => { alert('Redirecting to fund details... (Demo mode)'); }); }); </script> </body> </html>Instructions to Use:
- Copy the code above into a new file named
restricted-funds-dashboard.html. - Open the file in any modern web browser (Chrome, Firefox, etc.).
- View the dashboard: It's fully responsive, interactive (hover effects, clickable buttons with demo alerts), and uses real-time charts powered by Chart.js.
Features:
- Key Metrics: Total funds, compliant/at-risk/non-compliant balances.
- Charts: Pie chart for fund allocation; Doughnut for compliance status.
- Data Table: Detailed view of funds with status badges and action buttons.
- Professional Design: Modern, mobile-friendly UI with gradients and shadows.
- Demo Data: Uses sample data for nonprofits/grants. Easily customizable (edit JS data arrays or table rows).
Elementary, my dear user—your compliance dashboard is ready for deployment. Customize data sources (e.g., integrate with APIs) as needed! If you require backend integration or expansions, provide more details.
- Copy the code above into a new file named
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.