Benedikt Droste Claude Opus 4.5 commited on
Commit ·
7149ea7
1
Parent(s): 2d1ab1a
Add dark theme support using CSS variables
Browse files- Replace hardcoded light colors with Gradio CSS variables
- Add .dark class overrides for thinking section and summary text
- Simplify theme config to use default Soft theme dark mode
- Add .env and CLAUDE.md to .gitignore
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- .gitignore +4 -0
- app.py +71 -172
.gitignore
CHANGED
|
@@ -1,2 +1,6 @@
|
|
| 1 |
# Ignore styling reference files
|
| 2 |
styling_files_elluminate/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# Ignore styling reference files
|
| 2 |
styling_files_elluminate/
|
| 3 |
+
|
| 4 |
+
# Environment and config
|
| 5 |
+
.env
|
| 6 |
+
CLAUDE.md
|
app.py
CHANGED
|
@@ -443,130 +443,104 @@ THEME = gr.themes.Soft(
|
|
| 443 |
neutral_hue="slate",
|
| 444 |
font=gr.themes.GoogleFont("Inter"),
|
| 445 |
).set(
|
| 446 |
-
body_background_fill="#f8fafc",
|
| 447 |
-
body_background_fill_dark="#f8fafc",
|
| 448 |
-
block_background_fill="#ffffff",
|
| 449 |
-
block_background_fill_dark="#ffffff",
|
| 450 |
block_radius="0.75rem",
|
| 451 |
-
block_shadow="0 1px 3px 0 rgb(0 0 0 / 0.1)
|
| 452 |
-
|
| 453 |
-
|
| 454 |
-
button_primary_background_fill="#1e293b",
|
| 455 |
-
button_primary_background_fill_hover="#334155",
|
| 456 |
-
button_primary_text_color="#ffffff",
|
| 457 |
-
input_background_fill="#ffffff",
|
| 458 |
-
input_border_color="#e2e8f0",
|
| 459 |
-
input_border_width="1px",
|
| 460 |
)
|
| 461 |
|
| 462 |
CSS = """
|
| 463 |
/* Base layout */
|
| 464 |
.gradio-container {
|
| 465 |
-
max-width:
|
| 466 |
margin: 0 auto !important;
|
| 467 |
-
padding:
|
| 468 |
-
overflow: visible !important;
|
| 469 |
-
}
|
| 470 |
-
|
| 471 |
-
/* Prevent parent elements from clipping corners */
|
| 472 |
-
.gradio-container > div,
|
| 473 |
-
.gradio-row,
|
| 474 |
-
.contain,
|
| 475 |
-
.gap {
|
| 476 |
-
overflow: visible !important;
|
| 477 |
}
|
| 478 |
|
| 479 |
/* Header styling */
|
| 480 |
.main-header {
|
| 481 |
text-align: center;
|
| 482 |
-
|
| 483 |
-
background: #ffffff;
|
| 484 |
-
border-radius: 0.75rem;
|
| 485 |
-
margin-bottom: 1rem;
|
| 486 |
-
border: 1px solid #e2e8f0;
|
| 487 |
}
|
| 488 |
|
| 489 |
.main-header h1 {
|
| 490 |
-
font-size:
|
| 491 |
-
font-weight:
|
| 492 |
-
|
| 493 |
-
|
| 494 |
-
letter-spacing: -0.02em;
|
| 495 |
}
|
| 496 |
|
| 497 |
.main-header p {
|
| 498 |
-
color:
|
| 499 |
font-size: 0.95rem;
|
| 500 |
margin: 0;
|
| 501 |
}
|
| 502 |
|
| 503 |
-
/*
|
| 504 |
-
.input-panel {
|
| 505 |
-
background: #ffffff !important;
|
| 506 |
-
border-radius: 0.75rem !important;
|
| 507 |
-
border: 1px solid #e2e8f0 !important;
|
| 508 |
-
padding: 1rem !important;
|
| 509 |
-
overflow: visible !important;
|
| 510 |
-
}
|
| 511 |
-
|
| 512 |
-
.output-panel {
|
| 513 |
-
background: #ffffff !important;
|
| 514 |
-
border-radius: 0.75rem !important;
|
| 515 |
-
border: 1px solid #e2e8f0 !important;
|
| 516 |
-
padding: 1rem !important;
|
| 517 |
-
min-height: 300px;
|
| 518 |
-
overflow: visible !important;
|
| 519 |
-
}
|
| 520 |
-
|
| 521 |
-
/* Section headers - simpler, not uppercase */
|
| 522 |
.section-title {
|
| 523 |
-
|
| 524 |
-
|
| 525 |
-
|
| 526 |
-
margin-bottom: 0.75rem !important;
|
| 527 |
-
margin-top: 0 !important;
|
| 528 |
padding-left: 4px !important;
|
| 529 |
-
padding-bottom: 0.5rem !important;
|
| 530 |
-
border-bottom: 1px solid #e2e8f0 !important;
|
| 531 |
-
overflow: visible !important;
|
| 532 |
}
|
| 533 |
|
| 534 |
.section-title h3 {
|
| 535 |
-
color:
|
| 536 |
font-size: 0.875rem !important;
|
| 537 |
font-weight: 600 !important;
|
| 538 |
margin: 0 !important;
|
| 539 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 540 |
}
|
| 541 |
|
| 542 |
/* Summary output */
|
| 543 |
.summary-text {
|
| 544 |
-
font-size:
|
| 545 |
-
line-height: 1.
|
| 546 |
-
color:
|
| 547 |
background: transparent !important;
|
| 548 |
}
|
| 549 |
|
| 550 |
-
/* Thinking/Reasoning section */
|
| 551 |
.thinking-section {
|
| 552 |
-
background:
|
| 553 |
-
border-left:
|
| 554 |
-
|
| 555 |
-
|
| 556 |
-
|
|
|
|
| 557 |
}
|
| 558 |
|
| 559 |
-
.thinking-section
|
| 560 |
-
|
| 561 |
-
|
| 562 |
-
|
| 563 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 564 |
}
|
| 565 |
|
| 566 |
/* Summary divider */
|
| 567 |
.summary-divider {
|
| 568 |
height: 1px;
|
| 569 |
-
background:
|
| 570 |
margin: 1.25rem 0;
|
| 571 |
}
|
| 572 |
|
|
@@ -577,21 +551,17 @@ CSS = """
|
|
| 577 |
|
| 578 |
/* Sources panel */
|
| 579 |
.sources-panel {
|
| 580 |
-
|
| 581 |
-
|
| 582 |
-
|
| 583 |
-
|
| 584 |
-
max-height: 300px !important;
|
| 585 |
-
overflow-y: auto !important;
|
| 586 |
-
color: #374151 !important;
|
| 587 |
-
border: 1px solid #e2e8f0 !important;
|
| 588 |
}
|
| 589 |
|
| 590 |
.sources-panel p {
|
| 591 |
-
color:
|
| 592 |
margin-bottom: 0.5rem !important;
|
| 593 |
padding: 0.5rem 0 !important;
|
| 594 |
-
border-bottom: 1px solid
|
| 595 |
line-height: 1.5 !important;
|
| 596 |
}
|
| 597 |
|
|
@@ -601,104 +571,37 @@ CSS = """
|
|
| 601 |
}
|
| 602 |
|
| 603 |
.sources-panel strong {
|
| 604 |
-
color:
|
| 605 |
font-weight: 600 !important;
|
| 606 |
}
|
| 607 |
|
| 608 |
-
/* Accordion styling */
|
| 609 |
-
.accordion {
|
| 610 |
-
background: transparent !important;
|
| 611 |
-
border: 1px solid #e2e8f0 !important;
|
| 612 |
-
border-radius: 0.5rem !important;
|
| 613 |
-
overflow: hidden !important;
|
| 614 |
-
}
|
| 615 |
-
|
| 616 |
-
.accordion > .label-wrap {
|
| 617 |
-
background: #f8fafc !important;
|
| 618 |
-
padding: 0.75rem 1rem !important;
|
| 619 |
-
font-weight: 500 !important;
|
| 620 |
-
color: #374151 !important;
|
| 621 |
-
}
|
| 622 |
-
|
| 623 |
/* Generate button */
|
| 624 |
.generate-btn {
|
| 625 |
-
|
| 626 |
-
|
| 627 |
-
font-weight: 500 !important;
|
| 628 |
-
font-size: 0.95rem !important;
|
| 629 |
-
padding: 0.875rem 1.5rem !important;
|
| 630 |
-
border-radius: 0.5rem !important;
|
| 631 |
-
transition: all 0.15s ease !important;
|
| 632 |
-
color: #ffffff !important;
|
| 633 |
-
width: 100% !important;
|
| 634 |
-
margin-top: 0.5rem !important;
|
| 635 |
-
}
|
| 636 |
-
|
| 637 |
-
.generate-btn:hover {
|
| 638 |
-
background: #334155 !important;
|
| 639 |
-
}
|
| 640 |
-
|
| 641 |
-
.generate-btn:disabled {
|
| 642 |
-
background: #94a3b8 !important;
|
| 643 |
-
}
|
| 644 |
-
|
| 645 |
-
/* Input fields */
|
| 646 |
-
input, textarea, select {
|
| 647 |
-
background: #ffffff !important;
|
| 648 |
-
border: 1px solid #e2e8f0 !important;
|
| 649 |
-
color: #1e293b !important;
|
| 650 |
-
border-radius: 0.5rem !important;
|
| 651 |
-
transition: all 0.15s ease !important;
|
| 652 |
-
}
|
| 653 |
-
|
| 654 |
-
input:focus, textarea:focus, select:focus {
|
| 655 |
-
border-color: #94a3b8 !important;
|
| 656 |
-
box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.2) !important;
|
| 657 |
-
outline: none !important;
|
| 658 |
-
}
|
| 659 |
-
|
| 660 |
-
/* File upload area */
|
| 661 |
-
.upload-button, [data-testid="file"] {
|
| 662 |
-
background: #f8fafc !important;
|
| 663 |
-
border: 1px dashed #cbd5e1 !important;
|
| 664 |
-
border-radius: 0.5rem !important;
|
| 665 |
-
transition: all 0.15s ease !important;
|
| 666 |
-
padding: 1rem !important;
|
| 667 |
-
}
|
| 668 |
-
|
| 669 |
-
.upload-button:hover, [data-testid="file"]:hover {
|
| 670 |
-
border-color: #94a3b8 !important;
|
| 671 |
-
background: #f1f5f9 !important;
|
| 672 |
-
}
|
| 673 |
-
|
| 674 |
-
/* Labels */
|
| 675 |
-
label {
|
| 676 |
-
color: #475569 !important;
|
| 677 |
-
font-weight: 500 !important;
|
| 678 |
-
font-size: 0.875rem !important;
|
| 679 |
}
|
| 680 |
|
| 681 |
/* Footer */
|
| 682 |
.footer {
|
| 683 |
text-align: center;
|
| 684 |
-
|
| 685 |
-
|
| 686 |
-
|
| 687 |
-
|
| 688 |
}
|
| 689 |
|
| 690 |
.footer a {
|
| 691 |
-
color:
|
| 692 |
text-decoration: none;
|
| 693 |
transition: color 0.15s ease;
|
| 694 |
}
|
| 695 |
|
| 696 |
.footer a:hover {
|
| 697 |
-
|
| 698 |
}
|
| 699 |
|
| 700 |
.footer-divider {
|
| 701 |
-
color:
|
| 702 |
margin: 0 0.5rem;
|
| 703 |
}
|
| 704 |
|
|
@@ -713,10 +616,6 @@ footer {
|
|
| 713 |
padding: 1rem !important;
|
| 714 |
}
|
| 715 |
|
| 716 |
-
.main-header {
|
| 717 |
-
padding: 1rem;
|
| 718 |
-
}
|
| 719 |
-
|
| 720 |
.main-header h1 {
|
| 721 |
font-size: 1.5rem;
|
| 722 |
}
|
|
@@ -728,11 +627,11 @@ footer {
|
|
| 728 |
}
|
| 729 |
|
| 730 |
.sources-panel::-webkit-scrollbar-track {
|
| 731 |
-
background:
|
| 732 |
}
|
| 733 |
|
| 734 |
.sources-panel::-webkit-scrollbar-thumb {
|
| 735 |
-
background:
|
| 736 |
border-radius: 2px;
|
| 737 |
}
|
| 738 |
"""
|
|
|
|
| 443 |
neutral_hue="slate",
|
| 444 |
font=gr.themes.GoogleFont("Inter"),
|
| 445 |
).set(
|
|
|
|
|
|
|
|
|
|
|
|
|
| 446 |
block_radius="0.75rem",
|
| 447 |
+
block_shadow="0 1px 3px 0 rgb(0 0 0 / 0.1)",
|
| 448 |
+
button_primary_background_fill="*primary_800",
|
| 449 |
+
button_primary_background_fill_hover="*primary_700",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 450 |
)
|
| 451 |
|
| 452 |
CSS = """
|
| 453 |
/* Base layout */
|
| 454 |
.gradio-container {
|
| 455 |
+
max-width: 1100px !important;
|
| 456 |
margin: 0 auto !important;
|
| 457 |
+
padding-top: 2rem !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 458 |
}
|
| 459 |
|
| 460 |
/* Header styling */
|
| 461 |
.main-header {
|
| 462 |
text-align: center;
|
| 463 |
+
margin-bottom: 2rem;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 464 |
}
|
| 465 |
|
| 466 |
.main-header h1 {
|
| 467 |
+
font-size: 2.25rem;
|
| 468 |
+
font-weight: 800;
|
| 469 |
+
margin-bottom: 0.5rem;
|
| 470 |
+
color: var(--body-text-color);
|
|
|
|
| 471 |
}
|
| 472 |
|
| 473 |
.main-header p {
|
| 474 |
+
color: var(--body-text-color-subdued);
|
| 475 |
font-size: 0.95rem;
|
| 476 |
margin: 0;
|
| 477 |
}
|
| 478 |
|
| 479 |
+
/* Section headers */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 480 |
.section-title {
|
| 481 |
+
margin-bottom: 1rem !important;
|
| 482 |
+
border-bottom: 1px solid var(--border-color-primary);
|
| 483 |
+
padding-bottom: 0.5rem;
|
|
|
|
|
|
|
| 484 |
padding-left: 4px !important;
|
|
|
|
|
|
|
|
|
|
| 485 |
}
|
| 486 |
|
| 487 |
.section-title h3 {
|
| 488 |
+
color: var(--body-text-color) !important;
|
| 489 |
font-size: 0.875rem !important;
|
| 490 |
font-weight: 600 !important;
|
| 491 |
margin: 0 !important;
|
| 492 |
+
}
|
| 493 |
+
|
| 494 |
+
/* Output panels */
|
| 495 |
+
.output-panel {
|
| 496 |
+
background: var(--block-background-fill) !important;
|
| 497 |
+
border-radius: 0.75rem !important;
|
| 498 |
+
border: 1px solid var(--border-color-primary) !important;
|
| 499 |
+
padding: 1.5rem !important;
|
| 500 |
+
min-height: 400px;
|
| 501 |
}
|
| 502 |
|
| 503 |
/* Summary output */
|
| 504 |
.summary-text {
|
| 505 |
+
font-size: 1.05rem !important;
|
| 506 |
+
line-height: 1.8 !important;
|
| 507 |
+
color: var(--body-text-color) !important;
|
| 508 |
background: transparent !important;
|
| 509 |
}
|
| 510 |
|
| 511 |
+
/* Thinking/Reasoning section - Light mode */
|
| 512 |
.thinking-section {
|
| 513 |
+
background: rgba(0, 0, 0, 0.05) !important;
|
| 514 |
+
border-left: 4px solid var(--primary-500) !important;
|
| 515 |
+
padding: 1.25rem !important;
|
| 516 |
+
margin-bottom: 1.5rem !important;
|
| 517 |
+
border-radius: 0 0.75rem 0.75rem 0 !important;
|
| 518 |
+
font-style: italic !important;
|
| 519 |
}
|
| 520 |
|
| 521 |
+
.thinking-section,
|
| 522 |
+
.thinking-section p,
|
| 523 |
+
.thinking-section span {
|
| 524 |
+
color: var(--body-text-color) !important;
|
| 525 |
+
opacity: 0.9;
|
| 526 |
+
}
|
| 527 |
+
|
| 528 |
+
/* Thinking section - Dark mode */
|
| 529 |
+
.dark .thinking-section {
|
| 530 |
+
background: rgba(255, 255, 255, 0.1) !important;
|
| 531 |
+
border-left-color: var(--primary-400) !important;
|
| 532 |
+
}
|
| 533 |
+
|
| 534 |
+
/* Summary text - Dark mode */
|
| 535 |
+
.dark .summary-text,
|
| 536 |
+
.dark .prose {
|
| 537 |
+
color: #f1f5f9 !important;
|
| 538 |
}
|
| 539 |
|
| 540 |
/* Summary divider */
|
| 541 |
.summary-divider {
|
| 542 |
height: 1px;
|
| 543 |
+
background: var(--border-color-primary);
|
| 544 |
margin: 1.25rem 0;
|
| 545 |
}
|
| 546 |
|
|
|
|
| 551 |
|
| 552 |
/* Sources panel */
|
| 553 |
.sources-panel {
|
| 554 |
+
font-size: 0.9rem !important;
|
| 555 |
+
max-height: 400px;
|
| 556 |
+
overflow-y: auto;
|
| 557 |
+
color: var(--body-text-color) !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 558 |
}
|
| 559 |
|
| 560 |
.sources-panel p {
|
| 561 |
+
color: var(--body-text-color) !important;
|
| 562 |
margin-bottom: 0.5rem !important;
|
| 563 |
padding: 0.5rem 0 !important;
|
| 564 |
+
border-bottom: 1px solid var(--border-color-primary) !important;
|
| 565 |
line-height: 1.5 !important;
|
| 566 |
}
|
| 567 |
|
|
|
|
| 571 |
}
|
| 572 |
|
| 573 |
.sources-panel strong {
|
| 574 |
+
color: var(--body-text-color) !important;
|
| 575 |
font-weight: 600 !important;
|
| 576 |
}
|
| 577 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 578 |
/* Generate button */
|
| 579 |
.generate-btn {
|
| 580 |
+
margin-top: 1rem;
|
| 581 |
+
font-weight: 600 !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 582 |
}
|
| 583 |
|
| 584 |
/* Footer */
|
| 585 |
.footer {
|
| 586 |
text-align: center;
|
| 587 |
+
margin-top: 3rem;
|
| 588 |
+
padding-bottom: 2rem;
|
| 589 |
+
font-size: 0.85rem;
|
| 590 |
+
opacity: 0.6;
|
| 591 |
}
|
| 592 |
|
| 593 |
.footer a {
|
| 594 |
+
color: var(--body-text-color);
|
| 595 |
text-decoration: none;
|
| 596 |
transition: color 0.15s ease;
|
| 597 |
}
|
| 598 |
|
| 599 |
.footer a:hover {
|
| 600 |
+
opacity: 0.8;
|
| 601 |
}
|
| 602 |
|
| 603 |
.footer-divider {
|
| 604 |
+
color: var(--border-color-primary);
|
| 605 |
margin: 0 0.5rem;
|
| 606 |
}
|
| 607 |
|
|
|
|
| 616 |
padding: 1rem !important;
|
| 617 |
}
|
| 618 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 619 |
.main-header h1 {
|
| 620 |
font-size: 1.5rem;
|
| 621 |
}
|
|
|
|
| 627 |
}
|
| 628 |
|
| 629 |
.sources-panel::-webkit-scrollbar-track {
|
| 630 |
+
background: var(--block-background-fill);
|
| 631 |
}
|
| 632 |
|
| 633 |
.sources-panel::-webkit-scrollbar-thumb {
|
| 634 |
+
background: var(--border-color-primary);
|
| 635 |
border-radius: 2px;
|
| 636 |
}
|
| 637 |
"""
|