mirror of
https://github.com/jongracecox/anybadge.git
synced 2025-12-16 02:20:06 +01:00
This commit allows badges to be generated with only a label or only a value. Badges must provide at least a label or a value, so it is not valid to create a badge with no label and no value. This will result in a `ValueError` being raised.
24 lines
1.0 KiB
XML
24 lines
1.0 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="71" height="20">
|
|
<linearGradient id="b" x2="0" y2="100%">
|
|
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
|
<stop offset="1" stop-opacity=".1"/>
|
|
</linearGradient>
|
|
<mask id="anybadge_151">
|
|
<rect width="71" height="20" rx="3" fill="#fff"/>
|
|
</mask>
|
|
<g mask="url(#anybadge_151)">
|
|
<path fill="#555" d="M0 0h0v20H0z"/>
|
|
<path fill="#4c1" d="M0 0h71v20H0z"/>
|
|
<path fill="url(#b)" d="M0 0h71v20H0z"/>
|
|
</g>
|
|
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
|
<text x="1.0" y="15" fill="#010101" fill-opacity=".3"></text>
|
|
<text x="0.0" y="14"></text>
|
|
</g>
|
|
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
|
<text x="36.5" y="15" fill="#010101" fill-opacity=".3">Value only</text>
|
|
<text x="35.5" y="14">Value only</text>
|
|
</g>
|
|
</svg>
|