Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use shields.io for badges #102

Closed
hdgarrood opened this issue Jul 8, 2015 · 6 comments · Fixed by #211
Closed

Use shields.io for badges #102

hdgarrood opened this issue Jul 8, 2015 · 6 comments · Fixed by #211

Comments

@hdgarrood
Copy link
Collaborator

I can't quite work out what it is, but the badges that pursuit currently renders just don't quite look right. Eg: http://new-pursuit.purescript.org/packages/purescript-thermite/0.8.0

@paf31
Copy link
Contributor

paf31 commented Jul 8, 2015

Serif font? :)

@hdgarrood
Copy link
Collaborator Author

This is what it looks like on my machine:
badge
Half of the "p" is cut off on the left but there's more to it than that. I think shields.io ones have shadowing and maybe a slight convex effect?

Anyway since we're using shields.io for most of the other ones, I think it makes more sense to use shields.io for pursuit rather than try to make the pursuit ones imitate the shields ones. I suggest we make pursuit respond to /packages/$PACKAGE/badge with redirects to https://img.shields.io/badge/pursuit-$VERSION-ee2255.svg

@paf31
Copy link
Contributor

paf31 commented Jul 8, 2015

Can we figure out the issue with the generated SVG? If we can produce one working badge, we should be able to fix them all, right?

@hdgarrood
Copy link
Collaborator Author

Yeah. I guess I could just look at the markup that shields.io produces and imitate that with little effort. Would you rather have Pursuit serve the SVG then?

@paf31
Copy link
Contributor

paf31 commented Jul 8, 2015

I think we should do what's simplest, as long as we don't violate any TOS for shields.io.

@hdgarrood
Copy link
Collaborator Author

I didn't see any TOS, but it does seem that shields.io intends you to be able to fiddle with things in the way we're discussing. For example:

It looks like their server uses Cairo to determine what the width and height should be, see: https://github.com/badges/shields/blob/master/badge.js. I don't really want to do the same on the Pursuit server, that feels yucky. I guess we could choose fixed values rather than measuring text width on a canvas though; the left hand side is always the same, because it's just "pursuit", and the right hand side has a fairly narrow range of possible values, so we can probably come up with an accurate enough heuristic for that.

Using a redirect seems simpler, though.

tfausak added a commit to tfausak/pursuit that referenced this issue May 1, 2016
hdgarrood added a commit that referenced this issue May 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants