vineelagampa TheFrogGod commited on
Commit
63c2810
·
verified ·
1 Parent(s): d3d89a9

Changes to styling and consistency across the analyzer. (#6)

Browse files

- Changes to styling and consistency across the analyzer. (625497d84bfe430917da02e4f3fedf33973cab8b)


Co-authored-by: Aanya Choudhary <TheFrogGod@users.noreply.huggingface.co>

Files changed (1) hide show
  1. web/analyzer.html +48 -126
web/analyzer.html CHANGED
@@ -1,117 +1,12 @@
1
- <!DOCTYPE html>
2
  <html lang="en">
3
  <head>
4
  <meta charset="UTF-8" />
5
  <title>Document Analyzer | CTRL + ALT + HEAL</title>
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
  <script src="https://cdn.tailwindcss.com"></script>
8
- <style>
9
- :root {
10
- --tropical-indigo: rgb(120, 187, 242);
11
- --wisteria: rgb(197, 217, 251);
12
- --latte-cream: #ffffff;
13
- }
14
-
15
- body {
16
- font-family: "Rubik", sans-serif;
17
- background-color: var(--latte-cream);
18
- color: #333;
19
- }
20
-
21
- nav a {
22
- color: #333;
23
- transition: color 0.3s ease;
24
- }
25
- nav a:hover {
26
- color: var(--tropical-indigo);
27
- }
28
-
29
- .rec-card {
30
- background-color: var(--latte-cream);
31
- border: 1px solid var(--wisteria);
32
- border-radius: 1rem;
33
- padding: 1.25rem;
34
- margin-bottom: 1.5rem;
35
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
36
- transition: all 0.3s ease;
37
- }
38
- .rec-card:hover {
39
- transform: translateY(-3px);
40
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
41
- }
42
-
43
- .rec-title {
44
- font-size: 1.125rem;
45
- font-weight: 700;
46
- color: var(--tropical-indigo);
47
- margin-bottom: 0.5rem;
48
- }
49
-
50
- .rec-badge {
51
- font-size: 0.75rem;
52
- font-weight: 600;
53
- padding: 0.25rem 0.75rem;
54
- border-radius: 9999px;
55
- }
56
- .badge-high {
57
- background-color: #fee2e2;
58
- color: #b91c1c;
59
- }
60
- .badge-medium {
61
- background-color: #fef3c7;
62
- color: #92400e;
63
- }
64
- .badge-low {
65
- background-color: #d1fae5;
66
- color: #065f46;
67
- }
68
-
69
- .rec-content {
70
- list-style-type: disc;
71
- margin-left: 1.25rem;
72
- font-size: 0.875rem;
73
- color: #374151;
74
- }
75
-
76
- .rec-link {
77
- color: var(--tropical-indigo);
78
- text-decoration: underline;
79
- }
80
- .rec-link:hover {
81
- color: #4b7bbd;
82
- }
83
-
84
- .btn-primary {
85
- background-color: var(--tropical-indigo);
86
- color: white;
87
- transition: background-color 0.3s ease;
88
- }
89
- .btn-primary:hover {
90
- background-color: #5ba5dd;
91
- }
92
-
93
- input,
94
- textarea {
95
- border: 1px solid var(--wisteria);
96
- background-color: #fafbfc;
97
- }
98
- input:focus,
99
- textarea:focus {
100
- outline: none;
101
- border-color: var(--tropical-indigo);
102
- box-shadow: 0 0 0 2px rgba(120, 187, 242, 0.3);
103
- }
104
-
105
- h2,
106
- h3 {
107
- color: var(--tropical-indigo);
108
- }
109
-
110
- #chat-output {
111
- background-color: #f7f9fc;
112
- border: 1px solid var(--wisteria);
113
- }
114
- </style>
115
  </head>
116
  <body class="bg-[var(--latte-cream)] font-sans text-gray-800 min-h-screen">
117
  <!-- NAVBAR -->
@@ -128,10 +23,10 @@
128
  </a>
129
 
130
  <ul class="hidden md:flex space-x-6 font-medium text-gray-800">
131
- <li><a href="index.html" class="nav-link">Home</a></li>
 
132
  <li><a href="analyzer.html" class="nav-link">Analyzer</a></li>
133
- <li><a href="past_data.html" class="nav-link">Past Reports</a></li>
134
- <li><a href="profile.html" class="nav-link">Profile</a></li>
135
  <li id="authNavItem"><a href="login.html" class="nav-link">Login</a></li>
136
  </ul>
137
 
@@ -220,9 +115,7 @@
220
  <!-- secound change marker-->
221
  <main class="max-w-5xl mx-auto px-4 mb-16 pt-24">
222
  <!-- Upload Section -->
223
- <div
224
- class="bg-[var(--latte-cream)] border border-[var(--wisteria)] rounded-lg p-6 mb-8"
225
- >
226
  <h2 class="text-xl font-semibold mb-4">
