From 81ee4d97804bf68ca28e474f0632deb0c0eb0f67 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Sat, 21 Oct 2023 13:31:39 +0700 Subject: [PATCH] feat: Added border_radius option (#32) --- api/index.ts | 2 ++ src/card.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/api/index.ts b/api/index.ts index ef39906..23919d9 100644 --- a/api/index.ts +++ b/api/index.ts @@ -12,6 +12,7 @@ export type UiConfig = { bgColor: string; Locale: string; borderWidth: number | string; + borderRadius: number | string; }; export default async function readmeStats(req: any, res: any): Promise { @@ -32,6 +33,7 @@ export default async function readmeStats(req: any, res: any): Promise { bgColor: req.query.bg_color || selectTheme.bg_color || defaultTheme.bg_color, Locale: req.query.locale || "en", borderWidth: req.query.border_width || "1", + borderRadius: req.query.border_radius || "4.5", }; if (!username) throw new Error("Username is required"); diff --git a/src/card.ts b/src/card.ts index f371e1a..ecce1e4 100644 --- a/src/card.ts +++ b/src/card.ts @@ -108,7 +108,7 @@ export default function cardStyle(data: GetData, uiConfig: UiConfig): string { ${selectLocale.titleCard.split("{name}").join(data.name) || defaultLocale.titleCard.split("{name}").join(data.name)} - + ${selectLocale.titleCard.split("{name}").join(data.name) || defaultLocale.titleCard.split("{name}").join(data.name)}