self-host license badges

pull/1/head
eric 2014-11-10 13:14:59 -05:00
parent 72f066ed73
commit 3d71917d70
11 changed files with 10 additions and 10 deletions

View File

@ -41,23 +41,23 @@ class CCLicense():
@staticmethod
def badge(license):
if license == 'PD-US':
return 'https://i.creativecommons.org/p/mark/1.0/88x31.png'
return '/static/images/pdmark.png'
elif license == 'CC0':
return 'https://i.creativecommons.org/p/zero/1.0/88x31.png'
return '/static/images/cc0.png'
elif license == 'CC BY':
return 'https://i.creativecommons.org/l/by/3.0/88x31.png'
return '/static/images/ccby.png'
elif license == 'CC BY-NC-ND':
return 'https://i.creativecommons.org/l/by-nc-nd/3.0/88x31.png'
return '/static/images/ccbyncnd.png'
elif license == 'CC BY-NC-SA':
return 'https://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png'
return '/static/images/ccbyncsa.png'
elif license == 'CC BY-NC':
return 'https://i.creativecommons.org/l/by-nc/3.0/88x31.png'
return '/static/images/ccbync.png'
elif license == 'CC BY-SA':
return 'https://i.creativecommons.org/l/by-sa/3.0/88x31.png'
return '/static/images/ccbysa.png'
elif license == 'CC BY-ND':
return 'https://i.creativecommons.org/l/by-nd/3.0/88x31.png'
return '/static/images/ccbynd.png'
elif license == 'GFDL':
return 'https://www.gnu.org/graphics/gfdl-logo-tiny.png'
return '/static/images/gdfl.png'
else:
return ''

View File

@ -486,7 +486,7 @@ class CampaignTests(TestCase):
c.license = 'CC BY-NC'
c.save()
self.assertEqual(c.license_url, 'http://creativecommons.org/licenses/by-nc/3.0/')
self.assertEqual(c.license_badge, 'https://i.creativecommons.org/l/by-nc/3.0/88x31.png')
self.assertEqual(c.license_badge, '/static/images/ccbync.png')
def test_campaign_status(self):

BIN
static/images/cc0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/images/ccby.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
static/images/ccbync.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
static/images/ccbyncnd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
static/images/ccbyncsa.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

BIN
static/images/ccbynd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
static/images/ccbysa.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
static/images/gfdl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
static/images/pdmark.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB