Created
January 2, 2014 12:49
-
-
Save espadrine/8218740 to your computer and use it in GitHub Desktop.
Github badges. All svg images here are licensed CC0.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<svg xmlns='http://www.w3.org/2000/svg'> | |
<style type='text/css'> | |
text {fill:#fff; font-family:'Trebuchet MS',sans-serif; font-size:10px;} | |
</style> | |
<linearGradient id='ggreen' x2='0%' y2='100%'> | |
<stop offset='0' stop-color='#8f6'/> | |
<stop offset='0.1' stop-color='#5d2'/> | |
<stop offset='0.9' stop-color='#3b0'/> | |
<stop offset='1' stop-color='#370'/> | |
</linearGradient> | |
<linearGradient id='ggrey' x2='0%' y2='100%'> | |
<stop offset='0' stop-color='#aaa'/> | |
<stop offset='0.1' stop-color='#666'/> | |
<stop offset='0.9' stop-color='#444'/> | |
<stop offset='1' stop-color='#222'/> | |
</linearGradient> | |
<rect rx='4px' width='77px' height='18px' style='fill:url(#ggrey)'/> | |
<rect rx='4px' x='32px' width='45px' height='18px' style='fill:url(#ggreen)'/> | |
<rect x='32px' width='5px' height='18px' style='fill:url(#ggreen)'/> | |
<text x='5px' y='12.5px' style='stroke:rgba(0,0,0,0.3)'>build</text> | |
<text x='5px' y='12px'>build</text> | |
<text x='39px' y='12.5px' style='stroke:rgba(0,0,0,0.3)'>passed</text> | |
<text x='39px' y='12px'>passed</text> | |
</svg> |
Cleaned up version (removed some minor cruft):
<svg xmlns="http://www.w3.org/2000/svg">
<style type="text/css">
text {
fill: #fff;
font-family: Trebuchet MS, sans-serif;
font-size: 10px;
}
</style>
<linearGradient id="ggreen" x2="0%" y2="100%">
<stop offset="0" stop-color="#8f6"/>
<stop offset="0.1" stop-color="#5d2"/>
<stop offset="0.9" stop-color="#3b0"/>
<stop offset="1" stop-color="#370"/>
</linearGradient>
<linearGradient id="ggrey" x2="0%" y2="100%">
<stop offset="0" stop-color="#aaa"/>
<stop offset="0.1" stop-color="#666"/>
<stop offset="0.9" stop-color="#444"/>
<stop offset="1" stop-color="#222"/>
</linearGradient>
<rect rx="4" width="77" height="18" style="fill:url(#ggrey)"/>
<rect rx="4" x="32" width="45" height="18" style="fill:url(#ggreen)"/>
<rect x="32" width="5" height="18" style="fill:url(#ggreen)"/>
<text x="5" y="12.5" style="stroke:rgba(0,0,0,.3)">build</text>
<text x="5" y="12">build</text>
<text x="39" y="12.5" style="stroke:rgba(0,0,0,.3)">passed</text>
<text x="39" y="12">passed</text>
</svg>
It still validates as per http://validator.nu/ with the “SVG 1.1 + XHTML5 + MathML 3.0” setting.
Moved to https://github.com/espadrine/gh-badges.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ref. h5bp/lazyweb-requests#150
_Update:_ this gist has been updated and is now a fully-fledged repo: https://github.com/espadrine/gh-badges