Skip to content

Commit 99f83e5

Browse files
authored
Update js.html
1 parent 1033196 commit 99f83e5

File tree

1 file changed

+30
-24
lines changed

1 file changed

+30
-24
lines changed

_includes/js.html

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,38 +21,44 @@
2121
$("a[rel^='prettyPhoto']").prettyPhoto({theme: 'dark_rounded'});
2222

2323
// 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) {
2525
var sponsors = $('#sponsors');
2626
data.forEach(function (sponsor) {
2727
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+
)
4143
});
4244
});
43-
$.get('https://opencollective.com/librenms/backers.json', function (data) {
45+
$.get('https://opencollective.com/librenms/tiers/backers/all.json', function (data) {
4446
var backers = $('#backers');
4547
data.forEach(function (backer) {
4648
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+
)
5662
});
5763
});
5864
});

0 commit comments

Comments
 (0)