Restore icons in status bar and enforce consistent panel width
Browse files- Status bar: restored ๐ค ๐ฎ ๐ โ
icons alongside new Level: X format
- CSS: added width:100% + box-sizing:border-box to .gradio-group and its .form
so all steps (welcome / picker / game) render at identical width
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
app.py
CHANGED
|
@@ -36,8 +36,8 @@ def _status_text(state: dict) -> str:
|
|
| 36 |
diff = MATH_LEVEL_NAMES.get(_math_level(state), "")
|
| 37 |
correct = state.get("correct_this_level", 0)
|
| 38 |
level = state.get("level", 1)
|
| 39 |
-
return (f"{state['name']} | Level: {level} | "
|
| 40 |
-
f"{diff} | {correct} / {ANSWERS_PER_LEVEL}")
|
| 41 |
|
| 42 |
def _safe_question(state: dict) -> str:
|
| 43 |
return f"## {state.get('question', '')} = ?"
|
|
@@ -433,7 +433,9 @@ BANNER_HTML = f"""
|
|
| 433 |
|
| 434 |
CSS = """
|
| 435 |
.gradio-container { max-width: 560px !important; margin: 0 auto !important; }
|
| 436 |
-
|
|
|
|
|
|
|
| 437 |
.prose h3 { margin-top: 14px !important; margin-bottom: 8px !important; padding-left: 4px !important; }
|
| 438 |
#question-box { text-align: center; font-size: 2.6em; font-weight: bold; padding: 0.5em; }
|
| 439 |
#feedback-box { text-align: center; font-size: 1.3em; min-height: 2em; }
|
|
|
|
| 36 |
diff = MATH_LEVEL_NAMES.get(_math_level(state), "")
|
| 37 |
correct = state.get("correct_this_level", 0)
|
| 38 |
level = state.get("level", 1)
|
| 39 |
+
return (f"๐ค {state['name']} | ๐ฎ Level: {level} | "
|
| 40 |
+
f"๐ {diff} | โ
{correct} / {ANSWERS_PER_LEVEL}")
|
| 41 |
|
| 42 |
def _safe_question(state: dict) -> str:
|
| 43 |
return f"## {state.get('question', '')} = ?"
|
|
|
|
| 433 |
|
| 434 |
CSS = """
|
| 435 |
.gradio-container { max-width: 560px !important; margin: 0 auto !important; }
|
| 436 |
+
/* All top-level panels fill the container identically */
|
| 437 |
+
.gradio-group { width: 100% !important; box-sizing: border-box !important; }
|
| 438 |
+
.gradio-group > .form { padding: 20px 24px !important; box-sizing: border-box !important; width: 100% !important; }
|
| 439 |
.prose h3 { margin-top: 14px !important; margin-bottom: 8px !important; padding-left: 4px !important; }
|
| 440 |
#question-box { text-align: center; font-size: 2.6em; font-weight: bold; padding: 0.5em; }
|
| 441 |
#feedback-box { text-align: center; font-size: 1.3em; min-height: 2em; }
|