feat: add dashboard feature with modular API endpoints and UI integration
This commit is contained in:
+267
-2
@@ -22,8 +22,8 @@ body, html {
|
||||
.ui-container {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
left: 30%;
|
||||
transform: translateX(-70%);
|
||||
z-index: 1000;
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
@@ -1020,3 +1020,268 @@ body.right-panel-open .auth-widget {
|
||||
border-bottom: 1px solid #e2e8f0;
|
||||
}
|
||||
|
||||
|
||||
/* ============================================================
|
||||
DASHBOARD STYLES
|
||||
============================================================ */
|
||||
|
||||
#dashboardModal .modal-content {
|
||||
width: min(920px, 96vw);
|
||||
max-height: 90vh;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
#dashboardModal .modal-header {
|
||||
background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
|
||||
border-radius: 12px 12px 0 0;
|
||||
padding: 18px 20px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
#dashboardModal .modal-header h3 {
|
||||
color: white;
|
||||
font-size: 17px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.3px;
|
||||
}
|
||||
|
||||
#dashboardModal .modal-close {
|
||||
color: rgba(255,255,255,0.7);
|
||||
font-size: 22px;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
#dashboardModal .modal-close:hover { color: white; }
|
||||
|
||||
#dashboardBody {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
background: #f1f5f9;
|
||||
}
|
||||
|
||||
.db-loading {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 14px;
|
||||
padding: 60px 0;
|
||||
color: #6b7280;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.db-spinner {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border: 3px solid #e2e8f0;
|
||||
border-top-color: #6366f1;
|
||||
border-radius: 50%;
|
||||
animation: dbSpin 0.7s linear infinite;
|
||||
}
|
||||
@keyframes dbSpin { to { transform: rotate(360deg); } }
|
||||
|
||||
.db-error {
|
||||
text-align: center;
|
||||
color: #ef4444;
|
||||
padding: 40px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.db-ibadah-header {
|
||||
background: linear-gradient(135deg, #312e81, #4338ca);
|
||||
border-radius: 14px;
|
||||
padding: 16px 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
color: white;
|
||||
box-shadow: 0 4px 20px rgba(67,56,202,0.3);
|
||||
}
|
||||
|
||||
.db-ibadah-emoji { font-size: 36px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); }
|
||||
.db-ibadah-name { font-size: 18px; font-weight: 700; }
|
||||
.db-ibadah-meta { font-size: 12px; color: rgba(255,255,255,0.75); margin-top: 3px; }
|
||||
|
||||
.db-kpi-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.db-kpi-card {
|
||||
background: white;
|
||||
border-radius: 16px;
|
||||
padding: 18px 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.06);
|
||||
transition: transform 0.2s, box-shadow 0.2s;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.db-kpi-card::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0; left: 0; right: 0;
|
||||
height: 4px;
|
||||
border-radius: 16px 16px 0 0;
|
||||
}
|
||||
|
||||
.kpi-ibadah::before { background: linear-gradient(90deg, #f97316, #ea580c); }
|
||||
.kpi-miskin::before { background: linear-gradient(90deg, #ef4444, #dc2626); }
|
||||
.kpi-jiwa::before { background: linear-gradient(90deg, #6366f1, #4f46e5); }
|
||||
.kpi-log::before { background: linear-gradient(90deg, #22c55e, #16a34a); }
|
||||
|
||||
.db-kpi-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
|
||||
|
||||
.db-kpi-icon { font-size: 28px; line-height: 1; margin-bottom: 2px; }
|
||||
.db-kpi-val { font-size: 32px; font-weight: 800; color: #1e1e2e; line-height: 1; }
|
||||
.db-kpi-label { font-size: 11px; font-weight: 600; color: #6b7280; text-align: center; text-transform: uppercase; letter-spacing: 0.4px; }
|
||||
|
||||
.db-section {
|
||||
background: white;
|
||||
border-radius: 14px;
|
||||
padding: 16px 18px;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.06);
|
||||
}
|
||||
|
||||
.db-section-title {
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
color: #374151;
|
||||
margin-bottom: 12px;
|
||||
letter-spacing: 0.2px;
|
||||
}
|
||||
|
||||
.db-coverage-labels {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 13px;
|
||||
color: #374151;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.db-progress-bar {
|
||||
height: 12px;
|
||||
background: #fee2e2;
|
||||
border-radius: 99px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.db-progress-fill {
|
||||
height: 100%;
|
||||
border-radius: 99px;
|
||||
transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
.db-charts-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.db-chart-card {
|
||||
background: white;
|
||||
border-radius: 14px;
|
||||
padding: 14px 16px;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.06);
|
||||
}
|
||||
|
||||
.db-chart-wide { grid-column: 1 / -1; }
|
||||
|
||||
.db-chart-title {
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
color: #374151;
|
||||
margin-bottom: 12px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.4px;
|
||||
}
|
||||
|
||||
.db-chart-card canvas { width: 100% !important; display: block; }
|
||||
|
||||
.db-log-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
max-height: 260px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.db-log-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 10px;
|
||||
padding: 10px 12px;
|
||||
background: #f8fafc;
|
||||
border-radius: 10px;
|
||||
transition: background 0.15s;
|
||||
}
|
||||
|
||||
.db-log-item:hover { background: #f1f5f9; }
|
||||
|
||||
.db-log-dot {
|
||||
width: 8px; height: 8px;
|
||||
border-radius: 50%;
|
||||
background: #6366f1;
|
||||
flex-shrink: 0;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.db-log-info { flex: 1; min-width: 0; }
|
||||
|
||||
.db-log-main {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: #1e1e2e;
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.db-log-tipe {
|
||||
background: #ede9fe;
|
||||
color: #4f46e5;
|
||||
padding: 1px 7px;
|
||||
border-radius: 99px;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.db-log-kk { color: #374151; }
|
||||
|
||||
.db-log-meta { font-size: 10px; color: #9ca3af; margin-top: 3px; }
|
||||
|
||||
.db-table-wrap {
|
||||
overflow-x: auto;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #e5e7eb;
|
||||
}
|
||||
|
||||
.db-table { width: 100%; border-collapse: collapse; font-size: 13px; }
|
||||
.db-table thead tr { background: #f8fafc; }
|
||||
.db-table th { padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: 0.4px; border-bottom: 1px solid #e5e7eb; }
|
||||
.db-table td { padding: 10px 14px; color: #374151; border-bottom: 1px solid #f3f4f6; }
|
||||
.db-table tbody tr:last-child td { border-bottom: none; }
|
||||
.db-table tbody tr:hover td { background: #f8fafc; }
|
||||
|
||||
.db-badge {
|
||||
background: linear-gradient(135deg, #6366f1, #4f46e5);
|
||||
color: white;
|
||||
padding: 2px 9px;
|
||||
border-radius: 99px;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.db-empty { text-align: center; color: #aaa; font-size: 13px; padding: 20px; }
|
||||
|
||||
Reference in New Issue
Block a user