dataquantals commited on
Commit
124c208
·
verified ·
1 Parent(s): a871d6b

undefined - Initial Deployment

Browse files
Files changed (1) hide show
  1. index.html +364 -394
index.html CHANGED
@@ -3,62 +3,72 @@
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Transcriber - Quantals Collect</title>
7
  <script src="https://cdn.tailwindcss.com"></script>
8
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
- <!-- Wavesurfer.js for audio visualization -->
10
- <script src="https://unpkg.com/wavesurfer.js@6.6.3"></script>
11
- <!-- CodeMirror for rich text editing -->
12
- <link href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/codemirror.min.css" rel="stylesheet">
13
- <link href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/theme/monokai.min.css" rel="stylesheet">
14
- <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/codemirror.min.js"></script>
15
- <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/markdown/markdown.min.js"></script>
16
  <style>
17
- .sidebar {
18
- transition: all 0.3s ease;
 
 
 
 
 
 
 
19
  }
20
- .waveform-container {
21
- background: linear-gradient(90deg, #03045e, #accd5a, #fb5607);
22
- background-size: 400% 400%;
23
- animation: gradient 5s ease infinite;
24
  }
25
- @keyframes gradient {
26
- 0% { background-position: 0% 50%; }
27
- 50% { background-position: 100% 50%; }
28
- 100% { background-position: 0% 50%; }
29
  }
30
- .CodeMirror {
31
- height: calc(100vh - 400px);
32
- border: 1px solid #e5e7eb;
33
- border-radius: 0.5rem;
34
  }
35
- .loading-dots::after {
36
- content: '...';
37
- animation: dots 1.5s steps(5, end) infinite;
 
38
  }
39
- @keyframes dots {
40
- 0%, 20% { content: '.'; }
41
- 40% { content: '..'; }
42
- 60% { content: '...'; }
43
- 80%, 100% { content: ''; }
44
  }
45
- .fade-in {
46
- animation: fadeIn 0.3s ease-in;
 
47
  }
48
- @keyframes fadeIn {
49
- from { opacity: 0; }
50
- to { opacity: 1; }
 
 
 
 
 
 
 
 
 
 
51
  }
52
- .transcription-mode {
53
- transition: all 0.3s ease;
54
  }
55
- .transcription-mode.active {
56
- background-color: #4f46e5;
57
- color: white;
 
 
 
 
 
58
  }
59
  </style>
60
  </head>
61
- <body class="bg-gray-50">
62
  <div class="flex h-screen overflow-hidden">
63
  <!-- Sidebar -->
64
  <div class="sidebar bg-indigo-800 text-white w-64 flex flex-col">
@@ -70,7 +80,7 @@
70
  </div>
71
 
72
  <nav class="flex-1 p-4 space-y-2">
73
- <a href="dashboard.html" class="flex items-center space-x-3 p-2 rounded-lg text-indigo-200 hover:bg-indigo-700 hover:text-white">
74
  <i class="fas fa-home"></i>
75
  <span>Dashboard</span>
76
  </a>
@@ -98,7 +108,7 @@
98
  <i class="fas fa-robot"></i>
99
  <span>AI Assist</span>
100
  </a>
101
- <a href="transcriber.html" class="flex items-center space-x-3 p-2 rounded-lg bg-indigo-700 text-white">
102
  <i class="fas fa-keyboard"></i>
103
  <span>Transcriber</span>
104
  </a>
@@ -112,423 +122,383 @@
112
  </div>
113
  </div>
114
 
115
- <!-- Main Content Area -->
116
  <div class="flex-1 flex flex-col overflow-hidden">
117
  <!-- Header -->
118
- <header class="bg-white shadow-sm p-4">
119
- <div class="max-w-7xl mx-auto">
120
- <h1 class="text-2xl font-bold text-gray-900">Transcriber</h1>
121
- <p class="mt-1 text-sm text-gray-600">
122
- Transcribe interviews, field recordings, or videos manually or with AI.
123
- </p>
124
  </div>
125
- </header>
126
-
127
- <!-- Main Content -->
128
- <div class="flex-1 flex flex-col overflow-hidden">
129
- <!-- Mode Toggle -->
130
- <div class="bg-white border-b border-gray-200">
131
- <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
132
- <div class="flex space-x-4">
133
- <button id="manual-mode" class="transcription-mode px-4 py-2 rounded-lg text-gray-600 hover:bg-gray-100 active">
134
- <i class="fas fa-keyboard mr-2"></i>Manual Transcription
135
- </button>
136
- <button id="ai-mode" class="transcription-mode px-4 py-2 rounded-lg text-gray-600 hover:bg-gray-100">
137
- <i class="fas fa-robot mr-2"></i>AI Transcription
138
- </button>
139
  </div>
 
140
  </div>
141
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
 
143
- <!-- Workspace -->
144
- <div class="flex-1 p-4 overflow-y-auto">
145
- <div class="max-w-7xl mx-auto">
146
- <!-- Manual Transcription Workspace -->
147
- <div id="manual-workspace" class="space-y-4">
148
- <!-- Upload Media -->
149
- <div class="bg-white rounded-lg shadow-sm p-4">
150
- <div class="flex justify-between items-center mb-4">
151
- <h3 class="text-lg font-semibold text-gray-800">Upload Media</h3>
152
  </div>
153
-
154
- <div class="border-2 border-dashed border-gray-300 rounded-lg p-8 text-center">
155
- <input type="file" id="manual-media-upload" class="hidden" accept=".mp3,.wav,.mp4">
156
- <label for="manual-media-upload" class="cursor-pointer">
157
- <i class="fas fa-cloud-upload-alt text-4xl text-gray-400 mb-2"></i>
158
- <p class="text-gray-600">Drag and drop your audio/video file here or click to browse</p>
159
- <p class="text-sm text-gray-500 mt-1">Max file size: 100MB</p>
160
- </label>
161
  </div>
162
  </div>
 
 
163
 
164
- <!-- Audio Player -->
165
- <div class="bg-white rounded-lg shadow-sm p-4">
166
- <div class="flex justify-between items-center mb-4">
167
- <h3 class="text-lg font-semibold text-gray-800">Audio Player</h3>
168
- <div class="flex items-center space-x-2">
169
- <select id="playback-speed" class="px-2 py-1 text-sm border border-gray-300 rounded-lg">
170
- <option value="0.5">0.5x</option>
171
- <option value="0.75">0.75x</option>
172
- <option value="1" selected>1x</option>
173
- <option value="1.25">1.25x</option>
174
- <option value="1.5">1.5x</option>
175
- <option value="2">2x</option>
176
- </select>
177
- </div>
178
  </div>
179
-
180
- <div class="waveform-container h-24 rounded-lg mb-4" id="waveform"></div>
181
-
182
- <div class="flex justify-center space-x-4">
183
- <button class="p-2 bg-gray-100 rounded-full hover:bg-gray-200" id="skip-backward">
184
- <i class="fas fa-step-backward text-gray-600"></i>
185
- </button>
186
- <button class="p-2 bg-gray-100 rounded-full hover:bg-gray-200" id="play-pause">
187
- <i class="fas fa-play text-gray-600"></i>
188
- </button>
189
- <button class="p-2 bg-gray-100 rounded-full hover:bg-gray-200" id="skip-forward">
190
- <i class="fas fa-step-forward text-gray-600"></i>
191
- </button>
192
  </div>
 
 
 
193
 
194
- <div class="mt-4 flex justify-between items-center text-sm text-gray-500">
195
- <span id="current-time">00:00</span>
196
- <span id="duration">00:00</span>
 
 
 
 
 
 
197
  </div>
198
  </div>
 
 
199
 
200
- <!-- Transcription Editor -->
201
- <div class="bg-white rounded-lg shadow-sm p-4">
202
- <div class="flex justify-between items-center mb-4">
203
- <h3 class="text-lg font-semibold text-gray-800">Transcription</h3>
204
- <div class="flex items-center space-x-2">
205
- <button id="insert-timestamp" class="px-3 py-1 text-sm text-gray-600 hover:bg-gray-100 rounded-lg">
206
- <i class="fas fa-clock mr-1"></i>Insert Timestamp
207
- </button>
208
- <button id="save-draft" class="px-3 py-1 text-sm text-gray-600 hover:bg-gray-100 rounded-lg">
209
- <i class="fas fa-save mr-1"></i>Save Draft
210
- </button>
211
- <button id="export-transcript" class="px-3 py-1 text-sm text-gray-600 hover:bg-gray-100 rounded-lg">
212
- <i class="fas fa-download mr-1"></i>Export
213
- </button>
214
- </div>
215
  </div>
216
- <textarea id="transcription-editor" class="w-full h-64 p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500"></textarea>
 
 
217
  </div>
218
  </div>
219
 
220
- <!-- AI Transcription Workspace -->
221
- <div id="ai-workspace" class="hidden space-y-4">
222
- <!-- File Upload -->
223
- <div class="bg-white rounded-lg shadow-sm p-4">
224
- <div class="flex justify-between items-center mb-4">
225
- <h3 class="text-lg font-semibold text-gray-800">Upload Media</h3>
226
- <div class="flex items-center space-x-2">
227
- <select id="language-select" class="px-3 py-1 text-sm border border-gray-300 rounded-lg">
228
- <option value="en">English</option>
229
- <option value="es">Spanish</option>
230
- <option value="fr">French</option>
231
- <option value="de">German</option>
232
- <option value="zh">Chinese</option>
233
- </select>
234
- </div>
235
  </div>
236
-
237
- <div class="border-2 border-dashed border-gray-300 rounded-lg p-8 text-center">
238
- <input type="file" id="media-upload" class="hidden" accept=".mp3,.wav,.mp4">
239
- <label for="media-upload" class="cursor-pointer">
240
- <i class="fas fa-cloud-upload-alt text-4xl text-gray-400 mb-2"></i>
241
- <p class="text-gray-600">Drag and drop your audio/video file here or click to browse</p>
242
- <p class="text-sm text-gray-500 mt-1">Max file size: 100MB</p>
243
- </label>
244
  </div>
245
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
246
 
247
- <!-- AI Options -->
248
- <div class="bg-white rounded-lg shadow-sm p-4">
249
- <h3 class="text-lg font-semibold text-gray-800 mb-4">AI Enhancement Options</h3>
250
- <div class="grid grid-cols-2 gap-4">
251
- <button class="p-3 border border-gray-200 rounded-lg hover:bg-gray-50">
252
- <i class="fas fa-brain text-indigo-600 mr-2"></i>Summarize Transcript
253
- </button>
254
- <button class="p-3 border border-gray-200 rounded-lg hover:bg-gray-50">
255
- <i class="fas fa-tags text-indigo-600 mr-2"></i>Generate Speaker Labels
256
- </button>
257
- <button class="p-3 border border-gray-200 rounded-lg hover:bg-gray-50">
258
- <i class="fas fa-language text-indigo-600 mr-2"></i>Translate to English
259
- </button>
260
- <button class="p-3 border border-gray-200 rounded-lg hover:bg-gray-50">
261
- <i class="fas fa-search text-indigo-600 mr-2"></i>Highlight Keywords
262
- </button>
263
  </div>
264
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
 
266
- <!-- Output Panel -->
267
- <div class="bg-white rounded-lg shadow-sm p-4">
268
- <div class="flex justify-between items-center mb-4">
269
- <h3 class="text-lg font-semibold text-gray-800">Transcription Output</h3>
270
- <div class="flex items-center space-x-2">
271
- <button id="copy-output" class="px-3 py-1 text-sm text-gray-600 hover:bg-gray-100 rounded-lg">
272
- <i class="fas fa-copy mr-1"></i>Copy
273
- </button>
274
- <button id="download-output" class="px-3 py-1 text-sm text-gray-600 hover:bg-gray-100 rounded-lg">
275
- <i class="fas fa-download mr-1"></i>Download
276
- </button>
 
 
 
 
 
 
 
 
 
277
  </div>
278
  </div>
279
- <div id="ai-output" class="w-full min-h-64 p-3 border border-gray-300 rounded-lg bg-gray-50"></div>
280
  </div>
281
  </div>
282
  </div>
283
  </div>
284
- </div>
285
  </div>
286
  </div>
287
 
288
- <!-- Scripts -->
289
  <script>
290
- // Initialize WaveSurfer
291
- const wavesurfer = WaveSurfer.create({
292
- container: '#waveform',
293
- waveColor: '#4f46e5',
294
- progressColor: '#818cf8',
295
- cursorColor: '#1e40af',
296
- barWidth: 2,
297
- barRadius: 3,
298
- responsive: true,
299
- height: 80
300
- });
301
-
302
- // Get editor element
303
- const editor = document.getElementById('transcription-editor');
304
-
305
- // Mode Toggle
306
- const manualMode = document.getElementById('manual-mode');
307
- const aiMode = document.getElementById('ai-mode');
308
- const manualWorkspace = document.getElementById('manual-workspace');
309
- const aiWorkspace = document.getElementById('ai-workspace');
310
-
311
- manualMode.addEventListener('click', () => {
312
- manualMode.classList.add('active');
313
- aiMode.classList.remove('active');
314
- manualWorkspace.classList.remove('hidden');
315
- aiWorkspace.classList.add('hidden');
316
- });
317
-
318
- aiMode.addEventListener('click', () => {
319
- aiMode.classList.add('active');
320
- manualMode.classList.remove('active');
321
- aiWorkspace.classList.remove('hidden');
322
- manualWorkspace.classList.add('hidden');
323
- });
324
-
325
- // Audio Controls
326
- const playPauseBtn = document.getElementById('play-pause');
327
- const skipForwardBtn = document.getElementById('skip-forward');
328
- const skipBackwardBtn = document.getElementById('skip-backward');
329
- const playbackSpeed = document.getElementById('playback-speed');
330
- const currentTime = document.getElementById('current-time');
331
- const duration = document.getElementById('duration');
332
-
333
- playPauseBtn.addEventListener('click', () => {
334
- wavesurfer.playPause();
335
- const icon = playPauseBtn.querySelector('i');
336
- icon.classList.toggle('fa-play');
337
- icon.classList.toggle('fa-pause');
338
- });
339
-
340
- skipForwardBtn.addEventListener('click', () => {
341
- wavesurfer.skip(10);
342
- });
343
-
344
- skipBackwardBtn.addEventListener('click', () => {
345
- wavesurfer.skip(-10);
346
- });
347
-
348
- playbackSpeed.addEventListener('change', (e) => {
349
- wavesurfer.setPlaybackRate(parseFloat(e.target.value));
350
- });
351
 
352
- wavesurfer.on('ready', () => {
353
- duration.textContent = formatTime(wavesurfer.getDuration());
354
- });
355
 
356
- wavesurfer.on('audioprocess', () => {
357
- currentTime.textContent = formatTime(wavesurfer.getCurrentTime());
358
- });
 
 
 
 
 
 
 
359
 
360
- // Format time
361
- function formatTime(time) {
362
- const minutes = Math.floor(time / 60);
363
- const seconds = Math.floor(time % 60);
364
- return `${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
365
  }
366
 
367
- // Insert timestamp
368
- document.getElementById('insert-timestamp').addEventListener('click', () => {
369
- const time = formatTime(wavesurfer.getCurrentTime());
370
- const start = editor.selectionStart;
371
- const end = editor.selectionEnd;
372
- const text = editor.value;
373
- editor.value = text.substring(0, start) + `[${time}] ` + text.substring(end);
374
- editor.focus();
375
- editor.setSelectionRange(start + `[${time}] `.length, start + `[${time}] `.length);
376
  });
377
 
378
- // Keyboard shortcuts
379
- document.addEventListener('keydown', (e) => {
380
- if (e.code === 'Space' && !e.target.matches('textarea, input')) {
381
- e.preventDefault();
382
- playPauseBtn.click();
383
- }
384
- if (e.ctrlKey && e.code === 'KeyB') {
385
- e.preventDefault();
386
- document.getElementById('insert-timestamp').click();
387
- }
388
  });
389
 
390
- // File upload handling
391
- const mediaUpload = document.getElementById('media-upload');
392
- const manualMediaUpload = document.getElementById('manual-media-upload');
393
-
394
- function handleMediaUpload(file) {
395
- if (file.type.startsWith('audio/')) {
396
- wavesurfer.loadBlob(file);
 
 
 
397
  }
398
- handleFileUpload(file);
399
- }
400
 
401
- mediaUpload.addEventListener('change', (e) => {
402
- const file = e.target.files[0];
403
- if (file) {
404
- handleMediaUpload(file);
 
405
  }
406
- });
407
 
408
- manualMediaUpload.addEventListener('change', (e) => {
409
- const file = e.target.files[0];
410
- if (file) {
411
- handleMediaUpload(file);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
412
  }
413
- });
414
 
415
- // Handle file upload for AI transcription
416
- async function handleFileUpload(file) {
417
- const formData = new FormData();
418
- formData.append('file', file);
419
-
420
- try {
421
- const response = await fetch('https://openrouter.ai/api/v1/chat/completions', {
422
- method: 'POST',
423
- headers: {
424
- 'Authorization': 'Bearer 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',
425
- 'Content-Type': 'application/json'
426
- },
427
- body: JSON.stringify({
428
- model: "deepseek-coder:52-r1",
429
- messages: [
430
- {
431
- role: "system",
432
- content: "You are a transcription assistant. Your task is to accurately transcribe audio into clean, readable text, removing filler words, stutters, and repetition unless contextually relevant."
433
- },
434
- {
435
- role: "user",
436
- content: "Transcribe the following audio file: " + file.name
437
- }
438
- ]
439
- })
440
- });
441
-
442
- if (!response.ok) {
443
- throw new Error('Transcription failed');
444
  }
 
445
 
446
- const data = await response.json();
447
- document.getElementById('ai-output').innerHTML = data.choices[0].message.content;
448
- } catch (error) {
449
- console.error('Error:', error);
450
- document.getElementById('ai-output').innerHTML = `
451
- <div class="text-red-600">
452
- <i class="fas fa-exclamation-circle mr-2"></i>
453
- Error: ${error.message}
454
- </div>
455
  `;
456
  }
457
  }
458
 
459
- // Auto-save functionality
460
- let autoSaveTimeout;
461
- editor.addEventListener('input', () => {
462
- clearTimeout(autoSaveTimeout);
463
- autoSaveTimeout = setTimeout(() => {
464
- localStorage.setItem('transcription_draft', editor.value);
465
- }, 30000);
466
- });
467
-
468
- // Load draft on page load
469
- const savedDraft = localStorage.getItem('transcription_draft');
470
- if (savedDraft) {
471
- editor.value = savedDraft;
472
- }
473
-
474
- // Export functionality
475
- document.getElementById('export-transcript').addEventListener('click', () => {
476
- const content = editor.value;
477
- const blob = new Blob([content], { type: 'text/plain' });
478
- const url = window.URL.createObjectURL(blob);
479
- const a = document.createElement('a');
480
- a.href = url;
481
- a.download = `transcript-${new Date().toISOString()}.txt`;
482
- document.body.appendChild(a);
483
- a.click();
484
- window.URL.revokeObjectURL(url);
485
- document.body.removeChild(a);
486
- });
487
-
488
- // Copy output
489
- document.getElementById('copy-output').addEventListener('click', () => {
490
- const output = document.getElementById('ai-output').innerText;
491
- navigator.clipboard.writeText(output).then(() => {
492
- const button = document.getElementById('copy-output');
493
- const originalText = button.innerHTML;
494
- button.innerHTML = '<i class="fas fa-check mr-1"></i>Copied!';
495
- setTimeout(() => {
496
- button.innerHTML = originalText;
497
- }, 2000);
498
- });
499
  });
500
 
501
- // Download output
502
- document.getElementById('download-output').addEventListener('click', () => {
503
- const output = document.getElementById('ai-output').innerText;
504
- const blob = new Blob([output], { type: 'text/plain' });
505
- const url = window.URL.createObjectURL(blob);
506
- const a = document.createElement('a');
507
- a.href = url;
508
- a.download = `ai-transcript-${new Date().toISOString()}.txt`;
509
- document.body.appendChild(a);
510
- a.click();
511
- window.URL.revokeObjectURL(url);
512
- document.body.removeChild(a);
513
  });
514
 
515
- // Check online status
516
- window.addEventListener('online', () => {
517
- document.getElementById('ai-mode').disabled = false;
518
- });
 
 
519
 
520
- window.addEventListener('offline', () => {
521
- document.getElementById('ai-mode').disabled = true;
522
- document.getElementById('ai-output').innerHTML = `
523
- <div class="text-red-600">
524
- <i class="fas fa-wifi-slash mr-2"></i>
525
- No internet connection. Please check your network.
526
- </div>
527
- `;
528
  });
529
 
530
- // Initialize
531
- manualMode.click();
532
  </script>
533
  <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://deepsite.hf.co/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://deepsite.hf.co" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://deepsite.hf.co?remix=dataquantals/quantals-collect" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
534
  </html>
 
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Dashboard - Quantals Collect</title>
7
  <script src="https://cdn.tailwindcss.com"></script>
8
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
 
 
 
 
 
 
 
9
  <style>
10
+ /* Custom styles */
11
+ .timeline-item::before {
12
+ content: '';
13
+ position: absolute;
14
+ left: 0;
15
+ top: 0;
16
+ bottom: 0;
17
+ width: 2px;
18
+ background: #e5e7eb;
19
  }
20
+ .timeline-item:last-child::before {
21
+ height: 50%;
 
 
22
  }
23
+ .storage-meter {
24
+ background: linear-gradient(90deg, #3b82f6 0%, #3b82f6 75%, #e5e7eb 75%, #e5e7eb 100%);
 
 
25
  }
26
+ .offline-indicator {
27
+ animation: pulse 2s infinite;
 
 
28
  }
29
+ @keyframes pulse {
30
+ 0% { opacity: 1; }
31
+ 50% { opacity: 0.5; }
32
+ 100% { opacity: 1; }
33
  }
34
+ .loading-skeleton {
35
+ background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
36
+ background-size: 200% 100%;
37
+ animation: loading 1.5s infinite;
 
38
  }
39
+ @keyframes loading {
40
+ 0% { background-position: 200% 0; }
41
+ 100% { background-position: -200% 0; }
42
  }
43
+
44
+ /* Animated Summary Cards */
45
+ .summary-number {
46
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
47
+ transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.4, 1.1);
48
+ }
49
+ .summary-number.animate {
50
+ animation: numberPulse 0.5s cubic-bezier(0.2, 0.8, 0.4, 1.1);
51
+ }
52
+ @keyframes numberPulse {
53
+ 0% { transform: scale(1); }
54
+ 50% { transform: scale(1.1); }
55
+ 100% { transform: scale(1); }
56
  }
57
+ .summary-card {
58
+ transition: background-color 0.3s ease;
59
  }
60
+ .summary-card.highlight {
61
+ background-color: #e6f7ff;
62
+ }
63
+ .error-value {
64
+ color: #ef4444;
65
+ display: flex;
66
+ align-items: center;
67
+ gap: 0.5rem;
68
  }
69
  </style>
70
  </head>
71
+ <body class="bg-gray-50 font-sans">
72
  <div class="flex h-screen overflow-hidden">
73
  <!-- Sidebar -->
74
  <div class="sidebar bg-indigo-800 text-white w-64 flex flex-col">
 
80
  </div>
81
 
82
  <nav class="flex-1 p-4 space-y-2">
83
+ <a href="index.html" class="flex items-center space-x-3 p-2 rounded-lg bg-indigo-700 text-white">
84
  <i class="fas fa-home"></i>
85
  <span>Dashboard</span>
86
  </a>
 
108
  <i class="fas fa-robot"></i>
109
  <span>AI Assist</span>
110
  </a>
111
+ <a href="transcriber.html" class="flex items-center space-x-3 p-2 rounded-lg text-indigo-200 hover:bg-indigo-700 hover:text-white">
112
  <i class="fas fa-keyboard"></i>
113
  <span>Transcriber</span>
114
  </a>
 
122
  </div>
123
  </div>
124
 
125
+ <!-- Main Content -->
126
  <div class="flex-1 flex flex-col overflow-hidden">
127
  <!-- Header -->
128
+ <header class="bg-white shadow-sm p-4 flex justify-between items-center">
129
+ <div class="flex items-center space-x-4">
130
+ <h2 class="text-xl font-semibold text-gray-800">Dashboard</h2>
131
+ <div class="offline-indicator hidden px-3 py-1 bg-yellow-100 text-yellow-800 rounded-full text-sm">
132
+ <i class="fas fa-wifi-slash mr-1"></i> Offline
133
+ </div>
134
  </div>
135
+ <div class="flex items-center space-x-4">
136
+ <button class="p-2 rounded-full hover:bg-gray-100 relative">
137
+ <i class="fas fa-bell text-gray-600"></i>
138
+ <span class="absolute top-0 right-0 w-2 h-2 bg-red-500 rounded-full"></span>
139
+ </button>
140
+ <div class="flex items-center space-x-2">
141
+ <div class="w-8 h-8 rounded-full bg-indigo-100 flex items-center justify-center">
142
+ <span class="text-xs font-medium text-indigo-800">RS</span>
 
 
 
 
 
 
143
  </div>
144
+ <span class="text-sm">Research Team</span>
145
  </div>
146
  </div>
147
+ </header>
148
+
149
+ <!-- Main Content Area -->
150
+ <main class="flex-1 overflow-y-auto p-6">
151
+ <div class="max-w-7xl mx-auto">
152
+ <!-- Quick Actions -->
153
+ <div class="grid grid-cols-1 md:grid-cols-4 gap-4 mb-6">
154
+ <button class="p-4 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition-colors flex items-center justify-center space-x-2">
155
+ <i class="fas fa-microphone"></i>
156
+ <span>Start New Interview</span>
157
+ </button>
158
+ <button class="p-4 bg-white text-gray-700 rounded-lg hover:bg-gray-50 transition-colors flex items-center justify-center space-x-2 border border-gray-200">
159
+ <i class="fas fa-user-plus"></i>
160
+ <span>Add Participant</span>
161
+ </button>
162
+ <button class="p-4 bg-white text-gray-700 rounded-lg hover:bg-gray-50 transition-colors flex items-center justify-center space-x-2 border border-gray-200">
163
+ <i class="fas fa-folder-plus"></i>
164
+ <span>Create Project</span>
165
+ </button>
166
+ <button class="p-4 bg-white text-gray-700 rounded-lg hover:bg-gray-50 transition-colors flex items-center justify-center space-x-2 border border-gray-200">
167
+ <i class="fas fa-sync"></i>
168
+ <span>Sync Now</span>
169
+ </button>
170
+ </div>
171
 
172
+ <!-- Summary Cards -->
173
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-4 mb-6">
174
+ <!-- Total Projects -->
175
+ <div class="summary-card bg-white rounded-lg shadow-sm p-4">
176
+ <div class="flex items-center justify-between">
177
+ <div>
178
+ <p class="text-sm text-gray-600">Total Projects</p>
179
+ <h3 class="summary-number text-2xl font-semibold text-gray-800" data-value="12">0</h3>
 
180
  </div>
181
+ <div class="p-3 bg-blue-100 rounded-lg">
182
+ <i class="fas fa-project-diagram text-blue-600"></i>
 
 
 
 
 
 
183
  </div>
184
  </div>
185
+ <a href="projects.html" class="text-sm text-blue-600 hover:text-blue-700 mt-2 inline-block">View all projects →</a>
186
+ </div>
187
 
188
+ <!-- Total Participants -->
189
+ <div class="summary-card bg-white rounded-lg shadow-sm p-4">
190
+ <div class="flex items-center justify-between">
191
+ <div>
192
+ <p class="text-sm text-gray-600">Total Participants</p>
193
+ <h3 class="summary-number text-2xl font-semibold text-gray-800" data-value="48">0</h3>
 
 
 
 
 
 
 
 
194
  </div>
195
+ <div class="p-3 bg-green-100 rounded-lg">
196
+ <i class="fas fa-users text-green-600"></i>
 
 
 
 
 
 
 
 
 
 
 
197
  </div>
198
+ </div>
199
+ <a href="participants.html" class="text-sm text-blue-600 hover:text-blue-700 mt-2 inline-block">View all participants →</a>
200
+ </div>
201
 
202
+ <!-- Active Interviews -->
203
+ <div class="summary-card bg-white rounded-lg shadow-sm p-4">
204
+ <div class="flex items-center justify-between">
205
+ <div>
206
+ <p class="text-sm text-gray-600">Active Interviews</p>
207
+ <h3 class="summary-number text-2xl font-semibold text-gray-800" data-value="3">0</h3>
208
+ </div>
209
+ <div class="p-3 bg-purple-100 rounded-lg">
210
+ <i class="fas fa-microphone text-purple-600"></i>
211
  </div>
212
  </div>
213
+ <a href="interviews.html" class="text-sm text-blue-600 hover:text-blue-700 mt-2 inline-block">View active interviews →</a>
214
+ </div>
215
 
216
+ <!-- Storage Usage -->
217
+ <div class="summary-card bg-white rounded-lg shadow-sm p-4">
218
+ <div class="flex items-center justify-between">
219
+ <div>
220
+ <p class="text-sm text-gray-600">Storage Usage</p>
221
+ <h3 class="summary-number text-2xl font-semibold text-gray-800" data-value="75">0</h3>
222
+ </div>
223
+ <div class="p-3 bg-yellow-100 rounded-lg">
224
+ <i class="fas fa-database text-yellow-600"></i>
 
 
 
 
 
 
225
  </div>
226
+ </div>
227
+ <div class="mt-2 h-2 bg-gray-200 rounded-full overflow-hidden">
228
+ <div class="storage-meter h-full rounded-full"></div>
229
  </div>
230
  </div>
231
 
232
+ <!-- Sync Status -->
233
+ <div class="summary-card bg-white rounded-lg shadow-sm p-4">
234
+ <div class="flex items-center justify-between">
235
+ <div>
236
+ <p class="text-sm text-gray-600">Last Sync</p>
237
+ <h3 class="summary-number text-2xl font-semibold text-gray-800" data-value="2">0</h3>
 
 
 
 
 
 
 
 
 
238
  </div>
239
+ <div class="p-3 bg-green-100 rounded-lg">
240
+ <i class="fas fa-sync text-green-600"></i>
 
 
 
 
 
 
241
  </div>
242
  </div>
243
+ <p class="text-sm text-green-600 mt-2">All systems synced</p>
244
+ </div>
245
+ </div>
246
+
247
+ <!-- Main Content Grid -->
248
+ <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
249
+ <!-- Recent Activity Timeline -->
250
+ <div class="lg:col-span-2">
251
+ <div class="bg-white rounded-lg shadow-sm p-6">
252
+ <div class="flex justify-between items-center mb-6">
253
+ <h3 class="text-lg font-semibold text-gray-800">Recent Activity</h3>
254
+ <a href="activity.html" class="text-sm text-blue-600 hover:text-blue-700">View all →</a>
255
+ </div>
256
+
257
+ <div class="space-y-6">
258
+ <!-- Timeline Items -->
259
+ <div class="relative pl-8 timeline-item">
260
+ <div class="absolute left-0 w-4 h-4 bg-blue-500 rounded-full -translate-x-1/2"></div>
261
+ <div class="bg-blue-50 p-4 rounded-lg">
262
+ <div class="flex justify-between items-start">
263
+ <div>
264
+ <h4 class="font-medium text-blue-800">New Interview Session</h4>
265
+ <p class="text-sm text-gray-600">With Maria Gonzalez</p>
266
+ </div>
267
+ <span class="text-xs text-gray-500">10:30 AM</span>
268
+ </div>
269
+ </div>
270
+ </div>
271
+
272
+ <div class="relative pl-8 timeline-item">
273
+ <div class="absolute left-0 w-4 h-4 bg-green-500 rounded-full -translate-x-1/2"></div>
274
+ <div class="bg-green-50 p-4 rounded-lg">
275
+ <div class="flex justify-between items-start">
276
+ <div>
277
+ <h4 class="font-medium text-green-800">Note Added</h4>
278
+ <p class="text-sm text-gray-600">Urban Sustainability Study - Participant observation</p>
279
+ </div>
280
+ <span class="text-xs text-gray-500">9:45 AM</span>
281
+ </div>
282
+ </div>
283
+ </div>
284
 
285
+ <div class="relative pl-8 timeline-item">
286
+ <div class="absolute left-0 w-4 h-4 bg-purple-500 rounded-full -translate-x-1/2"></div>
287
+ <div class="bg-purple-50 p-4 rounded-lg">
288
+ <div class="flex justify-between items-start">
289
+ <div>
290
+ <h4 class="font-medium text-purple-800">System Sync</h4>
291
+ <p class="text-sm text-gray-600">All data synchronized successfully</p>
292
+ </div>
293
+ <span class="text-xs text-gray-500">9:30 AM</span>
294
+ </div>
295
+ </div>
296
+ </div>
 
 
 
 
297
  </div>
298
  </div>
299
+ </div>
300
+
301
+ <!-- Upcoming Schedule -->
302
+ <div class="lg:col-span-1">
303
+ <div class="bg-white rounded-lg shadow-sm p-6">
304
+ <div class="flex justify-between items-center mb-6">
305
+ <h3 class="text-lg font-semibold text-gray-800">Today's Schedule</h3>
306
+ <a href="schedule.html" class="text-sm text-blue-600 hover:text-blue-700">View calendar →</a>
307
+ </div>
308
+
309
+ <div class="space-y-4">
310
+ <!-- Schedule Items -->
311
+ <div class="p-4 bg-red-50 rounded-lg border border-red-100">
312
+ <div class="flex justify-between items-start">
313
+ <div>
314
+ <h4 class="font-medium text-red-800">Interview Session</h4>
315
+ <p class="text-sm text-gray-600">With John Smith</p>
316
+ <p class="text-sm text-gray-500">Urban Sustainability Study</p>
317
+ </div>
318
+ <span class="text-sm font-medium text-red-600">2:00 PM</span>
319
+ </div>
320
+ </div>
321
 
322
+ <div class="p-4 bg-yellow-50 rounded-lg border border-yellow-100">
323
+ <div class="flex justify-between items-start">
324
+ <div>
325
+ <h4 class="font-medium text-yellow-800">Project Deadline</h4>
326
+ <p class="text-sm text-gray-600">Phase 1 Report Due</p>
327
+ <p class="text-sm text-gray-500">Urban Sustainability Study</p>
328
+ </div>
329
+ <span class="text-sm font-medium text-yellow-600">4:00 PM</span>
330
+ </div>
331
+ </div>
332
+
333
+ <div class="p-4 bg-green-50 rounded-lg border border-green-100">
334
+ <div class="flex justify-between items-start">
335
+ <div>
336
+ <h4 class="font-medium text-green-800">Team Meeting</h4>
337
+ <p class="text-sm text-gray-600">Weekly Progress Review</p>
338
+ <p class="text-sm text-gray-500">All Projects</p>
339
+ </div>
340
+ <span class="text-sm font-medium text-green-600">5:00 PM</span>
341
+ </div>
342
  </div>
343
  </div>
 
344
  </div>
345
  </div>
346
  </div>
347
  </div>
348
+ </main>
349
  </div>
350
  </div>
351
 
 
352
  <script>
353
+ // Check online status
354
+ function updateOnlineStatus() {
355
+ const offlineIndicator = document.querySelector('.offline-indicator');
356
+ if (!navigator.onLine) {
357
+ offlineIndicator.classList.remove('hidden');
358
+ } else {
359
+ offlineIndicator.classList.add('hidden');
360
+ }
361
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
362
 
363
+ window.addEventListener('online', updateOnlineStatus);
364
+ window.addEventListener('offline', updateOnlineStatus);
365
+ updateOnlineStatus();
366
 
367
+ // Simulate loading states
368
+ function simulateLoading() {
369
+ const cards = document.querySelectorAll('.bg-white');
370
+ cards.forEach(card => {
371
+ card.classList.add('loading-skeleton');
372
+ setTimeout(() => {
373
+ card.classList.remove('loading-skeleton');
374
+ }, 1000);
375
+ });
376
+ }
377
 
378
+ // Update storage meter
379
+ function updateStorageMeter() {
380
+ const meter = document.querySelector('.storage-meter');
381
+ const usage = 75; // This would come from an API in a real app
382
+ meter.style.background = `linear-gradient(90deg, #3b82f6 0%, #3b82f6 ${usage}%, #e5e7eb ${usage}%, #e5e7eb 100%)`;
383
  }
384
 
385
+ // Initialize
386
+ document.addEventListener('DOMContentLoaded', () => {
387
+ simulateLoading();
388
+ updateStorageMeter();
 
 
 
 
 
389
  });
390
 
391
+ // Quick action buttons
392
+ document.querySelectorAll('button').forEach(button => {
393
+ button.addEventListener('click', function() {
394
+ // Add ripple effect
395
+ const ripple = document.createElement('div');
396
+ ripple.classList.add('absolute', 'bg-white', 'rounded-full', 'animate-ping');
397
+ this.appendChild(ripple);
398
+ setTimeout(() => ripple.remove(), 1000);
399
+ });
 
400
  });
401
 
402
+ // Animated Summary Cards
403
+ class AnimatedCounter {
404
+ constructor(element, targetValue, duration = 500) {
405
+ this.element = element;
406
+ this.targetValue = targetValue;
407
+ this.duration = duration;
408
+ this.currentValue = 0;
409
+ this.startTime = null;
410
+ this.isAnimating = false;
411
+ this.debounceTimeout = null;
412
  }
 
 
413
 
414
+ formatNumber(num) {
415
+ if (num >= 1000) {
416
+ return (num / 1000).toFixed(1) + 'k';
417
+ }
418
+ return Math.round(num).toString();
419
  }
 
420
 
421
+ animate() {
422
+ if (this.isAnimating) return;
423
+ if (this.debounceTimeout) clearTimeout(this.debounceTimeout);
424
+
425
+ this.debounceTimeout = setTimeout(() => {
426
+ this.isAnimating = true;
427
+ this.startTime = performance.now();
428
+ this.element.classList.add('animate');
429
+ this.element.closest('.summary-card').classList.add('highlight');
430
+
431
+ const animate = (currentTime) => {
432
+ const elapsed = currentTime - this.startTime;
433
+ const progress = Math.min(elapsed / this.duration, 1);
434
+
435
+ // Cubic bezier easing
436
+ const easeOut = t => 1 - Math.pow(1 - t, 3);
437
+ const easedProgress = easeOut(progress);
438
+
439
+ this.currentValue = this.targetValue * easedProgress;
440
+ this.element.textContent = this.formatNumber(this.currentValue);
441
+
442
+ if (progress < 1) {
443
+ requestAnimationFrame(animate);
444
+ } else {
445
+ this.isAnimating = false;
446
+ this.element.classList.remove('animate');
447
+ this.element.closest('.summary-card').classList.remove('highlight');
448
+ }
449
+ };
450
+
451
+ requestAnimationFrame(animate);
452
+ }, 100);
453
  }
 
454
 
455
+ setValue(value, animate = true) {
456
+ this.targetValue = value;
457
+ if (animate) {
458
+ this.animate();
459
+ } else {
460
+ this.element.textContent = this.formatNumber(value);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
461
  }
462
+ }
463
 
464
+ showError() {
465
+ this.element.innerHTML = `
466
+ <span class="error-value">
467
+ <i class="fas fa-exclamation-circle"></i>
468
+ --
469
+ </span>
 
 
 
470
  `;
471
  }
472
  }
473
 
474
+ // Initialize counters
475
+ const counters = new Map();
476
+ document.querySelectorAll('.summary-number').forEach(element => {
477
+ const targetValue = parseInt(element.dataset.value);
478
+ if (!isNaN(targetValue)) {
479
+ counters.set(element, new AnimatedCounter(element, targetValue));
480
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
481
  });
482
 
483
+ // Animate counters on page load
484
+ document.addEventListener('DOMContentLoaded', () => {
485
+ counters.forEach(counter => counter.animate());
 
 
 
 
 
 
 
 
 
486
  });
487
 
488
+ // Simulate data updates
489
+ function simulateDataUpdate() {
490
+ const randomValue = Math.floor(Math.random() * 100);
491
+ const randomCounter = Array.from(counters.values())[Math.floor(Math.random() * counters.size)];
492
+ randomCounter.setValue(randomValue);
493
+ }
494
 
495
+ // Add click handler to sync button
496
+ document.querySelector('button:has(.fa-sync)').addEventListener('click', () => {
497
+ counters.forEach(counter => counter.animate());
 
 
 
 
 
498
  });
499
 
500
+ // Simulate periodic updates
501
+ setInterval(simulateDataUpdate, 5000);
502
  </script>
503
  <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://deepsite.hf.co/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://deepsite.hf.co" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://deepsite.hf.co?remix=dataquantals/quantals-collect" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
504
  </html>