Nischal Subedi commited on
Commit
7c87254
·
1 Parent(s): da0edf8

updated UI v5

Browse files
Files changed (1) hide show
  1. app.py +41 -38
app.py CHANGED
@@ -254,6 +254,19 @@ Answer:"""
254
  heading_font=[themes.GoogleFont("Playfair Display"), "serif"],
255
 
256
  # --- Dark Mode Colors (Legal Noir) ---
 
 
 
 
 
 
 
 
 
 
 
 
 
257
  # Backgrounds
258
  background_page_dark="#0F0F1A", # Overall app background
259
  block_background_fill_dark="#1A1A2B", # Header and main footer background
@@ -266,32 +279,20 @@ Answer:"""
266
  text_color_subdued_dark="#A0A0B0", # Secondary text, placeholders
267
  text_color_header_dark="#EAEAF0", # Heading text (matches body for consistency)
268
 
269
- # Accent/Primary Colors (Goldenrod/Amber)
270
- primary_hue_dark=themes.Color("#FFC107", "#E0A800"), # Main accent color
271
- primary_50_dark="#403200", # Lightest primary tint (for subtle hovers)
272
-
273
  # Borders
274
  border_color_primary_dark="#3F3F5A", # Main borders for blocks/cards
275
  border_color_secondary_dark="#505060", # Lighter borders for internal elements (e.g., table rows)
276
 
277
- # Shadows
278
- shadow_lg_dark="0 1.2rem 3.5rem rgba(0,0,0,0.6)", # Large shadow for main containers
279
- shadow_md_dark="0 0.8rem 2.5rem rgba(0,0,0,0.4)", # Medium shadow for cards
280
- shadow_sm_dark="0 6px 20px rgba(0,0,0,0.35)", # Small shadow for buttons
 
281
 
282
  # Links
283
  link_text_color_dark="#FFC107",
284
  link_text_color_hover_dark="#E0A800",
285
 
286
- # Buttons (custom variant backgrounds will be handled by CSS, but theme sets default)
287
- button_primary_background_dark="#FFC107",
288
- button_primary_background_hover_dark="#E0A800",
289
- button_primary_text_color_dark="#1A1A2B", # Dark text on primary button
290
- button_secondary_background_dark="transparent", # Custom in CSS
291
- button_secondary_background_hover_dark="#403200", # Custom in CSS
292
- button_secondary_text_color_dark="#A0A0B0", # Custom in CSS
293
- button_secondary_border_color_dark="#3F3F5A", # Custom in CSS
294
-
295
  # Error Colors
296
  color_error_50_dark="#4D001A", # Lightest error tint (for background)
297
  color_error_200_dark="#990026", # Medium error (for border)
@@ -300,6 +301,19 @@ Answer:"""
300
 
301
 
302
  # --- Light Mode Colors (Legal Lumen) ---
 
 
 
 
 
 
 
 
 
 
 
 
 
303
  background_page_light="#F0F2F5",
304
  block_background_fill_light="#E0E4EB",
305
  background_fill_primary_light="#FFFFFF",
@@ -310,33 +324,22 @@ Answer:"""
310
  text_color_subdued_light="#6C757D",
311
  text_color_header_light="#212529",
312
 
313
- primary_hue_light=themes.Color("blue", "#007bff", "#0056b3"),
314
- primary_50_light="#E0F0FF",
315
-
316
  border_color_primary_light="#DDE2E8",
317
  border_color_secondary_light="#CCD1D7",
318
 
319
- shadow_lg_light="0 0.8rem 2.5rem rgba(0,0,0,0.15)",
320
- shadow_md_light="0 0.6rem 2rem rgba(0,0,0,0.1)",
321
- shadow_sm_light="0 3px 10px rgba(0,0,0,0.08)",
322
 
323
  link_text_color_light="#007bff",
324
  link_text_color_hover_light="#0056b3",
325
 
326
- button_primary_background_light="#007bff",
327
- button_primary_background_hover_light="#0056b3",
328
- button_primary_text_color_light="#FFFFFF",
329
- button_secondary_background_light="transparent",
330
- button_secondary_background_hover_light="#E0F0FF",
331
- button_secondary_text_color_light="#6C757D",
332
- button_secondary_border_color_light="#DDE2E8",
333
-
334
  color_error_50_light="#F8D7DA",
335
  color_error_200_light="#F5C6CB",
336
  color_error_500_light="#DC3545",
337
  color_error_600_light="#721C24",
338
 
