diff --git a/lib/badge-data.js b/lib/badge-data.js index 864f9f707a..732bd51fca 100644 --- a/lib/badge-data.js +++ b/lib/badge-data.js @@ -31,7 +31,7 @@ function prependPrefix(s, prefix) { } function isValidStyle(style) { - const validStyles = ['default', 'plastic', 'flat', 'flat-square', 'social']; + const validStyles = ['default', 'plastic', 'flat', 'flat-square', 'for-the-badge', 'social']; return style ? validStyles.indexOf(style) >= 0 : false; } diff --git a/lib/badge.js b/lib/badge.js index b5de980970..a0d8e31bbe 100644 --- a/lib/badge.js +++ b/lib/badge.js @@ -96,6 +96,10 @@ function makeImage(data, cb) { if (!(data.template + '-' + data.format in templates)) { data.template = 'flat'; } + if (data.template === 'for-the-badge'){ + data.text[0] = data.text[0].toUpperCase(); + data.text[1] = data.text[1].toUpperCase(); + } if (data.colorscheme) { let pickedColorscheme = colorscheme[data.colorscheme]; if (!pickedColorscheme) { diff --git a/templates/for-the-badge-template.svg b/templates/for-the-badge-template.svg new file mode 100644 index 0000000000..34a1358cc7 --- /dev/null +++ b/templates/for-the-badge-template.svg @@ -0,0 +1,23 @@ + diff --git a/try.html b/try.html index 076a250eff..c3fc3c8dbe 100644 --- a/try.html +++ b/try.html @@ -1373,6 +1373,10 @@ The following styles are available (flat is the default as of Feb 1st 2015):
https://img.shields.io/badge/style-flat--squared-green.svg?style=flat-squarehttps://img.shields.io/badge/style-for--the--badge-green.svg?style=for-the-badgehttps://img.shields.io/badge/style-social-green.svg?style=social