style parameter added

This commit is contained in:
2025-07-09 14:47:12 +02:00
parent b72e4861eb
commit 84fe5669ee
2 changed files with 7 additions and 5 deletions
+4 -3
View File
@@ -12,8 +12,9 @@ app.get('/badge', async (req, res) => {
const {
icon = 'simpleicons',
label = 'Simple Icons',
bgicon = '#cccccc', // ikon háttérszín, alap: világosszürke
bglabel = '#444444', // label háttérszín, alap: sötétszürke
style = 'rect', // badge stílusa: rect (négyzetes), flat (lekerekített sarkok)
bgicon = 'none', // ikon háttérszín, alap: világosszürke
bglabel = 'none', // label háttérszín, alap: sötétszürke
color = '#000000',
size = 24,
labelpos = 'right',
@@ -43,7 +44,7 @@ app.get('/badge', async (req, res) => {
const iconSize = parseInt(size);
const fontSize = Math.round(iconSize * 0.6);
const textPadding = Math.round(iconSize * 0.4);
const radius = 8;
const radius = 0;
const approxCharWidth = fontSize * 0.6;
const textWidth = effectiveLabel.length * approxCharWidth;