feat: stroke alias for stroke_colour
This commit is contained in:
parent
2f0104ed0b
commit
9b20403cef
3 changed files with 5 additions and 3 deletions
|
@ -3,6 +3,7 @@
|
||||||
- Remove unneeded dependency indoc
|
- Remove unneeded dependency indoc
|
||||||
- As a result, Dockerfile no longer requires musl-dev libraries
|
- As a result, Dockerfile no longer requires musl-dev libraries
|
||||||
- Added `backwards_compatibility` option for compatibility with the old 80x80 image size
|
- Added `backwards_compatibility` option for compatibility with the old 80x80 image size
|
||||||
|
- Added equivalent `stroke` query option for `stroke_colour`
|
||||||
|
|
||||||
# 1.0.0 / 2024-11-03
|
# 1.0.0 / 2024-11-03
|
||||||
- Added multithreading support
|
- Added multithreading support
|
||||||
|
|
|
@ -10,6 +10,7 @@ GET /icons/[icon].png - Get an icon rendered in PNG format
|
||||||
padding - integer - Add padding (px) around the icon (default: 0, min: 0, max: 100)
|
padding - integer - Add padding (px) around the icon (default: 0, min: 0, max: 100)
|
||||||
background - hex - Set the background color in hex WITHOUT the hashtag (e.g. FFFFFF) (default: transparent)
|
background - hex - Set the background color in hex WITHOUT the hashtag (e.g. FFFFFF) (default: transparent)
|
||||||
stroke_colour - string - Set the stroke color for the SVG icon, any CSS color WITH the hashtag (default: currentColor)
|
stroke_colour - string - Set the stroke color for the SVG icon, any CSS color WITH the hashtag (default: currentColor)
|
||||||
|
stroke - string - Alias for stroke_colour. Don't use if you are using stroke_colour, undefined behaviour. (default: currentColor)
|
||||||
discord_compatibility - boolean - Set padding to 8px for Discord compatibility. Typically for use in embed author icons as these have a circle clip applied by Discord. Overrides padding if set. (default: false)
|
discord_compatibility - boolean - Set padding to 8px for Discord compatibility. Typically for use in embed author icons as these have a circle clip applied by Discord. Overrides padding if set. (default: false)
|
||||||
backwards_compatibility - boolean - Sets padding to 8px, and scale to 3x for backwards compatibility with older versions of Lucide server (so they are 80x80 again). (default: false)
|
backwards_compatibility - boolean - Sets padding to 8px, and scale to 3x for backwards compatibility with older versions of Lucide server (so they are 80x80 again). (default: false)
|
||||||
cache_key - string - Technically this can have any name. The server does not interpret this at all. Useful for cache busting. (default: none)
|
cache_key - string - Technically this can have any name. The server does not interpret this at all. Useful for cache busting. (default: none)
|
||||||
|
|
|
@ -165,8 +165,8 @@ fn main() {
|
||||||
|
|
||||||
let mut svg_stroke = "currentColor";
|
let mut svg_stroke = "currentColor";
|
||||||
// thx horizell for this code
|
// thx horizell for this code
|
||||||
match (req.url.query.get("stroke_color"), req.url.query.get("stroke_colour")) {
|
match (req.url.query.get("stroke_color"), req.url.query.get("stroke_colour"), req.url.query.get("stroke")) {
|
||||||
(Some(stroke_str), _) | (_, Some(stroke_str)) => svg_stroke = stroke_str,
|
(Some(stroke_str), _, _) | (_, Some(stroke_str), _) | (_, _, Some(stroke_str)) => svg_stroke = stroke_str,
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue