Djacon commited on
Commit
66f367c
Β·
1 Parent(s): 17962cc

add ugly dark theme

Browse files
static/404.html CHANGED
@@ -105,6 +105,16 @@
105
  </svg>
106
  <span class="mx-3 font-medium">Visit Main Website</span>
107
  </a>
 
 
 
 
 
 
 
 
 
 
108
  </div>
109
  </nav>
110
  </div>
@@ -138,7 +148,7 @@
138
  </style>
139
 
140
  <input id="search" x-model="search" type="text"
141
- class="w-64 h-10 py-2 pl-10 pr-4 text-gray-700 placeholder-gray-400 transition-all duration-150 bg-white border border-gray-200 rounded-md focus:w-80 sm:w-64 sm:focus:w-80 focus:outline-none focus:ring focus:ring-indigo-300 focus:ring-opacity-40"
142
  placeholder="Find anything...">
143
  </div>
144
 
@@ -194,15 +204,15 @@
194
  <img class="flex-shrink-0 object-cover w-8 h-8 rounded-full" src="images/github-mark.svg" alt="github-mark">
195
  </button>
196
 
197
- <div class="absolute right-0 z-20 w-56 py-2 mt-2 overflow-hidden bg-white rounded-md shadow-xl rtl:right-auto rtl:left-0" x-show="dropdownOpen" x-transition:enter="transition ease-out duration-100 transform" x-transition:enter-start="opacity-0 scale-95" x-transition:enter-end="opacity-100 scale-100" x-transition:leave="transition ease-in duration-75 transform" x-transition:leave-start="opacity-100 scale-100" x-transition:leave-end="opacity-0 scale-95" @click.away="dropdownOpen = false" style="display: none;">
198
- <a target="_blank" href="https://github.com/Djacon/text2feature" class="flex items-center p-3 -mt-2 text-sm text-gray-600 transition-colors duration-200 transform hover:bg-gray-100">
199
  <img class="flex-shrink-0 object-cover mx-1 rounded-full w-9 h-9" src="images/github-mark.svg" alt="github-mark">
200
  <div class="mx-1">
201
  <h1 class="text-sm font-semibold text-gray-700">Made By Djacon</h1>
202
  <p class="text-sm text-gray-500">github.com/Djacon</p>
203
  </div>
204
- </a>
205
- </div>
206
  </div>
207
  </div>
208
  </div>
@@ -249,6 +259,29 @@
249
  </main>
250
  </div>
251
  </div>
252
- </body>
253
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
254
  </html>
 
105
  </svg>
106
  <span class="mx-3 font-medium">Visit Main Website</span>
107
  </a>
108
+
109
+ <button class="flex items-center px-4 py-2 text-gray-500 transition-colors duration-300 transform rounded-lg hover:text-gray-600 hover:bg-gray-100 bg-opacity-40"
110
+ onclick="change_theme()">
111
+ <svg class="w-6 h-6" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
112
+ <path
113
+ d="M13 10V14H19V10H13ZM11 10H5V14H11V10ZM13 19H19V16H13V19ZM11 19V16H5V19H11ZM13 5V8H19V5H13ZM11 5H5V8H11V5ZM19 3C20.1046 3 21 3.89543 21 5V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19V5C3 3.89543 3.89543 3 5 3H19Z"
114
+ fill="currentColor"></path>
115
+ </svg>
116
+ <span id='theme-span' class="mx-3 font-medium">Set Light Theme</span>
117
+ </button>
118
  </div>
119
  </nav>
120
  </div>
 
148
  </style>
149
 
150
  <input id="search" x-model="search" type="text"
151
+ class="w-44 h-10 py-2 pl-10 pr-4 text-gray-700 placeholder-gray-400 transition-all duration-150 bg-white border border-gray-200 rounded-md focus:w-80 sm:w-64 sm:focus:w-80 focus:outline-none focus:ring focus:ring-indigo-300 focus:ring-opacity-40"
152
  placeholder="Find anything...">
153
  </div>
154
 
 
204
  <img class="flex-shrink-0 object-cover w-8 h-8 rounded-full" src="images/github-mark.svg" alt="github-mark">
205
  </button>
206
 
