Code Monkey home page Code Monkey logo

gh-badges's Introduction

Shields Gittip npm version build status

A legible & concise status badge solution for third-party codebase services.

Make your own badges here!

Services using the Shields standard

Problem

Many GitHub repos sport badges for things like:

travis badge

gemnasium badge

code climate badge

rubygems badge

As you can see from the zoomed 400% versions of these badges above, nobody is (really) using the same badge file and at normal size, they're hardly legible. Worst of all, they're completely inconsistent. The information provided isn't of the same kind on each badge. The context is blurry, which doesn't make for å straightforward understanding of how these badges are relevant to the project they're attached to and what information they provide.

Solution

As you can see below, without increasing the footprint of these badges, I've tried to increase legibility and coherence, removing useless text to decrease the horizontal length in the (likely) scenario that more of these badge thingies crop up on READMEs all across the land.

Badge design

We have an effort to produce similar-looking SVGs through a web service at http://img.shields.io. That ensures that we are retina-ready.

Examples

What kind of meta data can you convey using badges?

  • test build status: build | failing
  • code coverage percentage: coverage | 80%
  • stable release version: version | 1.2.3
  • package manager release: gem | 1.2.3
  • status of third-party dependencies: dependencies | out-of-date
  • static code analysis GPA: code climate | 3.8
  • semver version observance: semver | 2.0.0
  • amount of gittip donations per week: tips | $2/week

Retina Ready

Since one of the major concerns is legibility, it's impossible to ignore how badges will render on retina (high DPI) displays.

As suggested by @kneath, badges displayed with an HTML image tag (instead of the easier Markdown image tag) can be given a fixed height to force an image that is actually double the resolution into a 50% smaller image, which will display properly for both retina and non-retina screens.

Here's an example with the following code:

<img src="https://raw.github.com/badges/shields/master/static/[email protected]" height="143" alt="Retina-ready Shields example" />

Retina-ready Shields example

All our badges aren't yet compatible with this but we're working on updating them soon. Look for image filenames with @2x suffixes, those will be the pixel doubled versions.

Note: They were pixel doubled manually in Photoshop, not after the fact.

Font

The font chosen in the specification is the Apache licensed Open Sans Regular available from Google Web Fonts.

Specification

See SPECIFICATION.md.

Installation Instructions

See INSTALL.md.

Contributions

See CONTRIBUTING.md.

License

See LICENSE.md.

gh-badges's People

Contributors

espadrine avatar mathiasbynens avatar stefanjudis avatar jmalloc avatar relrod avatar alrra avatar ezzatron avatar rmasters avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.