-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
add templates support and new flat style option #159
Conversation
👍 |
Thanks a lot for implementing this! It is something that many vendors are interested in, looking forward. This patch changes enough things that We could also provide a way to specify which template to use in that program. Right now, we discriminate parameters using sigils (a Maybe as a follow-up? |
…pecifying style, cache templates on server start
@espadrine ok should be good to go |
@maxogden This is good enough to merge. Thanks again! I'll do some follow-up cleanup however before pushing to http://shields.io.
|
- The information stored in `makeImage`'s `options` parameter is better served in its `data` parameter, - Remove the (no longer used) `colorscheme` parameter to `makeTemplate`, - We can already get to the contents of the URL query parameter `style` through that `data` parameter in `getRequest`, - Relocation of the code to set badge data related to the flat style into `getBadgeData`, - Code style (adding semicolons). Related to issue #159.
It's live! |
@espadrine w00t! I just noticed that the 'custom' badges ignore the ?style=flat, e.g. http://img.shields.io/badge/Made%20with%20freedom%20in-USA-blue.svg?style=flat |
@maxogden Hmm, that is rather unfortunate. I suspect it is caused by the fact that custom badges don't go through that cache. I shall have this fixed first thing tomorrow, UTC+2. |
this adds an option to all badges to do
?style=flat
. you can now also easily add new styles if you wish to support more