207
+ <a href="https://github.com/Djacon/text2feature" target="_blank" class="absolute right-0 z-20 w-56 py-2 mt-2 overflow-hidden bg-white rounded-md shadow-xl rtl:right-auto rtl:left-0 hover:bg-gray-100" x-show="dropdownOpen" x-transition:enter="transition ease-out duration-100 transform" x-transition:enter-start="opacity-0 scale-95" x-transition:enter-end="opacity-100 scale-100" x-transition:leave="transition ease-in duration-75 transform" x-transition:leave-start="opacity-100 scale-100" x-transition:leave-end="opacity-0 scale-95" @click.away="dropdownOpen = false" style="display: none;">
208
+ <div class="flex items-center p-3 -mt-2 text-sm text-gray-600 transition-colors duration-200 transform">
209
  <img class="flex-shrink-0 object-cover mx-1 rounded-full w-9 h-9" src="images/github-mark.svg" alt="github-mark">
210
  <div class="mx-1">
211
  <h1 class="text-sm font-semibold text-gray-700">Made By Djacon</h1>
212
  <p class="text-sm text-gray-500">github.com/Djacon</p>
213
  </div>
214
+ </div>
215
+ </a>
216
  </div>
217
  </div>
218
  </div>
 
259
  </main>
260
  </div>
261
  </div>
 
262
 
263
+ <script>
264
+ if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
265
+ localStorage.theme = 'dark';
266
+ document.documentElement.classList.add('dark');
267
+ document.getElementById('theme-span').innerText = 'Set Light Theme';
268
+ } else {
269
+ localStorage.theme = 'light';
270
+ document.documentElement.classList.remove('dark');
271
+ document.getElementById('theme-span').innerText = 'Set Dark Theme';
272
+ }
273
+
274
+ function change_theme() {
275
+ if (localStorage.theme === 'dark') {
276
+ localStorage.theme = 'light';
277
+ document.documentElement.classList.remove('dark');
278
+ document.getElementById('theme-span').innerText = 'Set Dark Theme';
279
+ } else {
280
+ localStorage.theme = 'dark';
281
+ document.documentElement.classList.add('dark');
282
+ document.getElementById('theme-span').innerText = 'Set Light Theme';
283
+ }
284
+ }
285
+ </script>
286
+ </body>
287
  </html>
static/css/main.css CHANGED
@@ -797,6 +797,10 @@ select {
797
  width: 8rem
798
  }
799
 
 
 
 
 
800
  .w-6 {
801
  width: 1.5rem
802
  }
@@ -2390,3 +2394,16 @@ select {
2390
  max-width: 42rem
2391
  }
2392
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
797
  width: 8rem
798
  }
799
 
800
+ .w-44 {
801
+ width: 11rem
802
+ }
803
+
804
  .w-6 {
805
  width: 1.5rem
806
  }
 
2394
  max-width: 42rem
2395
  }
2396
  }
2397
+
2398
+
2399
+ /* .dark-bg {
2400
+ background-color: #1a1a1a;
2401
+ }
2402
+
2403
+ .dark-nav {
2404
+ background-color: #282828;
2405
+ } */
2406
+
2407
+ .dark {
2408
+ filter: invert(90%);
2409
+ }
static/emotion_detection.html CHANGED
@@ -104,6 +104,16 @@
104
  </svg>
105
  <span class="mx-3 font-medium">Visit Main Website</span>
106
  </a>
 
 
 
 
 
 
 
 
 
 
107
  </div>
108
  </nav>
109
  </div>
@@ -137,7 +147,7 @@
137
  </style>
138
 
139
  <input id="search" x-model="search" type="text"
140
- class="w-64 h-10 py-2 pl-10 pr-4 text-gray-700 placeholder-gray-400 transition-all duration-150 bg-white border border-gray-200 rounded-md focus:w-80 sm:w-64 sm:focus:w-80 focus:outline-none focus:ring focus:ring-indigo-300 focus:ring-opacity-40"
141
  placeholder="Find anything...">
142
  </div>
143
 
@@ -193,15 +203,15 @@
193
  <img class="flex-shrink-0 object-cover w-8 h-8 rounded-full" src="images/github-mark.svg" alt="github-mark">
194
  </button>
195
 
