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:
@@ -33,7 +33,8 @@ def _render_achievements(achievements: list) -> str:
|
|||||||
|
|
||||||
if a.get("image"):
|
if a.get("image"):
|
||||||
tier = a["id"].rsplit("_", 1)[-1]
|
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:
|
else:
|
||||||
visual_html = f'<div class="ach-icon">{a["icon"]}{lock_overlay}</div>'
|
visual_html = f'<div class="ach-icon">{a["icon"]}{lock_overlay}</div>'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user