fix
This commit is contained in:
@@ -124,19 +124,13 @@ let
|
|||||||
def _render_svg(profile):
|
def _render_svg(profile):
|
||||||
bg = _color(profile.get("background"), "#111827")
|
bg = _color(profile.get("background"), "#111827")
|
||||||
fg = _color(profile.get("foreground"), "#f8fafc")
|
fg = _color(profile.get("foreground"), "#f8fafc")
|
||||||
accent = _color(profile.get("accent"), "#38bdf8")
|
|
||||||
border_radius = _border_radius()
|
border_radius = _border_radius()
|
||||||
logo_data_uri = _tinted_logo_data_uri(fg)
|
logo_data_uri = _tinted_logo_data_uri(fg)
|
||||||
|
|
||||||
canvas = 256
|
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}">
|
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}" />
|
<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" />
|
<image href="{logo_data_uri}" x="0" y="0" width="{canvas}" height="{canvas}" preserveAspectRatio="xMidYMid meet" />
|
||||||
{badge_svg}
|
|
||||||
</svg>"""
|
</svg>"""
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -65,35 +65,25 @@
|
|||||||
favicon.extra = {
|
favicon.extra = {
|
||||||
mappings = {
|
mappings = {
|
||||||
"home" = {
|
"home" = {
|
||||||
label = "H";
|
|
||||||
background = "#0f172a";
|
background = "#0f172a";
|
||||||
foreground = "#f8fafc";
|
foreground = "#22c55e";
|
||||||
accent = "#22c55e";
|
|
||||||
};
|
};
|
||||||
"cloud" = {
|
"cloud" = {
|
||||||
label = "C";
|
|
||||||
background = "#0b1220";
|
background = "#0b1220";
|
||||||
foreground = "#f8fafc";
|
foreground = "#38bdf8";
|
||||||
accent = "#38bdf8";
|
|
||||||
};
|
};
|
||||||
"sso" = {
|
"sso" = {
|
||||||
label = "S";
|
|
||||||
background = "#1f1630";
|
background = "#1f1630";
|
||||||
foreground = "#fff7ed";
|
foreground = "#f59e0b";
|
||||||
accent = "#f59e0b";
|
|
||||||
};
|
};
|
||||||
"metrum" = {
|
"metrum" = {
|
||||||
label = "M";
|
|
||||||
background = "#1a1d29";
|
background = "#1a1d29";
|
||||||
foreground = "#f8fafc";
|
foreground = "#a78bfa";
|
||||||
accent = "#a78bfa";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
default = {
|
default = {
|
||||||
label = "?";
|
|
||||||
background = "#111827";
|
background = "#111827";
|
||||||
foreground = "#f9fafb";
|
foreground = "#ffffff";
|
||||||
accent = "#6b7280";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user