196
- <div class="absolute right-0 z-20 w-56 py-2 mt-2 overflow-hidden bg-white rounded-md shadow-xl rtl:right-auto rtl:left-0" x-show="dropdownOpen" x-transition:enter="transition ease-out duration-100 transform" x-transition:enter-start="opacity-0 scale-95" x-transition:enter-end="opacity-100 scale-100" x-transition:leave="transition ease-in duration-75 transform" x-transition:leave-start="opacity-100 scale-100" x-transition:leave-end="opacity-0 scale-95" @click.away="dropdownOpen = false" style="display: none;">
197
- <a target="_blank" href="https://github.com/Djacon/text2feature" class="flex items-center p-3 -mt-2 text-sm text-gray-600 transition-colors duration-200 transform hover:bg-gray-100">
198
  <img class="flex-shrink-0 object-cover mx-1 rounded-full w-9 h-9" src="images/github-mark.svg" alt="github-mark">
199
  <div class="mx-1">
200
  <h1 class="text-sm font-semibold text-gray-700">Made By Djacon</h1>
201
  <p class="text-sm text-gray-500">github.com/Djacon</p>
202
  </div>
203
- </a>
204
- </div>
205
  </div>
206
  </div>
207
  </div>
@@ -291,21 +301,26 @@
291
 
292
  <div class="w-full p-4 mt-8 bg-white rounded-lg xl:p-6">
293
  <h1 class="text-lg font-medium text-gray-700 capitalize sm:text-xl md:text-2xl">Result</h1>
294
-
 
 
 
 
 
295
  <div class="md:flex gap-8">
296
  <div class="w-full md:w-1/2 grid-cols-2 mt-6">
297
  <label for="description"
298
  class="block text-sm text-gray-700 capitalize">Extracted Text</label>
299
- <textarea disabled id="extracted-text"
300
- class="minh-text block w-full px-4 py-2.5 mt-2 text-gray-600 placeholder-gray-400 bg-white border border-gray-200 rounded-md focus:border-indigo-400 focus:outline-none focus:ring focus:ring-indigo-300 focus:ring-opacity-40"
301
  style="min-height: 250px;"></textarea>
302
  </div>
303
 
304
  <div class="w-full md:w-1/2 grid-cols-2 mt-6">
305
  <label for="description"
306
  class="block text-sm text-gray-700 capitalize">Emotion Prediction</label>
307
- <textarea disabled id="summarized-text"
308
- class="minh-text block w-full px-4 py-2.5 mt-2 text-gray-600 placeholder-gray-400 bg-white border border-gray-200 rounded-md focus:border-indigo-400 focus:outline-none focus:ring focus:ring-indigo-300 focus:ring-opacity-40"
309
  style="min-height: 250px;"></textarea>
310
  </div>
311
  </div>
@@ -316,6 +331,30 @@
316
  </div>
317
  </div>
318
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
319
  <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.0.943/pdf.min.js"></script>
320
  <script src="js/detection.js"></script>
321
  </body>
 
104
  </svg>
105
  <span class="mx-3 font-medium">Visit Main Website</span>
106
  </a>
107
+
108
+ <button class="flex items-center px-4 py-2 text-gray-500 transition-colors duration-300 transform rounded-lg hover:text-gray-600 hover:bg-gray-100 bg-opacity-40"
109
+ onclick="change_theme()">
110
+ <svg class="w-6 h-6" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
111
+ <path
112
+ d="M13 10V14H19V10H13ZM11 10H5V14H11V10ZM13 19H19V16H13V19ZM11 19V16H5V19H11ZM13 5V8H19V5H13ZM11 5H5V8H11V5ZM19 3C20.1046 3 21 3.89543 21 5V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19V5C3 3.89543 3.89543 3 5 3H19Z"
113
+ fill="currentColor"></path>
114
+ </svg>
115
+ <span id='theme-span' class="mx-3 font-medium">Set Light Theme</span>
116
+ </button>
117
  </div>
118
  </nav>
119
  </div>
 
147
  </style>
148
 
149
  <input id="search" x-model="search" type="text"
150
+ class="w-44 h-10 py-2 pl-10 pr-4 text-gray-700 placeholder-gray-400 transition-all duration-150 bg-white border border-gray-200 rounded-md focus:w-80 sm:w-64 sm:focus:w-80 focus:outline-none focus:ring focus:ring-indigo-300 focus:ring-opacity-40"
151
  placeholder="Find anything...">