339
- # Radii and Spacing (matching custom CSS)
340
  radius_xs="4px",
341
  radius_sm="8px",
342
  radius_md="12px",
@@ -434,7 +437,7 @@ Answer:"""
434
  padding: var(--spacing-xl) var(--spacing-lg); /* Spacious padding */
435
  text-align: center;
436
  border-radius: var(--radius-lg); /* Use theme radius */
437
- box-shadow: var(--shadow-lg); /* Use theme shadow */
438
  position: relative;
439
  overflow: hidden;
440
  z-index: 10;
@@ -473,7 +476,7 @@ Answer:"""
473
  gap: 2rem; /* Spacing between cards */
474
  background-color: var(--background-fill-primary); /* Use theme's main background */
475
  border-radius: var(--radius-lg);
476
- box-shadow: var(--shadow-lg);
477
  padding: var(--spacing-md); /* Inner padding for the whole dashboard content */
478
  border: 1px solid var(--border-color-primary);
479
  }
@@ -483,7 +486,7 @@ Answer:"""
483
  background-color: var(--background-fill-secondary); /* A slightly darker/lighter background for cards */
484
  border-radius: var(--radius-md);
485
  padding: 2rem; /* Padding inside each card */
486
- box-shadow: var(--shadow-md); /* Subtle shadow for cards */
487
  border: 1px solid var(--border-color-primary);
488
  }
489
 
@@ -558,13 +561,13 @@ Answer:"""
558
  font-weight: 600 !important;
559
  padding: 0.8rem 2rem !important; /* Make buttons slightly less tall */
560
  min-height: 48px; /* Ensure minimum height */
561
- box-shadow: var(--shadow-sm); /* Use theme shadow */
562
  transition: all 0.2s ease-in-out;
563
  transform: translateY(0);
564
  }
565
  .gradio-button:hover:not(:disabled) {
566
  transform: translateY(-3px); /* Subtle lift on hover */
567
- box-shadow: var(--shadow-md);
568
  }
