Huzaifa Ali commited on
Commit
3853531
·
1 Parent(s): 12321f4

Add static and templates folders with their content

Browse files
Files changed (3) hide show
  1. static/css/style.css +898 -0
  2. static/js/app.js +342 -0
  3. templates/index.html +152 -0
static/css/style.css ADDED
@@ -0,0 +1,898 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ :root {
2
+ /* Colors */
3
+ --color-background: rgba(252, 252, 249, 1);
4
+ --color-surface: rgba(255, 255, 253, 1);
5
+ --color-text: rgba(19, 52, 59, 1);
6
+ --color-text-secondary: rgba(98, 108, 113, 1);
7
+ --color-primary: rgba(33, 128, 141, 1);
8
+ --color-primary-hover: rgba(29, 116, 128, 1);
9
+ --color-primary-active: rgba(26, 104, 115, 1);
10
+ --color-secondary: rgba(94, 82, 64, 0.12);
11
+ --color-secondary-hover: rgba(94, 82, 64, 0.2);
12
+ --color-secondary-active: rgba(94, 82, 64, 0.25);
13
+ --color-border: rgba(94, 82, 64, 0.2);
14
+ --color-btn-primary-text: rgba(252, 252, 249, 1);
15
+ --color-card-border: rgba(94, 82, 64, 0.12);
16
+ --color-card-border-inner: rgba(94, 82, 64, 0.12);
17
+ --color-error: rgba(192, 21, 47, 1);
18
+ --color-success: rgba(33, 128, 141, 1);
19
+ --color-warning: rgba(168, 75, 47, 1);
20
+ --color-info: rgba(98, 108, 113, 1);
21
+ --color-focus-ring: rgba(33, 128, 141, 0.4);
22
+ --color-select-caret: rgba(19, 52, 59, 0.8);
23
+
24
+ /* Common style patterns */
25
+ --focus-ring: 0 0 0 3px var(--color-focus-ring);
26
+ --focus-outline: 2px solid var(--color-primary);
27
+ --status-bg-opacity: 0.15;
28
+ --status-border-opacity: 0.25;
29
+ --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
30
+ --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
31
+
32
+ /* RGB versions for opacity control */
33
+ --color-success-rgb: 33, 128, 141;
34
+ --color-error-rgb: 192, 21, 47;
35
+ --color-warning-rgb: 168, 75, 47;
36
+ --color-info-rgb: 98, 108, 113;
37
+
38
+ /* Typography */
39
+ --font-family-base: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
40
+ --font-family-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
41
+ --font-size-xs: 11px;
42
+ --font-size-sm: 12px;
43
+ --font-size-base: 14px;
44
+ --font-size-md: 14px;
45
+ --font-size-lg: 16px;
46
+ --font-size-xl: 18px;
47
+ --font-size-2xl: 20px;
48
+ --font-size-3xl: 24px;
49
+ --font-size-4xl: 30px;
50
+ --font-weight-normal: 400;
51
+ --font-weight-medium: 500;
52
+ --font-weight-semibold: 550;
53
+ --font-weight-bold: 600;
54
+ --line-height-tight: 1.2;
55
+ --line-height-normal: 1.5;
56
+ --letter-spacing-tight: -0.01em;
57
+
58
+ /* Spacing */
59
+ --space-0: 0;
60
+ --space-1: 1px;
61
+ --space-2: 2px;
62
+ --space-4: 4px;
63
+ --space-6: 6px;
64
+ --space-8: 8px;
65
+ --space-10: 10px;
66
+ --space-12: 12px;
67
+ --space-16: 16px;
68
+ --space-20: 20px;
69
+ --space-24: 24px;
70
+ --space-32: 32px;
71
+
72
+ /* Border Radius */
73
+ --radius-sm: 6px;
74
+ --radius-base: 8px;
75
+ --radius-md: 10px;
76
+ --radius-lg: 12px;
77
+ --radius-full: 9999px;
78
+
79
+ /* Shadows */
80
+ --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.02);
81
+ --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
82
+ --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
83
+ --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
84
+ --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.03);
85
+
86
+ /* Animation */
87
+ --duration-fast: 150ms;
88
+ --duration-normal: 250ms;
89
+ --ease-standard: cubic-bezier(0.16, 1, 0.3, 1);
90
+
91
+ /* Layout */
92
+ --container-sm: 640px;
93
+ --container-md: 768px;
94
+ --container-lg: 1024px;
95
+ --container-xl: 1280px;
96
+ }
97
+
98
+ /* Dark mode colors */
99
+ @media (prefers-color-scheme: dark) {
100
+ :root {
101
+ --color-background: rgba(31, 33, 33, 1);
102
+ --color-surface: rgba(38, 40, 40, 1);
103
+ --color-text: rgba(245, 245, 245, 1);
104
+ --color-text-secondary: rgba(167, 169, 169, 0.7);
105
+ --color-primary: rgba(50, 184, 198, 1);
106
+ --color-primary-hover: rgba(45, 166, 178, 1);
107
+ --color-primary-active: rgba(41, 150, 161, 1);
108
+ --color-secondary: rgba(119, 124, 124, 0.15);
109
+ --color-secondary-hover: rgba(119, 124, 124, 0.25);
110
+ --color-secondary-active: rgba(119, 124, 124, 0.3);
111
+ --color-border: rgba(119, 124, 124, 0.3);
112
+ --color-error: rgba(255, 84, 89, 1);
113
+ --color-success: rgba(50, 184, 198, 1);
114
+ --color-warning: rgba(230, 129, 97, 1);
115
+ --color-info: rgba(167, 169, 169, 1);
116
+ --color-focus-ring: rgba(50, 184, 198, 0.4);
117
+ --color-btn-primary-text: rgba(19, 52, 59, 1);
118
+ --color-card-border: rgba(119, 124, 124, 0.2);
119
+ --color-card-border-inner: rgba(119, 124, 124, 0.15);
120
+ --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 -1px 0 rgba(0, 0, 0, 0.15);
121
+ --button-border-secondary: rgba(119, 124, 124, 0.2);
122
+ --color-border-secondary: rgba(119, 124, 124, 0.2);
123
+ --color-select-caret: rgba(245, 245, 245, 0.8);
124
+
125
+ /* RGB versions for dark mode */
126
+ --color-success-rgb: 50, 184, 198;
127
+ --color-error-rgb: 255, 84, 89;
128
+ --color-warning-rgb: 230, 129, 97;
129
+ --color-info-rgb: 167, 169, 169;
130
+ }
131
+ }
132
+
133
+ /* Base styles */
134
+ html {
135
+ font-size: var(--font-size-base);
136
+ font-family: var(--font-family-base);
137
+ line-height: var(--line-height-normal);
138
+ color: var(--color-text);
139
+ background-color: var(--color-background);
140
+ -webkit-font-smoothing: antialiased;
141
+ box-sizing: border-box;
142
+ }
143
+
144
+ body {
145
+ margin: 0;
146
+ padding: 0;
147
+ }
148
+
149
+ *, *::before, *::after {
150
+ box-sizing: inherit;
151
+ }
152
+
153
+ /* Typography */
154
+ h1, h2, h3, h4, h5, h6 {
155
+ margin: 0;
156
+ font-weight: var(--font-weight-semibold);
157
+ line-height: var(--line-height-tight);
158
+ color: var(--color-text);
159
+ letter-spacing: var(--letter-spacing-tight);
160
+ }
161
+
162
+ h1 { font-size: var(--font-size-4xl); }
163
+ h2 { font-size: var(--font-size-3xl); }
164
+ h3 { font-size: var(--font-size-2xl); }
165
+ h4 { font-size: var(--font-size-xl); }
166
+ h5 { font-size: var(--font-size-lg); }
167
+ h6 { font-size: var(--font-size-md); }
168
+
169
+ p {
170
+ margin: 0 0 var(--space-16) 0;
171
+ }
172
+
173
+ a {
174
+ color: var(--color-primary);
175
+ text-decoration: none;
176
+ transition: color var(--duration-fast) var(--ease-standard);
177
+ }
178
+
179
+ a:hover {
180
+ color: var(--color-primary-hover);
181
+ }
182
+
183
+ /* Buttons */
184
+ .btn {
185
+ display: inline-flex;
186
+ align-items: center;
187
+ justify-content: center;
188
+ padding: var(--space-8) var(--space-16);
189
+ border-radius: var(--radius-base);
190
+ font-size: var(--font-size-base);
191
+ font-weight: 500;
192
+ line-height: 1.5;
193
+ cursor: pointer;
194
+ transition: all var(--duration-normal) var(--ease-standard);
195
+ border: none;
196
+ text-decoration: none;
197
+ position: relative;
198
+ }
199
+
200
+ .btn:focus-visible {
201
+ outline: none;
202
+ box-shadow: var(--focus-ring);
203
+ }
204
+
205
+ .btn--primary {
206
+ background: var(--color-primary);
207
+ color: var(--color-btn-primary-text);
208
+ }
209
+
210
+ .btn--primary:hover {
211
+ background: var(--color-primary-hover);
212
+ }
213
+
214
+ .btn--primary:active {
215
+ background: var(--color-primary-active);
216
+ }
217
+
218
+ .btn--secondary {
219
+ background: var(--color-secondary);
220
+ color: var(--color-text);
221
+ }
222
+
223
+ .btn--secondary:hover {
224
+ background: var(--color-secondary-hover);
225
+ }
226
+
227
+ .btn--secondary:active {
228
+ background: var(--color-secondary-active);
229
+ }
230
+
231
+ .btn--outline {
232
+ background: transparent;
233
+ border: 1px solid var(--color-border);
234
+ color: var(--color-text);
235
+ }
236
+
237
+ .btn--outline:hover {
238
+ background: var(--color-secondary);
239
+ }
240
+
241
+ .btn--sm {
242
+ padding: var(--space-4) var(--space-12);
243
+ font-size: var(--font-size-sm);
244
+ border-radius: var(--radius-sm);
245
+ }
246
+
247
+ .btn--lg {
248
+ padding: var(--space-10) var(--space-20);
249
+ font-size: var(--font-size-lg);
250
+ border-radius: var(--radius-md);
251
+ }
252
+
253
+ .btn--full-width {
254
+ width: 100%;
255
+ }
256
+
257
+ .btn:disabled {
258
+ opacity: 0.5;
259
+ cursor: not-allowed;
260
+ }
261
+
262
+ .btn i {
263
+ margin-right: var(--space-4);
264
+ }
265
+
266
+ .btn:last-child i,
267
+ .btn--sm i {
268
+ margin-right: 0;
269
+ }
270
+
271
+ /* Form elements */
272
+ .form-control {
273
+ display: block;
274
+ width: 100%;
275
+ padding: var(--space-8) var(--space-12);
276
+ font-size: var(--font-size-md);
277
+ line-height: 1.5;
278
+ color: var(--color-text);
279
+ background-color: var(--color-surface);
280
+ border: 1px solid var(--color-border);
281
+ border-radius: var(--radius-base);
282
+ transition: border-color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
283
+ }
284
+
285
+ select.form-control {
286
+ padding: var(--space-8) var(--space-12);
287
+ -webkit-appearance: none;
288
+ -moz-appearance: none;
289
+ appearance: none;
290
+ background-image: var(--select-caret-light);
291
+ background-repeat: no-repeat;
292
+ background-position: right var(--space-12) center;
293
+ background-size: 16px;
294
+ padding-right: var(--space-32);
295
+ }
296
+
297
+ @media (prefers-color-scheme: dark) {
298
+ select.form-control {
299
+ background-image: var(--select-caret-dark);
300
+ }
301
+ }
302
+
303
+ .form-control:focus {
304
+ border-color: var(--color-primary);
305
+ outline: var(--focus-outline);
306
+ }
307
+
308
+ .form-label {
309
+ display: block;
310
+ margin-bottom: var(--space-8);
311
+ font-weight: var(--font-weight-medium);
312
+ font-size: var(--font-size-sm);
313
+ }
314
+
315
+ .form-group {
316
+ margin-bottom: var(--space-16);
317
+ }
318
+
319
+ /* Card component */
320
+ .card {
321
+ background-color: var(--color-surface);
322
+ border-radius: var(--radius-lg);
323
+ border: 1px solid var(--color-card-border);
324
+ box-shadow: var(--shadow-sm);
325
+ overflow: hidden;
326
+ transition: box-shadow var(--duration-normal) var(--ease-standard);
327
+ }
328
+
329
+ .card:hover {
330
+ box-shadow: var(--shadow-md);
331
+ }
332
+
333
+ .card__body {
334
+ padding: var(--space-16);
335
+ }
336
+
337
+ .card__header {
338
+ padding: var(--space-16);
339
+ border-bottom: 1px solid var(--color-card-border-inner);
340
+ }
341
+
342
+ /* Container layout */
343
+ .container {
344
+ width: 100%;
345
+ margin-right: auto;
346
+ margin-left: auto;
347
+ padding-right: var(--space-16);
348
+ padding-left: var(--space-16);
349
+ }
350
+
351
+ @media (min-width: 640px) { .container { max-width: var(--container-sm); } }
352
+ @media (min-width: 768px) { .container { max-width: var(--container-md); } }
353
+ @media (min-width: 1024px) { .container { max-width: var(--container-lg); } }
354
+ @media (min-width: 1280px) { .container { max-width: var(--container-xl); } }
355
+
356
+ /* Utility classes */
357
+ .flex { display: flex; }
358
+ .flex-col { flex-direction: column; }
359
+ .items-center { align-items: center; }
360
+ .justify-center { justify-content: center; }
361
+ .justify-between { justify-content: space-between; }
362
+ .gap-4 { gap: var(--space-4); }
363
+ .gap-8 { gap: var(--space-8); }
364
+ .gap-16 { gap: var(--space-16); }
365
+
366
+ .mb-8 { margin-bottom: var(--space-8); }
367
+ .block { display: block; }
368
+ .hidden { display: none; }
369
+
370
+ /* Accessibility */
371
+ .sr-only {
372
+ position: absolute;
373
+ width: 1px;
374
+ height: 1px;
375
+ padding: 0;
376
+ margin: -1px;
377
+ overflow: hidden;
378
+ clip: rect(0, 0, 0, 0);
379
+ white-space: nowrap;
380
+ border-width: 0;
381
+ }
382
+
383
+ :focus-visible {
384
+ outline: var(--focus-outline);
385
+ outline-offset: 2px;
386
+ }
387
+
388
+ /* Custom styles building on the design system */
389
+ .app-container {
390
+ min-height: 100vh;
391
+ display: flex;
392
+ flex-direction: column;
393
+ background: linear-gradient(135deg, var(--color-background) 0%, var(--color-surface) 100%);
394
+ }
395
+
396
+ /* Header Styles */
397
+ .header {
398
+ background: var(--color-surface);
399
+ border-bottom: 1px solid var(--color-border);
400
+ box-shadow: var(--shadow-sm);
401
+ padding: var(--space-16) 0;
402
+ position: sticky;
403
+ top: 0;
404
+ z-index: 100;
405
+ }
406
+
407
+ .logo-container {
408
+ display: flex;
409
+ align-items: center;
410
+ gap: var(--space-12);
411
+ }
412
+
413
+ .logo {
414
+ font-size: var(--font-size-4xl);
415
+ font-weight: var(--font-weight-bold);
416
+ color: var(--color-primary);
417
+ margin: 0;
418
+ background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
419
+ -webkit-background-clip: text;
420
+ -webkit-text-fill-color: transparent;
421
+ background-clip: text;
422
+ }
423
+
424
+ .tagline {
425
+ font-size: var(--font-size-sm);
426
+ color: var(--color-text-secondary);
427
+ font-weight: var(--font-weight-medium);
428
+ }
429
+
430
+ /* Main Content Layout */
431
+ .main-content {
432
+ flex: 1;
433
+ padding: var(--space-24) var(--space-16);
434
+ }
435
+
436
+ .content-wrapper {
437
+ display: grid;
438
+ grid-template-columns: 300px 1fr;
439
+ gap: var(--space-24);
440
+ height: calc(100vh - 200px);
441
+ max-height: 800px;
442
+ }
443
+
444
+ /* Sidebar Styles */
445
+ .sidebar {
446
+ background: var(--color-surface);
447
+ border-radius: var(--radius-lg);
448
+ border: 1px solid var(--color-card-border);
449
+ box-shadow: var(--shadow-md);
450
+ padding: var(--space-20);
451
+ overflow-y: auto;
452
+ height: fit-content;
453
+ max-height: 100%;
454
+ }
455
+
456
+ .sidebar-header {
457
+ display: flex;
458
+ justify-content: space-between;
459
+ align-items: center;
460
+ margin-bottom: var(--space-20);
461
+ padding-bottom: var(--space-12);
462
+ border-bottom: 1px solid var(--color-border);
463
+ }
464
+
465
+ .sidebar-header h3 {
466
+ color: var(--color-primary);
467
+ margin: 0;
468
+ }
469
+
470
+ .sidebar-section {
471
+ margin-bottom: var(--space-24);
472
+ }
473
+
474
+ .sidebar-section h4 {
475
+ font-size: var(--font-size-md);
476
+ font-weight: var(--font-weight-semibold);
477
+ color: var(--color-text);
478
+ margin-bottom: var(--space-12);
479
+ }
480
+
481
+ .sidebar-section:last-child {
482
+ margin-bottom: 0;
483
+ }
484
+
485
+ /* Quick Queries */
486
+ .quick-queries {
487
+ display: flex;
488
+ flex-direction: column;
489
+ gap: var(--space-8);
490
+ }
491
+
492
+ .query-btn {
493
+ background: var(--color-secondary);
494
+ border: 1px solid var(--color-border);
495
+ border-radius: var(--radius-base);
496
+ padding: var(--space-8) var(--space-12);
497
+ text-align: left;
498
+ cursor: pointer;
499
+ font-size: var(--font-size-sm);
500
+ color: var(--color-text);
501
+ transition: all var(--duration-fast) var(--ease-standard);
502
+ }
503
+
504
+ .query-btn:hover {
505
+ background: var(--color-secondary-hover);
506
+ transform: translateY(-1px);
507
+ }
508
+
509
+ /* Chat Area */
510
+ .chat-area {
511
+ display: flex;
512
+ flex-direction: column;
513
+ background: var(--color-surface);
514
+ border-radius: var(--radius-lg);
515
+ border: 1px solid var(--color-card-border);
516
+ box-shadow: var(--shadow-md);
517
+ overflow: hidden;
518
+ }
519
+
520
+ .chat-container {
521
+ flex: 1;
522
+ padding: var(--space-20);
523
+ overflow-y: auto;
524
+ min-height: 400px;
525
+ max-height: calc(100vh - 300px);
526
+ display: flex;
527
+ flex-direction: column;
528
+ gap: var(--space-16);
529
+ }
530
+
531
+ /* Message Bubbles */
532
+ .message {
533
+ display: flex;
534
+ margin-bottom: var(--space-16);
535
+ animation: fadeInUp 0.3s ease-out;
536
+ }
537
+
538
+ .message.user {
539
+ justify-content: flex-end;
540
+ }
541
+
542
+ .message.bot {
543
+ justify-content: flex-start;
544
+ }
545
+
546
+ .message-bubble {
547
+ max-width: 70%;
548
+ padding: var(--space-12) var(--space-16);
549
+ border-radius: var(--radius-lg);
550
+ position: relative;
551
+ box-shadow: var(--shadow-sm);
552
+ }
553
+
554
+ .message.user .message-bubble {
555
+ background: var(--color-primary);
556
+ color: var(--color-btn-primary-text);
557
+ border-bottom-right-radius: var(--radius-sm);
558
+ }
559
+
560
+ .message.bot .message-bubble {
561
+ background: var(--color-secondary);
562
+ color: var(--color-text);
563
+ border-bottom-left-radius: var(--radius-sm);
564
+ }
565
+
566
+ .message-content {
567
+ margin: 0;
568
+ line-height: var(--line-height-normal);
569
+ }
570
+
571
+ .message-time {
572
+ font-size: var(--font-size-xs);
573
+ opacity: 0.7;
574
+ margin-top: var(--space-4);
575
+ }
576
+
577
+ .message-actions {
578
+ display: flex;
579
+ gap: var(--space-8);
580
+ margin-top: var(--space-8);
581
+ }
582
+
583
+ .copy-btn {
584
+ background: none;
585
+ border: none;
586
+ color: var(--color-text-secondary);
587
+ cursor: pointer;
588
+ font-size: var(--font-size-xs);
589
+ padding: var(--space-2);
590
+ border-radius: var(--radius-sm);
591
+ transition: color var(--duration-fast);
592
+ }
593
+
594
+ .copy-btn:hover {
595
+ color: var(--color-text);
596
+ }
597
+
598
+ /* Typing Indicator */
599
+ .typing-indicator {
600
+ display: flex;
601
+ justify-content: flex-start;
602
+ margin-bottom: var(--space-16);
603
+ }
604
+
605
+ .typing-bubble {
606
+ background: var(--color-secondary);
607
+ padding: var(--space-12) var(--space-16);
608
+ border-radius: var(--radius-lg);
609
+ border-bottom-left-radius: var(--radius-sm);
610
+ display: flex;
611
+ align-items: center;
612
+ gap: var(--space-4);
613
+ }
614
+
615
+ .typing-dots {
616
+ display: flex;
617
+ gap: var(--space-2);
618
+ }
619
+
620
+ .typing-dot {
621
+ width: 6px;
622
+ height: 6px;
623
+ border-radius: 50%;
624
+ background: var(--color-text-secondary);
625
+ animation: typingDots 1.4s infinite ease-in-out;
626
+ }
627
+
628
+ .typing-dot:nth-child(1) { animation-delay: -0.32s; }
629
+ .typing-dot:nth-child(2) { animation-delay: -0.16s; }
630
+
631
+ /* Chat Input */
632
+ .chat-input-container {
633
+ padding: var(--space-20);
634
+ border-top: 1px solid var(--color-border);
635
+ background: var(--color-surface);
636
+ }
637
+
638
+ .input-wrapper {
639
+ display: flex;
640
+ gap: var(--space-12);
641
+ align-items: flex-end;
642
+ }
643
+
644
+ .input-wrapper .form-control {
645
+ flex: 1;
646
+ resize: none;
647
+ min-height: 44px;
648
+ max-height: 120px;
649
+ }
650
+
651
+ #send-btn {
652
+ flex-shrink: 0;
653
+ height: 44px;
654
+ width: 44px;
655
+ border-radius: 50%;
656
+ padding: 0;
657
+ }
658
+
659
+ /* Welcome Message */
660
+ .welcome-message {
661
+ text-align: center;
662
+ color: var(--color-text-secondary);
663
+ padding: var(--space-32);
664
+ }
665
+
666
+ .welcome-message h3 {
667
+ color: var(--color-primary);
668
+ margin-bottom: var(--space-16);
669
+ }
670
+
671
+ .welcome-message ul {
672
+ text-align: left;
673
+ max-width: 400px;
674
+ margin: var(--space-16) auto;
675
+ }
676
+
677
+ /* Footer */
678
+ .footer {
679
+ background: var(--color-surface);
680
+ border-top: 1px solid var(--color-border);
681
+ padding: var(--space-16) 0;
682
+ margin-top: auto;
683
+ }
684
+
685
+ .footer p {
686
+ margin: 0;
687
+ font-size: var(--font-size-sm);
688
+ color: var(--color-text-secondary);
689
+ }
690
+
691
+ .footer a {
692
+ font-size: var(--font-size-sm);
693
+ color: var(--color-text-secondary);
694
+ text-decoration: none;
695
+ }
696
+
697
+ .footer a:hover {
698
+ color: var(--color-primary);
699
+ }
700
+
701
+ /* Modal Styles */
702
+ .modal {
703
+ display: none;
704
+ position: fixed;
705
+ z-index: 1000;
706
+ left: 0;
707
+ top: 0;
708
+ width: 100%;
709
+ height: 100%;
710
+ background-color: rgba(0, 0, 0, 0.5);
711
+ backdrop-filter: blur(4px);
712
+ }
713
+
714
+ .modal.show {
715
+ display: flex;
716
+ align-items: center;
717
+ justify-content: center;
718
+ animation: fadeIn 0.3s ease-out;
719
+ }
720
+
721
+ .modal-content {
722
+ max-width: 500px;
723
+ width: 90%;
724
+ margin: var(--space-20);
725
+ animation: slideInUp 0.3s ease-out;
726
+ }
727
+
728
+ .modal-close {
729
+ cursor: pointer;
730
+ }
731
+
732
+ /* Responsive Design */
733
+ .mobile-only {
734
+ display: none;
735
+ }
736
+
737
+ @media (max-width: 768px) {
738
+ .content-wrapper {
739
+ grid-template-columns: 1fr;
740
+ gap: 0;
741
+ }
742
+
743
+ .sidebar {
744
+ position: fixed;
745
+ top: 0;
746
+ left: -100%;
747
+ width: 280px;
748
+ height: 100vh;
749
+ z-index: 200;
750
+ transition: left var(--duration-normal) var(--ease-standard);
751
+ border-radius: 0;
752
+ border-right: 1px solid var(--color-border);
753
+ border-top: none;
754
+ border-left: none;
755
+ border-bottom: none;
756
+ }
757
+
758
+ .sidebar.show {
759
+ left: 0;
760
+ }
761
+
762
+ .mobile-only {
763
+ display: inline-flex;
764
+ }
765
+
766
+ .tagline {
767
+ display: none;
768
+ }
769
+
770
+ .chat-container {
771
+ min-height: 300px;
772
+ max-height: calc(100vh - 250px);
773
+ }
774
+
775
+ .message-bubble {
776
+ max-width: 85%;
777
+ }
778
+ }
779
+
780
+ /* Animations */
781
+ @keyframes fadeInUp {
782
+ from {
783
+ opacity: 0;
784
+ transform: translateY(20px);
785
+ }
786
+ to {
787
+ opacity: 1;
788
+ transform: translateY(0);
789
+ }
790
+ }
791
+
792
+ @keyframes fadeIn {
793
+ from { opacity: 0; }
794
+ to { opacity: 1; }
795
+ }
796
+
797
+ @keyframes slideInUp {
798
+ from {
799
+ transform: translateY(30px);
800
+ opacity: 0;
801
+ }
802
+ to {
803
+ transform: translateY(0);
804
+ opacity: 1;
805
+ }
806
+ }
807
+
808
+ @keyframes typingDots {
809
+ 0%, 80%, 100% {
810
+ transform: scale(0.8);
811
+ opacity: 0.5;
812
+ }
813
+ 40% {
814
+ transform: scale(1);
815
+ opacity: 1;
816
+ }
817
+ }
818
+
819
+ /* Scrollbar Styling */
820
+ .chat-container::-webkit-scrollbar,
821
+ .sidebar::-webkit-scrollbar {
822
+ width: 6px;
823
+ }
824
+
825
+ .chat-container::-webkit-scrollbar-track,
826
+ .sidebar::-webkit-scrollbar-track {
827
+ background: var(--color-secondary);
828
+ border-radius: var(--radius-sm);
829
+ }
830
+
831
+ .chat-container::-webkit-scrollbar-thumb,
832
+ .sidebar::-webkit-scrollbar-thumb {
833
+ background: var(--color-border);
834
+ border-radius: var(--radius-sm);
835
+ }
836
+
837
+ .chat-container::-webkit-scrollbar-thumb:hover,
838
+ .sidebar::-webkit-scrollbar-thumb:hover {
839
+ background: var(--color-text-secondary);
840
+ }
841
+
842
+ /* Status indicators */
843
+ .status-online {
844
+ display: inline-flex;
845
+ align-items: center;
846
+ gap: var(--space-4);
847
+ font-size: var(--font-size-sm);
848
+ color: var(--color-success);
849
+ }
850
+
851
+ .status-online::before {
852
+ content: '';
853
+ width: 8px;
854
+ height: 8px;
855
+ background: var(--color-success);
856
+ border-radius: 50%;
857
+ animation: pulse 2s infinite;
858
+ }
859
+
860
+ @keyframes pulse {
861
+ 0% {
862
+ box-shadow: 0 0 0 0 rgba(var(--color-success-rgb), 0.7);
863
+ }
864
+ 70% {
865
+ box-shadow: 0 0 0 10px rgba(var(--color-success-rgb), 0);
866
+ }
867
+ 100% {
868
+ box-shadow: 0 0 0 0 rgba(var(--color-success-rgb), 0);
869
+ }
870
+ }
871
+
872
+ /* Focus states for accessibility */
873
+ .query-btn:focus-visible,
874
+ #chat-input:focus-visible,
875
+ #syllabus-select:focus-visible {
876
+ outline: var(--focus-outline);
877
+ outline-offset: 2px;
878
+ }
879
+
880
+ /* Loading state */
881
+ .loading {
882
+ opacity: 0.7;
883
+ pointer-events: none;
884
+ }
885
+
886
+ /* Error states */
887
+ .error-message {
888
+ color: var(--color-error);
889
+ font-size: var(--font-size-sm);
890
+ margin-top: var(--space-4);
891
+ }
892
+
893
+ /* Success states */
894
+ .success-message {
895
+ color: var(--color-success);
896
+ font-size: var(--font-size-sm);
897
+ margin-top: var(--space-4);
898
+ }
static/js/app.js ADDED
@@ -0,0 +1,342 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // CCET Chatbot Application JavaScript
2
+
3
+ class CCETChatbot {
4
+ constructor() {
5
+ this.chatContainer = document.getElementById('chat-container');
6
+ this.chatInput = document.getElementById('chat-input');
7
+ this.sendBtn = document.getElementById('send-btn');
8
+ this.sidebar = document.getElementById('sidebar');
9
+ this.toggleSidebarBtn = document.getElementById('toggle-sidebar');
10
+ this.closeSidebarBtn = document.getElementById('close-sidebar');
11
+ this.clearChatBtn = document.getElementById('clear-chat');
12
+ this.helpBtn = document.getElementById('help-btn');
13
+ this.helpModal = document.getElementById('help-modal');
14
+ this.syllabusSelect = document.getElementById('syllabus-select');
15
+ this.downloadSyllabusBtn = document.getElementById('download-syllabus');
16
+
17
+ this.conversationHistory = [];
18
+ this.isTyping = false;
19
+
20
+ // Syllabus URLs
21
+ this.syllabusUrls = {
22
+ 'cse': 'https://ccet.ac.in/pdf/CSE_syllabus_2025.pdf',
23
+ 'mechanical': 'https://ccet.ac.in/pdf/Mech_syll2024-28.pdf',
24
+ 'ece': 'https://ccet.ac.in/pdf/ECE_SYLLABUS_2024-28.pdf',
25
+ 'civil': 'https://ccet.ac.in/pdf/Civil_syllabus2024-28.pdf'
26
+ };
27
+
28
+ this.init();
29
+ }
30
+
31
+ init() {
32
+ this.bindEvents();
33
+ this.showWelcomeMessage();
34
+ }
35
+
36
+ bindEvents() {
37
+ // Chat input events
38
+ this.sendBtn.addEventListener('click', () => this.sendMessage());
39
+ this.chatInput.addEventListener('keypress', (e) => {
40
+ if (e.key === 'Enter' && !e.shiftKey) {
41
+ e.preventDefault();
42
+ this.sendMessage();
43
+ }
44
+ });
45
+
46
+ // Sidebar events
47
+ this.toggleSidebarBtn?.addEventListener('click', () => this.toggleSidebar());
48
+ this.closeSidebarBtn?.addEventListener('click', () => this.closeSidebar());
49
+
50
+ // Quick query buttons
51
+ const queryButtons = document.querySelectorAll('.query-btn');
52
+ queryButtons.forEach(btn => {
53
+ btn.addEventListener('click', () => {
54
+ const query = btn.getAttribute('data-query');
55
+ this.chatInput.value = query;
56
+ this.sendMessage();
57
+ });
58
+ });
59
+
60
+ // Syllabus download
61
+ this.syllabusSelect.addEventListener('change', () => {
62
+ this.downloadSyllabusBtn.disabled = !this.syllabusSelect.value;
63
+ });
64
+
65
+ this.downloadSyllabusBtn.addEventListener('click', () => this.downloadSyllabus());
66
+
67
+ // Clear chat
68
+ this.clearChatBtn.addEventListener('click', () => this.clearChat());
69
+
70
+ // Help modal
71
+ this.helpBtn.addEventListener('click', () => {
72
+ this.helpModal.classList.add('show');
73
+ });
74
+
75
+ // Modal close events
76
+ const modalCloseButtons = document.querySelectorAll('.modal-close');
77
+ modalCloseButtons.forEach(btn => {
78
+ btn.addEventListener('click', () => {
79
+ this.helpModal.classList.remove('show');
80
+ });
81
+ });
82
+
83
+ // Close modal on backdrop click
84
+ this.helpModal.addEventListener('click', (e) => {
85
+ if (e.target === this.helpModal) {
86
+ this.helpModal.classList.remove('show');
87
+ }
88
+ });
89
+
90
+ // Close sidebar on outside click (mobile)
91
+ document.addEventListener('click', (e) => {
92
+ if (window.innerWidth <= 768 &&
93
+ this.sidebar.classList.contains('show') &&
94
+ !this.sidebar.contains(e.target) &&
95
+ !this.toggleSidebarBtn.contains(e.target)) {
96
+ this.closeSidebar();
97
+ }
98
+ });
99
+ }
100
+
101
+ showWelcomeMessage() {
102
+ const welcomeHtml = `
103
+ <div class="welcome-message">
104
+ <h3>Welcome to CCET Chatbot Assistant! 🎓</h3>
105
+ <p>I'm here to help you with information about Chandigarh College of Engineering and Technology.</p>
106
+ <p><strong>I can help you with:</strong></p>
107
+ <ul>
108
+ <li>Admission process and requirements</li>
109
+ <li>Fee structure and payment details</li>
110
+ <li>Placement information and statistics</li>
111
+ <li>Hostel facilities and accommodation</li>
112
+ <li>Academic calendar and schedules</li>
113
+ <li>Contact information and general queries</li>
114
+ </ul>
115
+ <p>Use the sidebar for quick access to portals and syllabus downloads, or start typing your question below!</p>
116
+ <div class="status-online">Bot is online</div>
117
+ </div>
118
+ `;
119
+ this.chatContainer.innerHTML = welcomeHtml;
120
+ }
121
+
122
+ async sendMessage() {
123
+ const message = this.chatInput.value.trim();
124
+ if (!message || this.isTyping) return;
125
+
126
+ this.addMessage(message, 'user');
127
+ this.chatInput.value = '';
128
+ this.conversationHistory.push({ role: 'user', content: message });
129
+
130
+ this.showTypingIndicator();
131
+
132
+ try {
133
+ // Send message to Flask backend
134
+ const response = await fetch('/api/chat', {
135
+ method: 'POST',
136
+ headers: {
137
+ 'Content-Type': 'application/json',
138
+ },
139
+ body: JSON.stringify({ message: message })
140
+ });
141
+
142
+ const data = await response.json();
143
+
144
+ this.hideTypingIndicator();
145
+
146
+ if (response.ok) {
147
+ this.addMessage(data.answer, 'bot');
148
+ this.conversationHistory.push({ role: 'bot', content: data.answer });
149
+ } else {
150
+ this.addMessage('Sorry, I encountered an error. Please try again.', 'bot');
151
+ console.error('Error:', data.error);
152
+ }
153
+ } catch (error) {
154
+ this.hideTypingIndicator();
155
+ this.addMessage('Sorry, I\'m having trouble connecting. Please check your connection and try again.', 'bot');
156
+ console.error('Network error:', error);
157
+ }
158
+ }
159
+
160
+ addMessage(content, sender) {
161
+ const messageDiv = document.createElement('div');
162
+ messageDiv.className = `message ${sender}`;
163
+
164
+ const timestamp = new Date().toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
165
+
166
+ messageDiv.innerHTML = `
167
+ <div class="message-bubble">
168
+ <div class="message-content">${content}</div>
169
+ <div class="message-time">${timestamp}</div>
170
+ ${sender === 'bot' ? `
171
+ <div class="message-actions">
172
+ <button class="copy-btn" onclick="app.copyMessage(this)" title="Copy message">
173
+ <i class="fas fa-copy"></i>
174
+ </button>
175
+ </div>
176
+ ` : ''}
177
+ </div>
178
+ `;
179
+
180
+ this.chatContainer.appendChild(messageDiv);
181
+ this.scrollToBottom();
182
+ }
183
+
184
+ showTypingIndicator() {
185
+ this.isTyping = true;
186
+ const typingDiv = document.createElement('div');
187
+ typingDiv.className = 'typing-indicator';
188
+ typingDiv.id = 'typing-indicator';
189
+ typingDiv.innerHTML = `
190
+ <div class="typing-bubble">
191
+ <span>CCET Bot is typing</span>
192
+ <div class="typing-dots">
193
+ <div class="typing-dot"></div>
194
+ <div class="typing-dot"></div>
195
+ <div class="typing-dot"></div>
196
+ </div>
197
+ </div>
198
+ `;
199
+ this.chatContainer.appendChild(typingDiv);
200
+ this.scrollToBottom();
201
+ }
202
+
203
+ hideTypingIndicator() {
204
+ this.isTyping = false;
205
+ const typingIndicator = document.getElementById('typing-indicator');
206
+ if (typingIndicator) {
207
+ typingIndicator.remove();
208
+ }
209
+ }
210
+
211
+ scrollToBottom() {
212
+ this.chatContainer.scrollTop = this.chatContainer.scrollHeight;
213
+ }
214
+
215
+ copyMessage(button) {
216
+ const messageContent = button.closest('.message-bubble').querySelector('.message-content').textContent;
217
+ navigator.clipboard.writeText(messageContent).then(() => {
218
+ const originalIcon = button.innerHTML;
219
+ button.innerHTML = '<i class="fas fa-check"></i>';
220
+ setTimeout(() => {
221
+ button.innerHTML = originalIcon;
222
+ }, 1000);
223
+ });
224
+ }
225
+
226
+ toggleSidebar() {
227
+ this.sidebar.classList.add('show');
228
+ }
229
+
230
+ closeSidebar() {
231
+ this.sidebar.classList.remove('show');
232
+ }
233
+
234
+ downloadSyllabus() {
235
+ const selectedBranch = this.syllabusSelect.value;
236
+ if (!selectedBranch) return;
237
+
238
+ const url = this.syllabusUrls[selectedBranch];
239
+ const branchNames = {
240
+ 'cse': 'Computer Science Engineering',
241
+ 'mechanical': 'Mechanical Engineering',
242
+ 'ece': 'Electronics & Communication Engineering',
243
+ 'civil': 'Civil Engineering'
244
+ };
245
+
246
+ // Create a temporary link and click it to download
247
+ const link = document.createElement('a');
248
+ link.href = url;
249
+ link.target = '_blank';
250
+ link.download = `${branchNames[selectedBranch]}_Syllabus.pdf`;
251
+ document.body.appendChild(link);
252
+ link.click();
253
+ document.body.removeChild(link);
254
+
255
+ // Show success message
256
+ this.addMessage(`✅ Downloading ${branchNames[selectedBranch]} syllabus. The file will open in a new tab.`, 'bot');
257
+
258
+ // Reset the select
259
+ this.syllabusSelect.value = '';
260
+ this.downloadSyllabusBtn.disabled = true;
261
+ }
262
+
263
+ clearChat() {
264
+ if (confirm('Are you sure you want to clear the chat history?')) {
265
+ this.conversationHistory = [];
266
+ this.showWelcomeMessage();
267
+ }
268
+ }
269
+ }
270
+
271
+ // Initialize the application when DOM is loaded
272
+ document.addEventListener('DOMContentLoaded', () => {
273
+ window.app = new CCETChatbot();
274
+ });
275
+
276
+ // Handle responsive behavior
277
+ window.addEventListener('resize', () => {
278
+ if (window.innerWidth > 768) {
279
+ document.getElementById('sidebar').classList.remove('show');
280
+ }
281
+ });
282
+
283
+ // Prevent default form submission if any forms are added later
284
+ document.addEventListener('submit', (e) => {
285
+ e.preventDefault();
286
+ });
287
+
288
+ // Add notification system
289
+ function showNotification(message, type = 'info') {
290
+ const notification = document.createElement('div');
291
+ notification.className = `notification notification--${type}`;
292
+ notification.style.cssText = `
293
+ position: fixed;
294
+ top: 20px;
295
+ right: 20px;
296
+ background: var(--color-surface);
297
+ border: 1px solid var(--color-border);
298
+ border-radius: var(--radius-base);
299
+ padding: var(--space-12) var(--space-16);
300
+ box-shadow: var(--shadow-lg);
301
+ z-index: 1000;
302
+ animation: slideInRight 0.3s ease-out;
303
+ max-width: 300px;
304
+ `;
305
+ notification.textContent = message;
306
+
307
+ document.body.appendChild(notification);
308
+
309
+ setTimeout(() => {
310
+ notification.style.animation = 'slideOutRight 0.3s ease-out';
311
+ setTimeout(() => {
312
+ document.body.removeChild(notification);
313
+ }, 300);
314
+ }, 3000);
315
+ }
316
+
317
+ // Add CSS for notifications
318
+ const notificationStyles = document.createElement('style');
319
+ notificationStyles.textContent = `
320
+ @keyframes slideInRight {
321
+ from {
322
+ transform: translateX(100%);
323
+ opacity: 0;
324
+ }
325
+ to {
326
+ transform: translateX(0);
327
+ opacity: 1;
328
+ }
329
+ }
330
+
331
+ @keyframes slideOutRight {
332
+ from {
333
+ transform: translateX(0);
334
+ opacity: 1;
335
+ }
336
+ to {
337
+ transform: translateX(100%);
338
+ opacity: 0;
339
+ }
340
+ }
341
+ `;
342
+ document.head.appendChild(notificationStyles);
templates/index.html ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>CCET Chatbot Assistant</title>
7
+ <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
9
+ </head>
10
+ <body>
11
+ <div class="app-container">
12
+ <!-- Header -->
13
+ <header class="header">
14
+ <div class="container">
15
+ <div class="flex items-center justify-between">
16
+ <div class="logo-container">
17
+ <h1 class="logo">CCET</h1>
18
+ <span class="tagline">Chandigarh College of Engineering and Technology</span>
19
+ </div>
20
+ <button id="toggle-sidebar" class="btn btn--secondary btn--sm mobile-only">
21
+ <i class="fas fa-bars"></i> Quick Access
22
+ </button>
23
+ </div>
24
+ </div>
25
+ </header>
26
+
27
+ <div class="main-content container">
28
+ <div class="content-wrapper">
29
+ <!-- Sidebar -->
30
+ <aside class="sidebar" id="sidebar">
31
+ <div class="sidebar-header">
32
+ <h3>Quick Access</h3>
33
+ <button id="close-sidebar" class="btn btn--secondary btn--sm mobile-only">
34
+ <i class="fas fa-times"></i>
35
+ </button>
36
+ </div>
37
+
38
+ <div class="sidebar-section">
39
+ <h4>Student Portals</h4>
40
+ <a href="https://paydirect.eduqfix.com/app/3qTjKfysWsfqEyNTM4giVFX4VGVYGZss5NYRHpY65DaJgmu14S3Ff6NKoVa3l2Ay/6593" target="_blank" class="btn btn--primary btn--full-width mb-8">
41
+ <i class="fas fa-credit-card"></i> Fees Portal
42
+ </a>
43
+ <a href="https://eakadamik.in/ccet/" target="_blank" class="btn btn--primary btn--full-width">
44
+ <i class="fas fa-graduation-cap"></i> CCET Results
45
+ </a>
46
+ </div>
47
+
48
+ <div class="sidebar-section">
49
+ <h4>Download Syllabus</h4>
50
+ <div class="form-group">
51
+ <select id="syllabus-select" class="form-control">
52
+ <option value="" selected disabled>Select Branch</option>
53
+ <option value="cse">Computer Science Engineering</option>
54
+ <option value="ece">Electronics & Communication Engineering</option>
55
+ <option value="mechanical">Mechanical Engineering</option>
56
+ <option value="civil">Civil Engineering</option>
57
+ </select>
58
+ </div>
59
+ <button id="download-syllabus" class="btn btn--secondary btn--full-width" disabled>
60
+ <i class="fas fa-download"></i> Download Syllabus
61
+ </button>
62
+ </div>
63
+
64
+ <div class="sidebar-section">
65
+ <h4>Common Queries</h4>
66
+ <div class="quick-queries">
67
+ <button class="query-btn" data-query="Tell me about admission process">Admission process</button>
68
+ <button class="query-btn" data-query="What is the fee structure?">Fee structure</button>
69
+ <button class="query-btn" data-query="Tell me about placements">Placement information</button>
70
+ <button class="query-btn" data-query="How are the hostel facilities?">Hostel facilities</button>
71
+ <button class="query-btn" data-query="When is the next academic calendar?">Academic calendar</button>
72
+ <button class="query-btn" data-query="How can I contact the college?">Contact information</button>
73
+ </div>
74
+ </div>
75
+
76
+ <div class="sidebar-section">
77
+ <h4>Chat Actions</h4>
78
+ <button id="clear-chat" class="btn btn--outline btn--full-width mb-8">
79
+ <i class="fas fa-trash"></i> Clear Chat
80
+ </button>
81
+ <button id="help-btn" class="btn btn--outline btn--full-width">
82
+ <i class="fas fa-question-circle"></i> Help
83
+ </button>
84
+ </div>
85
+ </aside>
86
+
87
+ <!-- Main Chat Area -->
88
+ <main class="chat-area">
89
+ <div class="chat-container" id="chat-container">
90
+ <!-- Chat messages will be displayed here -->
91
+ </div>
92
+
93
+ <div class="chat-input-container">
94
+ <div class="input-wrapper">
95
+ <input type="text" id="chat-input" class="form-control" placeholder="Type your message here...">
96
+ <button id="send-btn" class="btn btn--primary">
97
+ <i class="fas fa-paper-plane"></i>
98
+ </button>
99
+ </div>
100
+ </div>
101
+ </main>
102
+ </div>
103
+ </div>
104
+
105
+ <!-- Footer -->
106
+ <footer class="footer">
107
+ <div class="container">
108
+ <div class="flex items-center justify-between">
109
+ <div>
110
+ <p>&copy; 2025 Chandigarh College of Engineering and Technology</p>
111
+ </div>
112
+ <div class="flex gap-16">
113
+ <a href="https://ccet.ac.in" target="_blank">Official Website</a>
114
+ <a href="https://ccet.ac.in/contact-us" target="_blank">Contact</a>
115
+ </div>
116
+ </div>
117
+ </div>
118
+ </footer>
119
+
120
+ <!-- Help Modal -->
121
+ <div id="help-modal" class="modal">
122
+ <div class="modal-content card">
123
+ <div class="card__header">
124
+ <div class="flex justify-between items-center">
125
+ <h3>CCET Chatbot Help</h3>
126
+ <button class="modal-close btn btn--secondary btn--sm"><i class="fas fa-times"></i></button>
127
+ </div>
128
+ </div>
129
+ <div class="card__body">
130
+ <h4>What can this chatbot do?</h4>
131
+ <ul>
132
+ <li>Answer questions about CCET college</li>
133
+ <li>Provide information about admissions, placements, and facilities</li>
134
+ <li>Help you access important portals and resources</li>
135
+ <li>Download syllabus for different branches</li>
136
+ </ul>
137
+
138
+ <h4>Quick Tips</h4>
139
+ <ul>
140
+ <li>Use the sidebar for quick access to common resources</li>
141
+ <li>Click on the "Quick Queries" buttons to ask common questions</li>
142
+ <li>The chatbot remembers your conversation context</li>
143
+ <li>Click "Clear Chat" to start a new conversation</li>
144
+ </ul>
145
+ </div>
146
+ </div>
147
+ </div>
148
+ </div>
149
+
150
+ <script src="{{ url_for('static', filename='js/app.js') }}"></script>
151
+ </body>
152
+ </html>