152
  </div>
153
 
 
203
  <img class="flex-shrink-0 object-cover w-8 h-8 rounded-full" src="images/github-mark.svg" alt="github-mark">
204
  </button>
205
 
206
+ <a href="https://github.com/Djacon/text2feature" target="_blank" class="absolute right-0 z-20 w-56 py-2 mt-2 overflow-hidden bg-white rounded-md shadow-xl rtl:right-auto rtl:left-0 hover:bg-gray-100" x-show="dropdownOpen" x-transition:enter="transition ease-out duration-100 transform" x-transition:enter-start="opacity-0 scale-95" x-transition:enter-end="opacity-100 scale-100" x-transition:leave="transition ease-in duration-75 transform" x-transition:leave-start="opacity-100 scale-100" x-transition:leave-end="opacity-0 scale-95" @click.away="dropdownOpen = false" style="display: none;">
207
+ <div class="flex items-center p-3 -mt-2 text-sm text-gray-600 transition-colors duration-200 transform">
208
  <img class="flex-shrink-0 object-cover mx-1 rounded-full w-9 h-9" src="images/github-mark.svg" alt="github-mark">
209
  <div class="mx-1">
210
  <h1 class="text-sm font-semibold text-gray-700">Made By Djacon</h1>
211
  <p class="text-sm text-gray-500">github.com/Djacon</p>
212
  </div>
213
+ </div>
214
+ </a>
215
  </div>
216
  </div>
217
  </div>
 
301
 
302
  <div class="w-full p-4 mt-8 bg-white rounded-lg xl:p-6">
303
  <h1 class="text-lg font-medium text-gray-700 capitalize sm:text-xl md:text-2xl">Result</h1>
304
+ <style>
305
+ textarea.disabled {
306
+ background-color: transparent;
307
+ pointer-events: none;
308
+ }
309
+ </style>
310
  <div class="md:flex gap-8">
311
  <div class="w-full md:w-1/2 grid-cols-2 mt-6">
312
  <label for="description"
313
  class="block text-sm text-gray-700 capitalize">Extracted Text</label>
314
+ <textarea id="extracted-text"
315
+ class="disabled minh-text block w-full px-4 py-2.5 mt-2 text-gray-600 placeholder-gray-400 bg-white border border-gray-200 rounded-md focus:border-indigo-400 focus:outline-none focus:ring focus:ring-indigo-300 focus:ring-opacity-40"
316
  style="min-height: 250px;"></textarea>
317
  </div>
318
 
319
  <div class="w-full md:w-1/2 grid-cols-2 mt-6">
320
  <label for="description"
321
  class="block text-sm text-gray-700 capitalize">Emotion Prediction</label>
322
+ <textarea id="summarized-text"
323
+ class="disabled minh-text block w-full px-4 py-2.5 mt-2 text-gray-600 placeholder-gray-400 bg-white border border-gray-200 rounded-md focus:border-indigo-400 focus:outline-none focus:ring focus:ring-indigo-300 focus:ring-opacity-40"
324
  style="min-height: 250px;"></textarea>
325
  </div>
326
  </div>
 
331
  </div>
332
  </div>
333
 
334
+ <script>
335
+ if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
336
+ localStorage.theme = 'dark';
337
+ document.documentElement.classList.add('dark');
338
+ document.getElementById('theme-span').innerText = 'Set Light Theme';
339
+ } else {
340
+ localStorage.theme = 'light';
341
+ document.documentElement.classList.remove('dark');
342
+ document.getElementById('theme-span').innerText = 'Set Dark Theme';
343
+ }
344
+
345
+ function change_theme() {
346
+ if (localStorage.theme === 'dark') {
347
+ localStorage.theme = 'light';
348
+ document.documentElement.classList.remove('dark');
349
+ document.getElementById('theme-span').innerText = 'Set Dark Theme';
350
+ } else {
351
+ localStorage.theme = 'dark';
352
+ document.documentElement.classList.add('dark');
353
+ document.getElementById('theme-span').innerText = 'Set Light Theme';
354
+ }
355
+ }
356
+ </script>
357
+
358
  <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.0.943/pdf.min.js"></script>
