Skip to content

Commit 79ed877

Browse files
committed
index.html: replace twitter feed with void-packages pull feed
the twitter feed is broken (thanks elon) and redundant (it only includes news posts from this site these days) fixes #208
1 parent 92b2675 commit 79ed877

File tree

2 files changed

+22
-8
lines changed

2 files changed

+22
-8
lines changed

assets/js/voidcommits.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,20 @@ function voidcommits(response) {
1313
}
1414
document.write(html);
1515
}
16+
17+
function voidpulls(response) {
18+
var html = "", commit, i;
19+
function esc(str) {
20+
return str.replace(/"/g, '"').
21+
replace(/</g, '&lt;').
22+
replace(/>/g, '&gt;');
23+
}
24+
for(i = 0; i < response.data.length; i++) {
25+
pull = response.data[i];
26+
html += '<li><a href="' + esc(pull.html_url) + '" title="' +
27+
esc(pull.title) + '">' +
28+
'#' + pull.number + ': ' +
29+
esc(pull.title.split('\n')[0]) + "</a></li>";
30+
}
31+
document.write(html);
32+
}

index.html

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,19 +68,16 @@ <h3>xbps-src</h3>
6868
</div>
6969
<hr>
7070
<div class="row">
71-
<div class="col-md-4">
72-
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
73-
<script>
74-
theme = "light"
75-
if (window.matchMedia('(prefers-color-scheme: dark)').matches) theme="dark"
76-
document.write('<a class="twitter-timeline" data-theme="' + theme + '" data-chrome="noborders noscrollbar transparent" width="520" height="300" href="https://twitter.com/VoidLinux">Tweets by VoidLinux</a>')
77-
</script>
78-
</div>
7971
<div class="col-md-4">
8072
<h3>void-packages changes <span class="rssdev"><a href="https://github.com/void-linux/void-packages/commits/master.atom" title="Subscribe to void-packages"><i class="fa fa-rss fa-lg"></i></a></span></h3>
8173
<script src="/assets/js/voidcommits.js"></script>
8274
<script src="https://api.github.com/repos/void-linux/void-packages/commits?page=1&amp;per_page=10&amp;callback=voidcommits&amp;sha=master"></script>
8375
</div>
76+
<div class="col-md-4">
77+
<h3>void-packages pull requests</h3>
78+
<script src="/assets/js/voidcommits.js"></script>
79+
<script src="https://api.github.com/repos/void-linux/void-packages/pulls?page=1&amp;per_page=10&amp;callback=voidpulls&amp;sha=master"></script>
80+
</div>
8481
<div class="col-md-4">
8582
<h3>xbps changes <span class="rssdev"><a href="https://github.com/void-linux/xbps/commits/master.atom" title="Subscribe to xbps"><i class="fa fa-rss fa-lg"></i></a></span></h3>
8683
<script src="/assets/js/voidcommits.js"></script>

0 commit comments

Comments
 (0)