Shields badge specification, website and default API server
Go to file
Thaddee Tyl 2877a788d7 Bitmap cache.
Bitmap images (PNG & friends) are cached in memory.

Note: the cache is not discriminatory and grows constantly.

Part of issue #23.
2014-01-10 16:10:35 +01:00
img Text shadow on badges. 2014-01-08 20:50:52 +01:00
web Use b.adge.me 2014-01-06 23:22:54 +01:00
.buildpacks Node engine version information. Deployment files. 2014-01-03 19:25:49 +01:00
.gitignore Add SVGO to the pipeline 2014-01-02 18:25:34 +01:00
badge.js Use local verdana file if available. 2014-01-04 13:34:13 +01:00
colorscheme.json Better orange. 2014-01-06 15:28:05 +01:00
default-badges.json Remove generic ‘cheez whiz’ badge 2014-01-08 07:32:02 +01:00
gh-badge.js cli: Omit needless function. 2014-01-07 21:44:41 +01:00
make.js Separate color scheme data in its own file. 2014-01-03 16:27:18 +01:00
Makefile make deploy: pushes master on the heroku instance. 2014-01-04 13:52:15 +01:00
package.json Executable program. 2014-01-07 15:52:59 +01:00
phantomjs-svg2png.js Local font loading into SVG in Phantom.js 2014-01-05 22:02:02 +01:00
README.md Clearer links. 2014-01-10 10:42:35 +01:00
server.js Version starts with v, space removal, s/NPM/npm/. 2014-01-06 17:16:36 +01:00
sheet.html Remove generic ‘cheez whiz’ badge 2014-01-08 07:32:02 +01:00
svg-to-img.js Bitmap cache. 2014-01-10 16:10:35 +01:00
template.svg Text shadow on badges. 2014-01-08 20:50:52 +01:00

GitHub badges in SVG format

npm version

Make your own badges (like this one above)!

Contribute

If you want to add a badge, you only need to modify default-badges.json.

The format is the following:

/* Unique name of your badge. */
"build-passed": {
  /* Textual information shown, in order. */
  "text": [ "build", "passed" ],
  "colorscheme": "green"
}

Color schemes are located in colorscheme.json. Each scheme has a name and a CSS/SVG color for the color used in the first box (for the first piece of text, field colorA) and for the one used in the second box (field colorB).

"green": {
  "colorB": "#4c1"
}

Both colorA and colorB have default values. Usually, the first box uses the same dark grey, so you can rely on that default value by not providing a "colorA" field (such as above).

You can also use the "colorA" and "colorB" fields directly in the badges if you don't want to make a color scheme for it. In that case, remove the "colorscheme" field altogether.

Requirements

Because of the usage of the npm module canvas you need to have cairo installed.

For more information check the wiki of the canvas project with system-specific installation details.

Making your Heroku badge server

Once you have installed the Heroku Toolbelt

heroku login
heroku create your-app-name
heroku config:set BUILDPACK_URL=https://github.com/mojodna/heroku-buildpack-multi.git#build-env
cp /path/to/Verdana.ttf .
make deploy
heroku open

Origin

See https://github.com/h5bp/lazyweb-requests/issues/150.

License

All work here is licensed CC0.