359
  <script src="js/detection.js"></script>
360
  </body>
static/index.html CHANGED
@@ -104,6 +104,16 @@
104
  </svg>
105
  <span class="mx-3 font-medium">Visit Main Website</span>
106
  </a>
 
 
 
 
 
 
 
 
 
 
107
  </div>
108
  </nav>
109
  </div>
@@ -137,7 +147,7 @@
137
  </style>
138
 
139
  <input id="search" x-model="search" type="text"
140
- class="w-64 h-10 py-2 pl-10 pr-4 text-gray-700 placeholder-gray-400 transition-all duration-150 bg-white border border-gray-200 rounded-md focus:w-80 sm:w-64 sm:focus:w-80 focus:outline-none focus:ring focus:ring-indigo-300 focus:ring-opacity-40"
141
  placeholder="Find anything...">
142
  </div>
143
 
@@ -193,15 +203,15 @@
193
  <img class="flex-shrink-0 object-cover w-8 h-8 rounded-full" src="images/github-mark.svg" alt="github-mark">
194
  </button>
195
 
196
- <div class="absolute right-0 z-20 w-56 py-2 mt-2 overflow-hidden bg-white rounded-md shadow-xl rtl:right-auto rtl:left-0" x-show="dropdownOpen" x-transition:enter="transition ease-out duration-100 transform" x-transition:enter-start="opacity-0 scale-95" x-transition:enter-end="opacity-100 scale-100" x-transition:leave="transition ease-in duration-75 transform" x-transition:leave-start="opacity-100 scale-100" x-transition:leave-end="opacity-0 scale-95" @click.away="dropdownOpen = false" style="display: none;">
197
- <a target="_blank" href="https://github.com/Djacon/text2feature" class="flex items-center p-3 -mt-2 text-sm text-gray-600 transition-colors duration-200 transform hover:bg-gray-100">
198
  <img class="flex-shrink-0 object-cover mx-1 rounded-full w-9 h-9" src="images/github-mark.svg" alt="github-mark">
199
  <div class="mx-1">
200
  <h1 class="text-sm font-semibold text-gray-700">Made By Djacon</h1>
201
  <p class="text-sm text-gray-500">github.com/Djacon</p>
202
  </div>
203
- </a>
204
- </div>
205
  </div>
206
  </div>
207
  </div>
@@ -782,6 +792,30 @@
782
  </main>
783
  </div>
784
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
785
  </body>
786
 
787
  </html>
 
104
  </svg>
105
  <span class="mx-3 font-medium">Visit Main Website</span>
106
  </a>
107
+
108
+ <button class="flex items-center px-4 py-2 text-gray-500 transition-colors duration-300 transform rounded-lg hover:text-gray-600 hover:bg-gray-100 bg-opacity-40"
109
+ onclick="change_theme()">
110
+ <svg class="w-6 h-6" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
111
+ <path
112
+ d="M13 10V14H19V10H13ZM11 10H5V14H11V10ZM13 19H19V16H13V19ZM11 19V16H5V19H11ZM13 5V8H19V5H13ZM11 5H5V8H11V5ZM19 3C20.1046 3 21 3.89543 21 5V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19V5C3 3.89543 3.89543 3 5 3H19Z"
113
+ fill="currentColor"></path>
114
+ </svg>
115
+ <span id='theme-span' class="mx-3 font-medium">Set Light Theme</span>
116
+ </button>
117
  </div>
118
  </nav>
119
  </div>
 
147
  </style>
148
 
149
  <input id="search" x-model="search" type="text"
150
+ class="w-44 h-10 py-2 pl-10 pr-4 text-gray-700 placeholder-gray-400 transition-all duration-150 bg-white border border-gray-200 rounded-md focus:w-80 sm:w-64 sm:focus:w-80 focus:outline-none focus:ring focus:ring-indigo-300 focus:ring-opacity-40"
151
  placeholder="Find anything...">
152
  </div>
153
 
 
203
  <img class="flex-shrink-0 object-cover w-8 h-8 rounded-full" src="images/github-mark.svg" alt="github-mark">
204
  </button>
205
 
