DavidFernandes commited on
Commit
5500bfb
·
verified ·
1 Parent(s): 6fbf768

Update theme.py

Browse files
Files changed (1) hide show
  1. theme.py +1 -215
theme.py CHANGED
@@ -1,4 +1,3 @@
1
- <<<<<<< HEAD
2
 
3
  def apply_dark_theme():
4
  return (
@@ -210,217 +209,4 @@ def show_footer():
210
  " CiviDoc AI © 2024"
211
  " </p>"
212
  "</div>"
213
- =======
214
- # utils/theme.py
215
-
216
- def apply_dark_theme():
217
- return (
218
- "<style>"
219
- # Base styles
220
- "body { background-color: #0F172A; color: #E2E8F0; }"
221
- ".main { padding: 0rem 1rem; }"
222
-
223
- # Button styles
224
- ".stButton>button {"
225
- " width: 100%;"
226
- " padding: 1rem;"
227
- " font-size: 1.1em;"
228
- " border-radius: 10px;"
229
- " background-color: #1E293B;"
230
- " color: #E2E8F0;"
231
- " border: 1px solid #3B82F6;"
232
- " box-shadow: 0 2px 5px rgba(0,0,0,0.3);"
233
- " transition: all 0.2s ease;"
234
- "}"
235
- ".stButton>button:hover {"
236
- " transform: translateY(-2px);"
237
- " box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);"
238
- " border-color: #60A5FA;"
239
- " background-color: #2D3748;"
240
- "}"
241
-
242
- # Card styles
243
- ".card {"
244
- " padding: 1.5rem;"
245
- " border-radius: 10px;"
246
- " background-color: #1E293B;"
247
- " margin-bottom: 1rem;"
248
- " border: 1px solid #2D3748;"
249
- " box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);"
250
- " transition: all 0.2s ease;"
251
- "}"
252
- ".card:hover {"
253
- " border-color: #3B82F6;"
254
- " box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);"
255
- " transform: translateY(-2px);"
256
- "}"
257
-
258
- # Typography
259
- "h1, h2, h3, h4, h5, h6 { color: #60A5FA; }"
260
- "h1 { font-size: 2.5em; font-weight: 700; }"
261
- "h2 { font-size: 2em; font-weight: 600; }"
262
- "h3 { font-size: 1.5em; font-weight: 600; }"
263
- "p { line-height: 1.6; }"
264
-
265
- # Form elements
266
- ".stTextInput>div>div>input,"
267
- ".stTextArea>div>div>textarea,"
268
- ".stSelectbox>div>div>select {"
269
- " background-color: #1E293B;"
270
- " color: #E2E8F0;"
271
- " border: 1px solid #3B82F6;"
272
- " border-radius: 8px;"
273
- "}"
274
-
275
- # File uploader
276
- ".stFileUploader>div>button {"
277
- " background-color: #1E293B;"
278
- " color: #E2E8F0;"
279
- " border: 1px dashed #3B82F6;"
280
- " border-radius: 8px;"
281
- "}"
282
- ".stFileUploader>div>button:hover {"
283
- " border-color: #60A5FA;"
284
- " background-color: #2D3748;"
285
- "}"
286
-
287
- # Expander
288
- ".streamlit-expanderHeader {"
289
- " background-color: #1E293B;"
290
- " color: #E2E8F0;"
291
- " border-radius: 8px;"
292
- "}"
293
- ".streamlit-expanderContent {"
294
- " background-color: #1E293B;"
295
- " border: 1px solid #2D3748;"
296
- " border-radius: 0 0 8px 8px;"
297
- "}"
298
-
299
- # Tabs
300
- ".stTabs [data-baseweb='tab-list'] {"
301
- " gap: 8px;"
302
- " background-color: #1E293B;"
303
- " padding: 0.5rem;"
304
- " border-radius: 8px;"
305
- "}"
306
- ".stTabs [data-baseweb='tab'] {"
307
- " height: 50px;"
308
- " background-color: #2D3748;"
309
- " border-radius: 8px;"
310
- " color: #E2E8F0;"
311
- " border: 1px solid #3B82F6;"
312
- "}"
313
- ".stTabs [aria-selected='true'] {"
314
- " background-color: #3B82F6;"
315
- "}"
316
-
317
- # Chat elements
318
- ".chat-message {"
319
- " padding: 1rem;"
320
- " margin: 0.5rem 0;"
321
- " border-radius: 8px;"
322
- " background-color: #1E293B;"
323
- " border: 1px solid #2D3748;"
324
- "}"
325
- ".user-message {"
326
- " background-color: #2D3748;"
327
- " border-color: #3B82F6;"
328
- "}"
329
-
330
- # Status indicators
331
- ".status-badge {"
332
- " display: inline-block;"
333
- " padding: 0.25rem 0.75rem;"
334
- " border-radius: 9999px;"
335
- " font-size: 0.875rem;"
336
- " font-weight: 500;"
337
- " text-align: center;"
338
- "}"
339
- ".status-success { background-color: #065F46; color: #6EE7B7; }"
340
- ".status-warning { background-color: #92400E; color: #FCD34D; }"
341
- ".status-error { background-color: #991B1B; color: #FCA5A5; }"
342
-
343
- # Tooltips
344
- ".tooltip {"
345
- " position: relative;"
346
- " display: inline-block;"
347
- "}"
348
- ".tooltip .tooltiptext {"
349
- " visibility: hidden;"
350
- " background-color: #2D3748;"
351
- " color: #E2E8F0;"
352
- " text-align: center;"
353
- " padding: 0.5rem;"
354
- " border-radius: 6px;"
355
- " border: 1px solid #3B82F6;"
356
- " position: absolute;"
357
- " z-index: 1;"
358
- " bottom: 125%;"
359
- " left: 50%;"
360
- " transform: translateX(-50%);"
361
- " opacity: 0;"
362
- " transition: opacity 0.2s;"
363
- "}"
364
- ".tooltip:hover .tooltiptext {"
365
- " visibility: visible;"
366
- " opacity: 1;"
367
- "}"
368
-
369
- # Progress indicators
370
- ".progress-bar {"
371
- " width: 100%;"
372
- " height: 8px;"
373
- " background-color: #2D3748;"
374
- " border-radius: 4px;"
375
- " overflow: hidden;"
376
- "}"
377
- ".progress-bar-fill {"
378
- " height: 100%;"
379
- " background-color: #3B82F6;"
380
- " transition: width 0.3s ease;"
381
- "}"
382
-
383
- # Custom scrollbar
384
- "::-webkit-scrollbar { width: 8px; height: 8px; }"
385
- "::-webkit-scrollbar-track { background: #1E293B; }"
386
- "::-webkit-scrollbar-thumb { background: #3B82F6; border-radius: 4px; }"
387
- "::-webkit-scrollbar-thumb:hover { background: #60A5FA; }"
388
-
389
- # Animations
390
- "@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }"
391
- ".fade-in { animation: fadeIn 0.3s ease-in; }"
392
-
393
- # Footer
394
- ".footer {"
395
- " text-align: center;"
396
- " color: #94A3B8;"
397
- " padding: 2rem 1rem;"
398
- " margin-top: 2rem;"
399
- " border-top: 1px solid #2D3748;"
400
- "}"
401
- "</style>"
402
- )
403
-
404
- def show_page_header(title, description=None):
405
- header_html = (
406
- "<div style='background-color: #1E293B; padding: 2rem; "+
407
- "border-radius: 10px; margin-bottom: 2rem;'>"+
408
- "<h1 style='color: #60A5FA; margin-bottom: 0.5rem;'>" + title + "</h1>"
409
- )
410
- if description:
411
- header_html += (
412
- "<p style='color: #E2E8F0; font-size: 1.1em;'>" + description + "</p>"
413
- )
414
- header_html += "</div>"
415
- return header_html
416
-
417
- def show_footer():
418
- return (
419
- "<div class='footer'>"
420
- " <p>Need help? Contact our support team</p>"
421
- " <p style='font-size: 0.8em; margin-top: 0.5rem;'>"
422
- " CiviDoc AI © 2024"
423
- " </p>"
424
- "</div>"
425
- >>>>>>> 1bc20a0d3edc7f88f03e506f84b01a7303d403b2
426
- )
 
 
1
 
2
  def apply_dark_theme():
3
  return (
 
209
  " CiviDoc AI © 2024"
210
  " </p>"
211
  "</div>"
212
+ )