This commit is contained in:
soraefir
2026-06-04 23:23:55 +02:00
parent a918d0c51e
commit 04501a9d7c
2 changed files with 5 additions and 21 deletions

View File

@@ -124,19 +124,13 @@ let
def _render_svg(profile):
bg = _color(profile.get("background"), "#111827")
fg = _color(profile.get("foreground"), "#f8fafc")
accent = _color(profile.get("accent"), "#38bdf8")
border_radius = _border_radius()
logo_data_uri = _tinted_logo_data_uri(fg)
canvas = 256
badge_svg = f"""
<circle cx="200" cy="56" r="34" fill="{accent}" />
"""
return f"""<svg xmlns="http://www.w3.org/2000/svg" width="{canvas}" height="{canvas}" viewBox="0 0 {canvas} {canvas}">
<rect x="0" y="0" width="{canvas}" height="{canvas}" rx="{border_radius}" ry="{border_radius}" fill="{bg}" />
<image href="{logo_data_uri}" x="0" y="0" width="{canvas}" height="{canvas}" preserveAspectRatio="xMidYMid meet" />
{badge_svg}
</svg>"""