227
  Upload & Analyze Your Medical PDF or Image
228
  </h2>
@@ -325,18 +218,47 @@
325
  window.firestoreDb = db;
326
  window.firestoreHelpers = { collection, doc, addDoc, serverTimestamp };
327
 
328
- onAuthStateChanged(auth, (user) => {
329
- const authNavItem = document.getElementById("authNavItem");
330
- if (authNavItem) {
331
- if (user) {
332
- authNavItem.innerHTML =
333
- '<button onclick="logout()" class="hover:text-[#6B9080] text-red-600">Logout</button>';
334
- } else {
335
- authNavItem.innerHTML =
336
- '<a href="login.html" class="hover:text-[#6B9080]">Login</a>';
337
- }
338
- }
339
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
340
 
341
  window.logout = async () => {
342
  try {
 
1
+ web/analyzer.html<!DOCTYPE html>
2
  <html lang="en">
3
  <head>
4
  <meta charset="UTF-8" />
5
  <title>Document Analyzer | CTRL + ALT + HEAL</title>
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
  <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="style.css" />
9
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  </head>
11
  <body class="bg-[var(--latte-cream)] font-sans text-gray-800 min-h-screen">
12
  <!-- NAVBAR -->
 
23
  </a>
24
 
25
  <ul class="hidden md:flex space-x-6 font-medium text-gray-800">
26
+ <li><a href="index.html" class="nav-link ">Home</a></li>
27
+ <li><a href="profile.html" class="nav-link ">Profile</a></li>
28
  <li><a href="analyzer.html" class="nav-link">Analyzer</a></li>
29
+ <li><a href="past_data.html" class="nav-link ">Past Reports</a></li>
 
30
  <li id="authNavItem"><a href="login.html" class="nav-link">Login</a></li>
31
  </ul>
32
 
 
115
  <!-- secound change marker-->
116
  <main class="max-w-5xl mx-auto px-4 mb-16 pt-24">
117
  <!-- Upload Section -->
118
+ <div class="bg-white border border-gray-200 rounded-lg p-6 shadow mb-6">
 
 
119
  <h2 class="text-xl font-semibold mb-4">
120
  Upload & Analyze Your Medical PDF or Image
121
  </h2>
 
218
  window.firestoreDb = db;
219
  window.firestoreHelpers = { collection, doc, addDoc, serverTimestamp };
220
 
221
+ onAuthStateChanged(auth, (user) => {
222
+ const authNavItem = document.getElementById("authNavItem");
223
+
224
+ // Desktop links
225
+ const homeNavDesktop = document.querySelector('ul.md\\:flex li a[href="index.html"]')?.parentElement;
226
+ const profileNavDesktop = document.querySelector('ul.md\\:flex li a[href="profile.html"]')?.parentElement;
227
+ const pastNavDesktop = document.querySelector('ul.md\\:flex li a[href="past_data.html"]')?.parentElement;
228
+
229
+ // Mobile links
230
+ const profileNavMobile = document.querySelector('#mobile-menu a[href="profile.html"]')?.parentElement;
231
+ const pastNavMobile = document.querySelector('#mobile-menu a[href="past_data.html"]')?.parentElement;
232
+ const homeNavMobile = document.querySelector('#mobile-menu a[href="index.html"]')?.parentElement;
233
+ if (authNavItem) {
234
+ if (user) {
235
+ authNavItem.innerHTML =
236
+ '<button onclick="logout()" class="hover:text-[#6B9080] text-red-600">Logout</button>';
237
+
238
+ // Hide Home
239
+ if (homeNavDesktop) homeNavDesktop.style.display = "none";
240
+ if (homeNavMobile) homeNavMobile.style.display = "none";
241
+ // Show Profile and Past Reports
242
+
243
+ if (profileNavDesktop) profileNavDesktop.style.display = "block";
244
+ if (pastNavDesktop) pastNavDesktop.style.display = "block";
245
+ if (profileNavMobile) profileNavMobile.style.display = "block";
246
+ if (pastNavMobile) pastNavMobile.style.display = "block";
247
+ } else {
248
+ authNavItem.innerHTML =
249
+ '<a href="login.html" class="hover:text-[#6B9080]">Login</a>';
250
+
251
+ // Show Home
252
+ if (homeNavDesktop) homeNavDesktop.style.display = "block";
253
+ if (homeNavMobile) homeNavMobile.style.display = "block";
254
+ // Hide Profile and Past Reports
255
+ if (profileNavDesktop) profileNavDesktop.style.display = "none";
256
+ if (pastNavDesktop) pastNavDesktop.style.display = "none";
257
+ if (profileNavMobile) profileNavMobile.style.display = "none";
258
+ if (pastNavMobile) pastNavMobile.style.display = "none";
259
+ }
260
+ }
261
+ });
262
 
263
  window.logout = async () => {
264
  try {