telegram-badge 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ar.md +1 -1
- package/README.ja.md +1 -1
- package/README.ko.md +1 -1
- package/README.md +1 -1
- package/README.ru.md +1 -1
- package/README.th.md +1 -1
- package/README.zh.md +1 -1
- package/dist/api/badge-generator.js +3 -3
- package/package.json +1 -1
package/README.ar.md
CHANGED
package/README.ja.md
CHANGED
package/README.ko.md
CHANGED
package/README.md
CHANGED
package/README.ru.md
CHANGED
package/README.th.md
CHANGED
package/README.zh.md
CHANGED
|
@@ -14,10 +14,10 @@ function generateBadgeSVG(format) {
|
|
|
14
14
|
const messageWidth = message.length * 7 + 20;
|
|
15
15
|
const totalWidth = labelWidth + messageWidth;
|
|
16
16
|
// Create logo element
|
|
17
|
-
const logoElement = logo ? `<image x="5" y="3" width="14" height="14" href="data:image/svg+xml;base64,${
|
|
17
|
+
const logoElement = logo ? `<image x="5" y="3" width="14" height="14" href="data:image/svg+xml;base64,${btoa(TELEGRAM_LOGO)}"/>` : '';
|
|
18
18
|
// For-the-badge style
|
|
19
19
|
if (style === 'for-the-badge') {
|
|
20
|
-
const logoForBadge = logo ? `<image x="5" y="7" width="14" height="14" href="data:image/svg+xml;base64,${
|
|
20
|
+
const logoForBadge = logo ? `<image x="5" y="7" width="14" height="14" href="data:image/svg+xml;base64,${btoa(TELEGRAM_LOGO)}"/>` : '';
|
|
21
21
|
return `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="${totalWidth}" height="28" role="img" aria-label="${label}: ${message}">
|
|
22
22
|
<title>${label}: ${message}</title>
|
|
23
23
|
<g shape-rendering="crispEdges">
|
|
@@ -48,7 +48,7 @@ function generateBadgeSVG(format) {
|
|
|
48
48
|
}
|
|
49
49
|
// Social style
|
|
50
50
|
if (style === 'social') {
|
|
51
|
-
const socialLogoElement = logo ? `<image x="7" y="3" width="14" height="14" href="data:image/svg+xml;base64,${
|
|
51
|
+
const socialLogoElement = logo ? `<image x="7" y="3" width="14" height="14" href="data:image/svg+xml;base64,${btoa(TELEGRAM_LOGO)}"/>` : '';
|
|
52
52
|
return `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="${totalWidth + 4}" height="20" style="border-radius: 3px" role="img" aria-label="${label}: ${message}">
|
|
53
53
|
<title>${label}: ${message}</title>
|
|
54
54
|
<linearGradient id="s" x2="0" y2="100%">
|