fix
This commit is contained in:
@@ -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>"""
|
||||
|
||||
|
||||
|
||||
@@ -65,35 +65,25 @@
|
||||
favicon.extra = {
|
||||
mappings = {
|
||||
"home" = {
|
||||
label = "H";
|
||||
background = "#0f172a";
|
||||
foreground = "#f8fafc";
|
||||
accent = "#22c55e";
|
||||
foreground = "#22c55e";
|
||||
};
|
||||
"cloud" = {
|
||||
label = "C";
|
||||
background = "#0b1220";
|
||||
foreground = "#f8fafc";
|
||||
accent = "#38bdf8";
|
||||
foreground = "#38bdf8";
|
||||
};
|
||||
"sso" = {
|
||||
label = "S";
|
||||
background = "#1f1630";
|
||||
foreground = "#fff7ed";
|
||||
accent = "#f59e0b";
|
||||
foreground = "#f59e0b";
|
||||
};
|
||||
"metrum" = {
|
||||
label = "M";
|
||||
background = "#1a1d29";
|
||||
foreground = "#f8fafc";
|
||||
accent = "#a78bfa";
|
||||
foreground = "#a78bfa";
|
||||
};
|
||||
};
|
||||
default = {
|
||||
label = "?";
|
||||
background = "#111827";
|
||||
foreground = "#f9fafb";
|
||||
accent = "#6b7280";
|
||||
foreground = "#ffffff";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user