206
+ <a href="https://github.com/Djacon/text2feature" target="_blank" class="absolute right-0 z-20 w-56 py-2 mt-2 overflow-hidden bg-white rounded-md shadow-xl rtl:right-auto rtl:left-0 hover:bg-gray-100" x-show="dropdownOpen" x-transition:enter="transition ease-out duration-100 transform" x-transition:enter-start="opacity-0 scale-95" x-transition:enter-end="opacity-100 scale-100" x-transition:leave="transition ease-in duration-75 transform" x-transition:leave-start="opacity-100 scale-100" x-transition:leave-end="opacity-0 scale-95" @click.away="dropdownOpen = false" style="display: none;">
207
+ <div class="flex items-center p-3 -mt-2 text-sm text-gray-600 transition-colors duration-200 transform">
208
  <img class="flex-shrink-0 object-cover mx-1 rounded-full w-9 h-9" src="images/github-mark.svg" alt="github-mark">
209
  <div class="mx-1">
210
  <h1 class="text-sm font-semibold text-gray-700">Made By Djacon</h1>
211
  <p class="text-sm text-gray-500">github.com/Djacon</p>
212
  </div>
213
+ </div>
214
+ </a>
215
  </div>
216
  </div>
217
  </div>
 
792
  </main>
793
  </div>
794
  </div>
795
+
796
+ <script>
797
+ if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
798
+ localStorage.theme = 'dark';
799
+ document.documentElement.classList.add('dark');
800
+ document.getElementById('theme-span').innerText = 'Set Light Theme';
801
+ } else {
802
+ localStorage.theme = 'light';
803
+ document.documentElement.classList.remove('dark');
804
+ document.getElementById('theme-span').innerText = 'Set Dark Theme';
805
+ }
806
+
807
+ function change_theme() {
808
+ if (localStorage.theme === 'dark') {
809
+ localStorage.theme = 'light';
810
+ document.documentElement.classList.remove('dark');
811
+ document.getElementById('theme-span').innerText = 'Set Dark Theme';
812
+ } else {
813
+ localStorage.theme = 'dark';
814
+ document.documentElement.classList.add('dark');
815
+ document.getElementById('theme-span').innerText = 'Set Light Theme';
816
+ }
817
+ }
818
+ </script>
819
  </body>
820
 
821
  </html>
