|
21 | 21 | $("a[rel^='prettyPhoto']").prettyPhoto({theme: 'dark_rounded'}); |
22 | 22 |
|
23 | 23 | // populate sponsors and backers |
24 | | - $.get('https://opencollective.com/librenms/sponsors.json', function (data) { |
| 24 | + $.get('https://opencollective.com/librenms/tiers/sponsors/all.json', function (data) { |
25 | 25 | var sponsors = $('#sponsors'); |
26 | 26 | data.forEach(function (sponsor) { |
27 | 27 | var link = '#'; |
28 | | - if (sponsor.website) { |
29 | | - link = sponsor.website; |
30 | | - } else if (sponsor.twitterHandle) { |
31 | | - link = 'https://twitter.com/' + sponsor.twitterHandle; |
32 | | - } |
33 | | - |
34 | | - var el = '<div class="sponsor"><a href="' + link + '">'; |
35 | | - el += '<img class="img-circle" alt="' + sponsor.name + '" src="' + sponsor.avatar + '">'; |
36 | | - el += '</a>'; |
37 | | - el += '<p>$' + (sponsor.totalDonations / 100) + '</p>'; |
38 | | - el += '</div>'; |
39 | | - |
40 | | - sponsors.append(el); |
| 28 | + if (sponsor.isActive == true) |
| 29 | + if (sponsor.website) { |
| 30 | + link = sponsor.website; |
| 31 | + } else if (sponsor.twitter) { |
| 32 | + link = 'https://twitter.com/' + sponsor.twitter; |
| 33 | + } |
| 34 | + |
| 35 | + var el = '<div class="sponsor"><a href="' + link + '">'; |
| 36 | + el += '<img class="img-circle" alt="' + sponsor.name + '" src="' + sponsor.image + '">'; |
| 37 | + el += '</a>'; |
| 38 | + el += '<p>$' + sponsor.totalAmountDonated + '</p>'; |
| 39 | + el += '</div>'; |
| 40 | + |
| 41 | + sponsors.append(el); |
| 42 | + ) |
41 | 43 | }); |
42 | 44 | }); |
43 | | - $.get('https://opencollective.com/librenms/backers.json', function (data) { |
| 45 | + $.get('https://opencollective.com/librenms/tiers/backers/all.json', function (data) { |
44 | 46 | var backers = $('#backers'); |
45 | 47 | data.forEach(function (backer) { |
46 | 48 | var link = '#'; |
47 | | - if (backer.twitterHandle) { |
48 | | - link = 'https://twitter.com/' + backer.twitterHandle; |
49 | | - } |
50 | | - |
51 | | - var el = '<div class="backer"><a href="' + link + '">'; |
52 | | - el += '<img class="img-circle" alt="' + backer.name + '" src="' + backer.avatar + '">'; |
53 | | - el += '</a></div>'; |
54 | | - |
55 | | - backers.append(el); |
| 49 | + if (backer.isActive == true) |
| 50 | + if (backer.website) { |
| 51 | + link = backer.website; |
| 52 | + } else if (backer.twitter) { |
| 53 | + link = 'https://twitter.com/' + backer.twitter; |
| 54 | + } |
| 55 | + |
| 56 | + var el = '<div class="backer"><a href="' + link + '">'; |
| 57 | + el += '<img class="img-circle" alt="' + backer.name + '" src="' + backer.image + '">'; |
| 58 | + el += '</a></div>'; |
| 59 | + |
| 60 | + backers.append(el); |
| 61 | + ) |
56 | 62 | }); |
57 | 63 | }); |
58 | 64 | }); |
|
0 commit comments