style parameter added
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user