Comparing version 2.2.1 to 2.2.2
@@ -10,4 +10,5 @@ const calcWidth = require('./calc-text-width.js').Verdana11 | ||
const iconSpanWidth = icon ? (subject.length ? iconWidth + 4 : iconWidth - 2) : 0 | ||
const sbTextWidth = calcWidth(subject, emoji) | ||
const stTextWidth = calcWidth(status, emoji) | ||
const sbRectWidth = calcWidth(subject, emoji) + 10 + iconSpanWidth | ||
const sbRectWidth = sbTextWidth + 10.2 + iconSpanWidth | ||
const stRectWidth = stTextWidth + 10 | ||
@@ -24,4 +25,4 @@ const width = sbRectWidth + stRectWidth | ||
<g fill="#fff" text-anchor="start" font-family="Verdana,DejaVu Sans,sans-serif" font-size="11"> | ||
<text x="${icon ? '22.5' : '6'}" y="14.8" fill="#000" opacity="0.1">${subject}</text> | ||
<text x="${icon ? '21.5' : '5'}" y="13.8">${subject}</text> | ||
<text x="${icon ? '22.5' : '6.3'}" y="14.8" textLength="${sbTextWidth}" fill="#000" opacity="0.1">${subject}</text> | ||
<text x="${icon ? '21.5' : '5.3'}" y="13.8" textLength="${sbTextWidth}">${subject}</text> | ||
<text x="${sbRectWidth + 5.5}" y="14.8" fill="#000" opacity="0.1" textLength="${stTextWidth}">${status}</text> | ||
@@ -48,4 +49,4 @@ <text x="${sbRectWidth + 4.5}" y="13.8" textLength="${stTextWidth}">${status}</text> | ||
<g fill="#fff" text-anchor="start" font-family="Verdana,DejaVu Sans,sans-serif" font-size="11"> | ||
<text x="${icon ? '22.5' : '6'}" y="14.8" fill="#000" opacity="0.25">${subject}</text> | ||
<text x="${icon ? '21.5' : '5'}" y="13.8">${subject}</text> | ||
<text x="${icon ? '22.5' : '6.5'}" y="14.8" textLength="${sbTextWidth}" fill="#000" opacity="0.25">${subject}</text> | ||
<text x="${icon ? '21.5' : '5.5'}" y="13.8" textLength="${sbTextWidth}">${subject}</text> | ||
<text x="${sbRectWidth + 5.5}" y="14.8" fill="#000" opacity="0.25" textLength="${stTextWidth}">${status}</text> | ||
@@ -52,0 +53,0 @@ <text x="${sbRectWidth + 4.5}" y="13.8" textLength="${stTextWidth}">${status}</text> |
{ | ||
"name": "badgen", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "Fast svg badge generator.", | ||
@@ -19,3 +19,3 @@ "repository": "amio/badgen", | ||
"benchmark": "^2.1.4", | ||
"serve-marked": "0.2.0", | ||
"serve-marked": "0.3.2", | ||
"standard": "^11.0.1", | ||
@@ -22,0 +22,0 @@ "tap": "^12.0.1" |
@@ -7,3 +7,3 @@ # badgen | ||
Fast handcraft svg badge generator. | ||
Fast handcraft svg badge generator. Used on [badgen.net](https://badgen.net). | ||
@@ -16,4 +16,2 @@ - 🌀 1 dependency ([unicode-astral-regex][uar-link]) | ||
### npm package | ||
`npm install badgen` | ||
@@ -47,6 +45,2 @@ | ||
### Badge As A Service | ||
https://badgen.net | ||
## Benchmarks | ||
@@ -53,0 +47,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7368
89
67