Spaces:
Running
Running
fix: theme compatible with gradio 5 (remove .set() CSS vars)
Browse files- ui/theme.py +7 -12
ui/theme.py
CHANGED
|
@@ -7,21 +7,16 @@ def build_champ_theme() -> gr.Theme:
|
|
| 7 |
neutral_hue=gr.themes.colors.slate,
|
| 8 |
font=[gr.themes.GoogleFont("Press Start 2P"), gr.themes.GoogleFont("VT323"), "monospace"],
|
| 9 |
font_mono=[gr.themes.GoogleFont("VT323"), "monospace"],
|
| 10 |
-
).set(
|
| 11 |
-
body_background_fill="#0d0d0d", body_background_fill_dark="#0d0d0d",
|
| 12 |
-
block_background_fill="#1a1a2e", block_background_fill_dark="#1a1a2e",
|
| 13 |
-
block_border_color="#ffd700", block_border_color_dark="#ffd700",
|
| 14 |
-
body_text_color="#e0e0e0", body_text_color_dark="#e0e0e0",
|
| 15 |
-
button_primary_background_fill="#ffd700",
|
| 16 |
-
button_primary_background_fill_hover="#ffaa00",
|
| 17 |
-
button_primary_text_color="#0d0d0d",
|
| 18 |
-
input_background_fill="#16213e", input_background_fill_dark="#16213e",
|
| 19 |
-
input_border_color="#ffd700",
|
| 20 |
)
|
| 21 |
|
| 22 |
CHAMP_CSS = """
|
| 23 |
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323:wght@400&display=swap');
|
| 24 |
-
body { background-color: #0d0d0d !important; }
|
| 25 |
-
.gradio-container { max-width: 960px; margin: 0 auto;
|
| 26 |
h1, h2, h3 { font-family: 'Press Start 2P', cursive; color: #ffd700; text-shadow: 0 0 10px #ffd700aa; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
"""
|
|
|
|
| 7 |
neutral_hue=gr.themes.colors.slate,
|
| 8 |
font=[gr.themes.GoogleFont("Press Start 2P"), gr.themes.GoogleFont("VT323"), "monospace"],
|
| 9 |
font_mono=[gr.themes.GoogleFont("VT323"), "monospace"],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
)
|
| 11 |
|
| 12 |
CHAMP_CSS = """
|
| 13 |
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323:wght@400&display=swap');
|
| 14 |
+
body, .gradio-container { background-color: #0d0d0d !important; }
|
| 15 |
+
.gradio-container { max-width: 960px; margin: 0 auto; }
|
| 16 |
h1, h2, h3 { font-family: 'Press Start 2P', cursive; color: #ffd700; text-shadow: 0 0 10px #ffd700aa; }
|
| 17 |
+
.svelte-1ipelgc, label, .label-wrap { font-family: 'VT323', monospace !important; }
|
| 18 |
+
.block { background: #1a1a2e !important; border-color: #ffd700 !important; }
|
| 19 |
+
button.primary { background: #ffd700 !important; color: #0d0d0d !important; }
|
| 20 |
+
button.primary:hover { background: #ffaa00 !important; }
|
| 21 |
+
input, textarea, select { background: #16213e !important; border-color: #ffd700 !important; color: #e0e0e0 !important; }
|
| 22 |
"""
|