static/js/detection.js CHANGED
@@ -30,7 +30,6 @@ function _summarize() {
30
  xhr.onreadystatechange = function () {
31
  if (xhr.readyState === 4 && xhr.status === 200) {
32
  result = xhr.responseText.split("\\n").join("\n");
33
- // result = Object.entries(JSON.parse(resp)).sort((a, b) => b[1] - a[1]).map(a => a[0]+': '+a[1]).join('\n');
34
  summaryText.value = result.slice(1, -1);
35
  }
36
  };
 
30
  xhr.onreadystatechange = function () {
31
  if (xhr.readyState === 4 && xhr.status === 200) {
32
  result = xhr.responseText.split("\\n").join("\n");
 
33
  summaryText.value = result.slice(1, -1);
34
  }
35
  };
static/text_summarizer.html CHANGED
@@ -104,6 +104,16 @@
104
  </svg>
105
  <span class="mx-3 font-medium">Visit Main Website</span>
106
  </a>
 
 
 
 
 
 
 
 
 
 
107
  </div>
108
  </nav>
109
  </div>
@@ -137,7 +147,7 @@
137
  </style>
138
 
139
  <input id="search" x-model="search" type="text"
140
- class="w-64 h-10 py-2 pl-10 pr-4 text-gray-700 placeholder-gray-400 transition-all duration-150 bg-white border border-gray-200 rounded-md focus:w-80 sm:w-64 sm:focus:w-80 focus:outline-none focus:ring focus:ring-indigo-300 focus:ring-opacity-40"
141
  placeholder="Find anything...">
142
  </div>
143
 
@@ -193,15 +203,15 @@
193
  <img class="flex-shrink-0 object-cover w-8 h-8 rounded-full" src="images/github-mark.svg" alt="github-mark">
194
  </button>
195
 
196
- <div class="absolute right-0 z-20 w-56 py-2 mt-2 overflow-hidden bg-white rounded-md shadow-xl rtl:right-auto rtl:left-0" x-show="dropdownOpen" x-transition:enter="transition ease-out duration-100 transform" x-transition:enter-start="opacity-0 scale-95" x-transition:enter-end="opacity-100 scale-100" x-transition:leave="transition ease-in duration-75 transform" x-transition:leave-start="opacity-100 scale-100" x-transition:leave-end="opacity-0 scale-95" @click.away="dropdownOpen = false" style="display: none;">
197
- <a target="_blank" href="https://github.com/Djacon/text2feature" class="flex items-center p-3 -mt-2 text-sm text-gray-600 transition-colors duration-200 transform hover:bg-gray-100">
198
  <img class="flex-shrink-0 object-cover mx-1 rounded-full w-9 h-9" src="images/github-mark.svg" alt="github-mark">
199
  <div class="mx-1">
200
  <h1 class="text-sm font-semibold text-gray-700">Made By Djacon</h1>
201
  <p class="text-sm text-gray-500">github.com/Djacon</p>
202
  </div>
203
- </a>
204
- </div>
205
  </div>
206
  </div>
207
  </div>
@@ -293,20 +303,26 @@
293
  <div class="w-full p-4 mt-8 bg-white rounded-lg xl:p-6">
294
  <h1 class="text-lg font-medium text-gray-700 capitalize sm:text-xl md:text-2xl">Result</h1>
295
 
 
 
 
 
 
 
296
  <div class="md:flex gap-8">
297
  <div class="w-full md:w-1/2 grid-cols-2 mt-6">
298
  <label for="description"
299
  class="block text-sm text-gray-700 capitalize">Extracted Text</label>
300
- <textarea disabled id="extracted-text"
301
- class="minh-text block w-full px-4 py-2.5 mt-2 text-gray-600 placeholder-gray-400 bg-white border border-gray-200 rounded-md focus:border-indigo-400 focus:outline-none focus:ring focus:ring-indigo-300 focus:ring-opacity-40"
302
  style="min-height: 300px;"></textarea>
303
  </div>
304
 
305
  <div class="w-full md:w-1/2 grid-cols-2 mt-6">
306
  <label for="description"
307
  class="block text-sm text-gray-700 capitalize">Summarized Text</label>
308
- <textarea disabled id="summarized-text"
309
- class="minh-text block w-full px-4 py-2.5 mt-2 text-gray-600 placeholder-gray-400 bg-white border border-gray-200 rounded-md focus:border-indigo-400 focus:outline-none focus:ring focus:ring-indigo-300 focus:ring-opacity-40"
310
  style="min-height: 300px;"></textarea>
311
  </div>
312
  </div>
@@ -317,6 +333,30 @@
317
  </div>
318
  </div>
319
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
320
  <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.0.943/pdf.min.js"></script>
321
  <script src="js/summarizer.js"></script>
322
  </body>
 
104
  </svg>
105
  <span class="mx-3 font-medium">Visit Main Website</span>
106
  </a>
107
+
108
+ <button class="flex items-center px-4 py-2 text-gray-500 transition-colors duration-300 transform rounded-lg hover:text-gray-600 hover:bg-gray-100 bg-opacity-40"
109
+ onclick="change_theme()">
110
+ <svg class="w-6 h-6" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
111
+ <path
112
+ d="M13 10V14H19V10H13ZM11 10H5V14H11V10ZM13 19H19V16H13V19ZM11 19V16H5V19H11ZM13 5V8H19V5H13ZM11 5H5V8H11V5ZM19 3C20.1046 3 21 3.89543 21 5V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19V5C3 3.89543 3.89543 3 5 3H19Z"
113
+ fill="currentColor"></path>
114
+ </svg>
115
+ <span id='theme-span' class="mx-3 font-medium">Set Light Theme</span>
116
+ </button>
117
  </div>
118
  </nav>
119
  </div>
 
147
  </style>
148
 
149
  <input id="search" x-model="search" type="text"
150
+ class="w-44 h-10 py-2 pl-10 pr-4 text-gray-700 placeholder-gray-400 transition-all duration-150 bg-white border border-gray-200 rounded-md focus:w-80 sm:w-64 sm:focus:w-80 focus:outline-none focus:ring focus:ring-indigo-300 focus:ring-opacity-40"
151
  placeholder="Find anything...">
152
  </div>
153
 
 
203
  <img class="flex-shrink-0 object-cover w-8 h-8 rounded-full" src="images/github-mark.svg" alt="github-mark">
204
  </button>
205
 
206
+ <a href="https://github.com/Djacon/text2feature" target="_blank" class="absolute right-0 z-20 w-56 py-2 mt-2 overflow-hidden bg-white rounded-md shadow-xl rtl:right-auto rtl:left-0 hover:bg-gray-100" x-show="dropdownOpen" x-transition:enter="transition ease-out duration-100 transform" x-transition:enter-start="opacity-0 scale-95" x-transition:enter-end="opacity-100 scale-100" x-transition:leave="transition ease-in duration-75 transform" x-transition:leave-start="opacity-100 scale-100" x-transition:leave-end="opacity-0 scale-95" @click.away="dropdownOpen = false" style="display: none;">
207
+ <div class="flex items-center p-3 -mt-2 text-sm text-gray-600 transition-colors duration-200 transform">
208
  <img class="flex-shrink-0 object-cover mx-1 rounded-full w-9 h-9" src="images/github-mark.svg" alt="github-mark">
209
  <div class="mx-1">
210
  <h1 class="text-sm font-semibold text-gray-700">Made By Djacon</h1>
211
  <p class="text-sm text-gray-500">github.com/Djacon</p>
212
  </div>
213
+ </div>
214
+ </a>
215
  </div>
216
  </div>
217
  </div>
 
303
  <div class="w-full p-4 mt-8 bg-white rounded-lg xl:p-6">
304
  <h1 class="text-lg font-medium text-gray-700 capitalize sm:text-xl md:text-2xl">Result</h1>
305
 
306
+ <style>
307
+ textarea.disabled {
308
+ background-color: transparent;
309
+ pointer-events: none;
310
+ }
311
+ </style>
312
  <div class="md:flex gap-8">
313
  <div class="w-full md:w-1/2 grid-cols-2 mt-6">
314
  <label for="description"
315
  class="block text-sm text-gray-700 capitalize">Extracted Text</label>
316
+ <textarea id="extracted-text"
317
+ class="disabled minh-text block w-full px-4 py-2.5 mt-2 text-gray-600 placeholder-gray-400 bg-white border border-gray-200 rounded-md focus:border-indigo-400 focus:outline-none focus:ring focus:ring-indigo-300 focus:ring-opacity-40"
318
  style="min-height: 300px;"></textarea>
319
  </div>
320
 
321
  <div class="w-full md:w-1/2 grid-cols-2 mt-6">
322
  <label for="description"
323
  class="block text-sm text-gray-700 capitalize">Summarized Text</label>
324
+ <textarea id="summarized-text"
325
+ class="disabled minh-text block w-full px-4 py-2.5 mt-2 text-gray-600 placeholder-gray-400 bg-white border border-gray-200 rounded-md focus:border-indigo-400 focus:outline-none focus:ring focus:ring-indigo-300 focus:ring-opacity-40"
326
  style="min-height: 300px;"></textarea>
327
  </div>
328
  </div>
 
333
  </div>
334
  </div>
335
 
336
+ <script>
337
+ if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
338
+ localStorage.theme = 'dark';
339
+ document.documentElement.classList.add('dark');
340
+ document.getElementById('theme-span').innerText = 'Set Light Theme';
341
+ } else {
342
+ localStorage.theme = 'light';
343
+ document.documentElement.classList.remove('dark');
344
+ document.getElementById('theme-span').innerText = 'Set Dark Theme';
345
+ }
346
+
347
+ function change_theme() {
348
+ if (localStorage.theme === 'dark') {
349
+ localStorage.theme = 'light';
350
+ document.documentElement.classList.remove('dark');
351
+ document.getElementById('theme-span').innerText = 'Set Dark Theme';
352
+ } else {
353
+ localStorage.theme = 'dark';
354
+ document.documentElement.classList.add('dark');
355
+ document.getElementById('theme-span').innerText = 'Set Light Theme';
356
+ }
357
+ }
358
+ </script>
359
+
360
  <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.0.943/pdf.min.js"></script>
361
  <script src="js/summarizer.js"></script>
362
  </body>