badges / gh-badges

Go to badges/shields. Especially if you don't know why. (This repo is old.)
http://img.shields.io/
Creative Commons Zero v1.0 Universal
87 stars 29 forks source link

Build a web service #12

Closed espadrine closed 10 years ago

espadrine commented 10 years ago

Buckler is a service to download PNG images of badges with any text and color.

We can do the same, with an SVG output.

This bug is here to track progress. A few issues:

espadrine commented 10 years ago

I would argue for using the same URL format, so I'll detail it here.

http://example.com/<SUBJECT>-<STATUS>-<COLOR>.png

Each field can use _ instead of spaces and must use -- instead of - and __ instead of _.

espadrine commented 10 years ago

So, I have good news, and I have bad news.

I have successfully made a branch in which we only rely on a single color, and it looks like this.

Before: before

Single color: after

It looks great in Firefox.

Which leads me to this: it does not work on Chrome. The issue is that Chrome does not implement SVG2 colors, and therefore I cannot make a gradient with transparent color stops.

mathiasbynens commented 10 years ago

Doesn’t work in Chromium → doesn’t work in Opera. Also, WebKit seems to have the same bug, so no Safari support either :(

mathiasbynens commented 10 years ago

Really nice work, @espadrine! I just wish browsers would get with the program already :P FWIW, it worked fine in Opera 12 (pre-Blink).

espadrine commented 10 years ago

FWIW, it worked fine in Opera 12 (pre-Blink).

Shocker :P

I published an issue for it.

espadrine commented 10 years ago

Update: using stop-opacity works, too. Merged. First bullet point down.

espadrine commented 10 years ago

Commit 08172c504 implements an automated server, much like Buckler. Second bullet point down.