fix(bigmind): add background-image inline style to achievement card ach-image divs

The .ach-image div had correct CSS dimensions (64x64) and background-size:cover
but was missing the inline style="background-image: url(...)" — so the div
rendered as an empty circle. Fixed by extracting img_url variable and applying
it as style attribute in the f-string. All 39 achievement PNGs now load.

303/303 tests passing.
This commit is contained in:
Patrick Plate
2026-04-04 19:27:24 +02:00
parent c68acdd030
commit 13659fd414
+2 -1
View File
@@ -33,7 +33,8 @@ def _render_achievements(achievements: list) -> str:
if a.get("image"):
tier = a["id"].rsplit("_", 1)[-1]
visual_html = f'<div class="ach-image tier-{tier}">{lock_overlay}</div>'
img_url = _esc(a["image"])
visual_html = f'<div class="ach-image tier-{tier}" style="background-image: url({img_url});">{lock_overlay}</div>'
else:
visual_html = f'<div class="ach-icon">{a["icon"]}{lock_overlay}</div>'