From 7e915f39eb527e4cd712c248e05fc4703f41a07c Mon Sep 17 00:00:00 2001 From: Thaddee Tyl Date: Sun, 31 May 2015 13:44:36 +0200 Subject: [PATCH] Gratipay logo See #337 --- logo/github.svg | 2 +- logo/gratipay.svg | 3 +++ server.js | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 logo/gratipay.svg diff --git a/logo/github.svg b/logo/github.svg index c81a5ba..99e8eb5 100644 --- a/logo/github.svg +++ b/logo/github.svg @@ -1,3 +1,3 @@ - + diff --git a/logo/gratipay.svg b/logo/gratipay.svg new file mode 100644 index 0000000..fcf505e --- /dev/null +++ b/logo/gratipay.svg @@ -0,0 +1,3 @@ + + + diff --git a/server.js b/server.js index 0335cb4..3a25522 100644 --- a/server.js +++ b/server.js @@ -650,6 +650,9 @@ cache(function(data, match, sendBadge, request) { var format = match[3]; var apiUrl = 'https://www.gratipay.com/' + user + '/public.json'; var badgeData = getBadgeData('tips', data); + if (badgeData.template === 'social') { + badgeData.logo = badgeData.logo || logos.gratipay; + } request(apiUrl, function dealWithData(err, res, buffer) { if (err != null) { badgeData.text[1] = 'inaccessible';