569
  .gradio-button:active:not(:disabled) {
570
  transform: translateY(0);
@@ -690,7 +693,7 @@ Answer:"""
690
  border-top: 1px solid var(--border-color-primary) !important;
691
  padding: 1.5rem 2.5rem; /* Consistent padding */
692
  border-radius: var(--radius-lg);
693
- box-shadow: var(--shadow-lg);
694
  width: 100%;
695
  max-width: 1120px;
696
  margin: var(--spacing-md) auto 0 auto; /* Spacing from main dashboard */
 
254
  heading_font=[themes.GoogleFont("Playfair Display"), "serif"],
255
 
256
  # --- Dark Mode Colors (Legal Noir) ---
257
+ # Primary/Accent Colors (Goldenrod/Amber scale)
258
+ primary_50_dark="#FFFDE7", # Very light yellow/amber
259
+ primary_100_dark="#FFF9C4",
260
+ primary_200_dark="#FFF59D",
261
+ primary_300_dark="#FFF176",
262
+ primary_400_dark="#FFEE58",
263
+ primary_500_dark="#FFC107", # Main accent color
264
+ primary_600_dark="#E0A800", # Hover accent color
265
+ primary_700_dark="#B88A00",
266
+ primary_800_dark="#8D6C00",
267
+ primary_900_dark="#614B00",
268
+ primary_950_dark="#403200", # Darkest amber/brown
269
+
270
  # Backgrounds
271
  background_page_dark="#0F0F1A", # Overall app background
272
  block_background_fill_dark="#1A1A2B", # Header and main footer background
 
279
  text_color_subdued_dark="#A0A0B0", # Secondary text, placeholders
280
  text_color_header_dark="#EAEAF0", # Heading text (matches body for consistency)
281
 
 
 
 
 
282
  # Borders
283
  border_color_primary_dark="#3F3F5A", # Main borders for blocks/cards
284
  border_color_secondary_dark="#505060", # Lighter borders for internal elements (e.g., table rows)
285
 
286
+ # Shadows (as hex colors for theme consistency, will be applied as rgba in CSS)
287
+ shadow_lg_dark="0F0F1A", # Represents darkest shadow color, will be used with rgba
288
+ shadow_md_dark="1A1A2B",
289
+ shadow_sm_dark="1E1E30",
290
+
291
 
292
  # Links
293
  link_text_color_dark="#FFC107",
294
  link_text_color_hover_dark="#E0A800",
295
 
 
 
 
 
 
 
 
 
 
296
  # Error Colors
297
  color_error_50_dark="#4D001A", # Lightest error tint (for background)
298
  color_error_200_dark="#990026", # Medium error (for border)
 
301
 
302
 
303
  # --- Light Mode Colors (Legal Lumen) ---
304
+ # Primary Colors (Standard Blue scale)
305
+ primary_50_light="#E3F2FD",
306
+ primary_100_light="#BBDEFB",
307
+ primary_200_light="#90CAF9",
308
+ primary_300_light="#64B5F6",
309
+ primary_400_light="#42A5F5",
310
+ primary_500_light="#2196F3", # Main blue
311
+ primary_600_light="#1E88E5", # Hover blue
312
+ primary_700_light="#1976D2",
313
+ primary_800_light="#1565C0",
314
+ primary_900_light="#0D47A1",
315
+ primary_950_light="#082F6A",
316
+
317
  background_page_light="#F0F2F5",
318
  block_background_fill_light="#E0E4EB",
319
  background_fill_primary_light="#FFFFFF",
 
324
  text_color_subdued_light="#6C757D",
325
  text_color_header_light="#212529",
326
 
 
 
 
327
  border_color_primary_light="#DDE2E8",
328
  border_color_secondary_light="#CCD1D7",
329
 
330
+ shadow_lg_light="F0F2F5",
331
+ shadow_md_light="E0E4EB",
332
+ shadow_sm_light="FFFFFF",
333
 
334
  link_text_color_light="#007bff",
335
  link_text_color_hover_light="#0056b3",
336
 
 
 
 
 
 
 
 
 
337
  color_error_50_light="#F8D7DA",
338
  color_error_200_light="#F5C6CB",
339
  color_error_500_light="#DC3545",
340
  color_error_600_light="#721C24",
341
 
342
+ # Radii and Spacing (matching custom CSS, and setting theme defaults)
343
  radius_xs="4px",
344
  radius_sm="8px",
345
  radius_md="12px",
 
437
  padding: var(--spacing-xl) var(--spacing-lg); /* Spacious padding */
438
  text-align: center;
439
  border-radius: var(--radius-lg); /* Use theme radius */
440
+ box-shadow: 0 1.2rem 3.5rem rgba(var(--shadow-lg),0.6); /* Use theme shadow color with rgba */
441
  position: relative;
442
  overflow: hidden;
443
  z-index: 10;
 
476
  gap: 2rem; /* Spacing between cards */
477
  background-color: var(--background-fill-primary); /* Use theme's main background */
478
  border-radius: var(--radius-lg);
479
+ box-shadow: 0 0.8rem 2.5rem rgba(var(--shadow-lg),0.4); /* Use theme shadow color with rgba */
480
  padding: var(--spacing-md); /* Inner padding for the whole dashboard content */
481
  border: 1px solid var(--border-color-primary);
482
  }
 
486
  background-color: var(--background-fill-secondary); /* A slightly darker/lighter background for cards */
487
  border-radius: var(--radius-md);
488
  padding: 2rem; /* Padding inside each card */
489
+ box-shadow: 0 0.6rem 2rem rgba(var(--shadow-md),0.2); /* Subtle shadow for cards */
490
  border: 1px solid var(--border-color-primary);
491
  }
492
 
 
561
  font-weight: 600 !important;
562
  padding: 0.8rem 2rem !important; /* Make buttons slightly less tall */
563
  min-height: 48px; /* Ensure minimum height */
564
+ box-shadow: 0 6px 20px rgba(var(--shadow-sm),0.35); /* Use theme shadow color with rgba */
565
  transition: all 0.2s ease-in-out;
566
  transform: translateY(0);
567
  }
568
  .gradio-button:hover:not(:disabled) {
569
  transform: translateY(-3px); /* Subtle lift on hover */
570
+ box-shadow: 0 0.8rem 2.5rem rgba(var(--shadow-md),0.4);
571
  }
572
  .gradio-button:active:not(:disabled) {
573
  transform: translateY(0);
 
693
  border-top: 1px solid var(--border-color-primary) !important;
694
  padding: 1.5rem 2.5rem; /* Consistent padding */
695
  border-radius: var(--radius-lg);
696
+ box-shadow: 0 1.2rem 3.5rem rgba(var(--shadow-lg),0.6); /* Use theme shadow color with rgba */
697
  width: 100%;
698
  max-width: 1120px;
699
  margin: var(--spacing-md) auto 0 auto; /* Spacing from main dashboard */