goumsss Claude Sonnet 4.6 commited on
Commit
9b756bd
ยท
1 Parent(s): ba16816

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>

Files changed (1) hide show
  1. app.py +5 -3
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
- .gradio-group > .form { padding: 20px 24px !important; }
 
 
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; }