-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchecking_system_1_district.html
More file actions
281 lines (264 loc) · 17.2 KB
/
Copy pathchecking_system_1_district.html
File metadata and controls
281 lines (264 loc) · 17.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>District Overview · 4Set Checking System</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="assets/js/tailwind.config.js"></script>
<link rel="stylesheet" href="assets/css/theme_pantone_light_1.css" />
<link rel="stylesheet" href="assets/css/index.css" />
<link rel="stylesheet" href="assets/css/global.css" />
<link rel="icon" type="image/x-icon" href="assets/favicon.ico" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono&family=Noto+Sans+TC&display=swap" rel="stylesheet" />
<script src="https://unpkg.com/lucide@latest/dist/umd/lucide.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/localforage@1.10.0/dist/localforage.min.js"></script>
<style>
.status-circle {
width: 14px;
height: 14px;
border-radius: 9999px;
display: inline-flex;
align-items: center;
justify-content: center;
position: relative;
}
.status-circle::after {
content: '';
width: 6px;
height: 6px;
border-radius: 9999px;
background-color: rgba(255, 255, 255, 0.85);
}
.status-green { background-color: #22c55e; }
.status-yellow { background-color: #fbbf24; }
.status-red { background-color: #ef4444; }
.status-grey { background-color: #cbd5e1; }
.group-chevron {
transition: transform 0.2s ease;
}
</style>
</head>
<body class="min-h-screen hero-background">
<div class="relative overflow-hidden">
<!-- Animated Background Elements -->
<div id="background-circles"></div>
<div class="absolute inset-x-0 top-0 h-32 bg-gradient-to-b from-white/70 to-transparent"></div>
<header class="relative z-20 bg-white/80 backdrop-blur-md border-b border-[color:var(--border)] shadow-sm sticky top-0">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex items-center justify-between h-16">
<div class="flex items-center gap-3">
<a href="index.html" title="Return to 4Set Entry Point" class="p-2 rounded-full hover:bg-[color:var(--muted)] text-[color:var(--muted-foreground)] hover:text-[color:var(--primary)] transition-colors">
<i data-lucide="home" class="w-4 h-4"></i>
</a>
<button onclick="window.history.back()" class="hero-button secondary-button text-xs font-medium rounded-md px-3 py-1.5 inline-flex items-center gap-1.5">
<i data-lucide="arrow-left" class="w-3.5 h-3.5"></i>
<span>Back</span>
</button>
<nav class="breadcrumb-nav text-xs text-[color:var(--muted-foreground)] flex items-center gap-1.5 font-mono">
<span class="breadcrumb-district px-2 py-1 rounded bg-blue-50 text-blue-700 font-semibold" id="district-name">—</span>
</nav>
</div>
<div class="flex items-center gap-2">
<button id="validate-button" class="hero-button secondary-button text-xs font-medium rounded-md px-3 py-1.5 inline-flex items-center gap-1.5" title="Validate cache data vs display">
<i data-lucide="shield-check" class="w-3.5 h-3.5 flex-shrink-0"></i>
<span>Validate</span>
</button>
<button id="export-button" class="hero-button secondary-button text-xs font-medium rounded-md px-3 py-1.5 inline-flex items-center gap-1.5">
<i data-lucide="download" class="w-3.5 h-3.5 flex-shrink-0"></i>
<span>Export</span>
</button>
<a href="checking_system_home.html" class="text-sm text-[color:var(--primary)] hover:underline">New Search</a>
</div>
</div>
</div>
</header>
<main class="relative z-10 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6 space-y-4">
<!-- District Overview Card -->
<details class="entry-card p-6 lg:p-8 border-l-4 border-l-[color:var(--primary)]">
<summary class="cursor-pointer list-none">
<div class="flex items-center justify-between">
<div>
<h1 class="text-2xl font-bold text-[color:var(--foreground)] mb-2">District Overview: <span id="district-title">Loading...</span></h1>
<p class="text-sm text-[color:var(--muted-foreground)]" id="district-context">All schools in this district</p>
</div>
<span class="text-xs text-[color:var(--muted-foreground)]">Tap to expand/collapse</span>
</div>
</summary>
<!-- Summary Metrics -->
<div class="mt-6 grid grid-cols-2 md:grid-cols-4 gap-4">
<div class="bg-gradient-to-br from-white to-blue-50 rounded-lg border border-blue-200 p-4 shadow-sm">
<h3 class="text-xs text-[color:var(--muted-foreground)] font-medium">Total Schools</h3>
<div class="flex items-baseline gap-2 mt-1">
<span class="text-2xl font-semibold text-[color:var(--foreground)]" id="total-schools">0</span>
</div>
</div>
<div class="bg-gradient-to-br from-white to-green-50 rounded-lg border border-green-200 p-4 shadow-sm">
<h3 class="text-xs text-[color:var(--muted-foreground)] font-medium">Total Students</h3>
<div class="flex items-baseline gap-2 mt-1">
<span class="text-2xl font-semibold text-[color:var(--foreground)]" id="total-students">0</span>
</div>
</div>
<div class="bg-gradient-to-br from-white to-purple-50 rounded-lg border border-purple-200 p-4 shadow-sm">
<h3 class="text-xs text-[color:var(--muted-foreground)] font-medium">Avg Completion</h3>
<div class="flex items-baseline gap-2 mt-1">
<span class="text-2xl font-semibold text-[color:var(--foreground)]" id="avg-completion">—%</span>
</div>
</div>
<div class="bg-gradient-to-br from-white to-amber-50 rounded-lg border border-amber-200 p-4 shadow-sm">
<h3 class="text-xs text-[color:var(--muted-foreground)] font-medium">Groups</h3>
<div class="flex items-baseline gap-2 mt-1">
<span class="text-sm font-medium text-[color:var(--foreground)]" id="district-groups">—</span>
</div>
</div>
</div>
</details>
<!-- Task Progress (District) -->
<section class="entry-card border-l-4 border-l-[color:var(--accent)]">
<div class="p-4 lg:p-6 border-b border-[color:var(--border)]">
<div class="flex flex-col lg:flex-row lg:items-center lg:justify-between gap-3">
<div>
<h2 class="text-sm font-semibold text-[color:var(--foreground)]">
Task Progress (District)
</h2>
<p class="text-xs text-[color:var(--muted-foreground)] mt-1">
Schools grouped by assignment, showing class completion status
</p>
</div>
<div class="flex items-center gap-2">
<div class="flex items-center gap-2 text-xs">
<label for="view-filter" class="font-medium text-[color:var(--foreground)]">View</label>
<select id="view-filter" name="view-filter" class="px-2 py-1 border border-[color:var(--border)] rounded-md bg-white text-xs text-[color:var(--foreground)] shadow-sm focus:outline-none focus:ring-2 focus:ring-[color:var(--ring)]">
<option value="all" selected>All</option>
<option value="complete">Complete</option>
<option value="incomplete">Incomplete</option>
<option value="notstarted">Not Started</option>
</select>
</div>
<button id="filter-button" class="hero-button btn-secondary filter-button relative">
<i data-lucide="sliders-horizontal"></i>
<span>Grade Filter</span>
<span id="filter-badge" class="hidden absolute -top-1 -right-1 w-4 h-4 bg-blue-600 text-white text-[10px] font-bold rounded-full flex items-center justify-center">0</span>
</button>
</div>
</div>
<!-- Status Lights -->
<div class="flex items-center gap-3 text-xs text-[color:var(--muted-foreground)] mt-3 pt-3 border-t border-[color:var(--border)]">
<span class="inline-flex items-center gap-1"><span class="status-circle status-green"></span>Complete</span>
<span class="inline-flex items-center gap-1"><span class="status-circle status-red"></span>Incomplete</span>
<span class="inline-flex items-center gap-1"><span class="status-circle status-grey"></span>Not Started</span>
</div>
</div>
<div id="schools-by-group-container" class="divide-y divide-[color:var(--border)]">
<!-- Schools grouped by group will be dynamically populated here -->
</div>
</section>
</main>
</div>
<!-- Grade Filter Modal -->
<div id="filter-modal" class="fixed inset-0 z-50 hidden items-center justify-center bg-black/40 backdrop-blur-sm px-4">
<div class="w-full max-w-md space-y-4 rounded-2xl bg-gradient-to-br from-white to-slate-50 p-6 shadow-2xl ring-1 ring-black/5">
<!-- Header -->
<div class="flex items-start justify-between pb-3 border-b border-slate-200">
<div>
<h3 class="text-lg font-bold text-slate-900 flex items-center gap-2">
<i data-lucide="filter" class="w-5 h-5 text-[color:var(--primary)]"></i>
Grade Filter
</h3>
<p class="text-xs text-slate-600 mt-1">Select grades to filter schools</p>
</div>
<button id="filter-close" class="rounded-full p-2 hover:bg-slate-100 transition-colors">
<i data-lucide="x" class="w-4 h-4 text-slate-500"></i>
</button>
</div>
<!-- Filter Options -->
<div class="space-y-2">
<label class="flex items-center gap-3 p-3 rounded-lg border border-slate-200 hover:bg-slate-50 transition-colors cursor-pointer">
<input type="checkbox" value="K1" class="w-4 h-4 text-blue-600 border-slate-300 rounded focus:ring-blue-500">
<span class="text-sm font-medium text-slate-900">K1 (Kindergarten Year 1)</span>
</label>
<label class="flex items-center gap-3 p-3 rounded-lg border border-slate-200 hover:bg-slate-50 transition-colors cursor-pointer">
<input type="checkbox" value="K2" class="w-4 h-4 text-blue-600 border-slate-300 rounded focus:ring-blue-500">
<span class="text-sm font-medium text-slate-900">K2 (Kindergarten Year 2)</span>
</label>
<label class="flex items-center gap-3 p-3 rounded-lg border border-slate-200 hover:bg-slate-50 transition-colors cursor-pointer">
<input type="checkbox" value="K3" class="w-4 h-4 text-blue-600 border-slate-300 rounded focus:ring-blue-500">
<span class="text-sm font-medium text-slate-900">K3 (Kindergarten Year 3)</span>
</label>
<label class="flex items-center gap-3 p-3 rounded-lg border border-slate-200 hover:bg-slate-50 transition-colors cursor-pointer">
<input type="checkbox" value="Others" class="w-4 h-4 text-blue-600 border-slate-300 rounded focus:ring-blue-500">
<span class="text-sm font-medium text-slate-900">Others</span>
</label>
</div>
<!-- Actions -->
<div class="flex items-center justify-end gap-3 pt-3 border-t border-slate-200">
<button id="filter-reset" class="px-4 py-2 text-xs font-semibold rounded-lg bg-white text-slate-700 border border-slate-300 hover:bg-slate-50 transition-colors">
Reset
</button>
<button id="filter-apply" class="px-4 py-2 text-xs font-semibold rounded-lg bg-gradient-to-r from-blue-600 to-blue-700 text-white hover:from-blue-700 hover:to-blue-800 transition-all shadow-md hover:shadow-lg">
Apply Filter
</button>
</div>
</div>
</div>
<script src="assets/js/encryption.js"></script>
<script src="assets/js/checking-system-data-loader.js"></script>
<script src="assets/js/checking-system-preferences.js"></script><!-- User preferences manager -->
<script src="assets/js/task-validator.js"></script>
<script src="assets/js/cache-validator.js"></script><!-- Cache validation utility -->
<script src="assets/js/jotform-cache.js"></script>
<script src="assets/js/export-utils.js"></script>
<script src="assets/js/checking-system-district-page.js"></script>
<script>
// Load background animation config and render
(async () => {
try {
const response = await fetch('config/checking_system_config.json');
const config = await response.json();
if (config.backgroundAnimation) {
const container = document.getElementById('background-circles');
if (!container) return;
let html = '<div class="fixed inset-0 pointer-events-none z-0">';
// Add circles
if (config.backgroundAnimation.circles) {
config.backgroundAnimation.circles.forEach(circle => {
const positionStyles = Object.entries(circle.position)
.map(([key, value]) => `${key}: ${value}`)
.join('; ');
const sizeStyles = Object.entries(circle.size)
.map(([key, value]) => `${key}: ${value}`)
.join('; ');
html += `<div class="absolute rounded-full border ${circle.animation}"
style="${positionStyles}; ${sizeStyles};
border-color: ${circle.color};
animation-duration: ${circle.animationDuration};
animation-delay: ${circle.animationDelay};"></div>`;
});
}
// Add blobs
if (config.backgroundAnimation.blobs) {
config.backgroundAnimation.blobs.forEach(blob => {
const positionStyles = Object.entries(blob.position)
.map(([key, value]) => `${key}: ${value}`)
.join('; ');
const sizeStyles = Object.entries(blob.size)
.map(([key, value]) => `${key}: ${value}`)
.join('; ');
html += `<div class="absolute rounded-full"
style="${positionStyles}; ${sizeStyles};
background-color: ${blob.color};
filter: blur(${blob.blur});"></div>`;
});
}
html += '</div>';
container.innerHTML = html;
}
} catch (error) {
console.error('[DistrictPage] Failed to load background animation config:', error);
}
})();
</script>
</body>
</html>