Skip to content

replace twitter feed with void-packages pull feed #209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 23 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,34 +1,45 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (7.0.6)
activesupport (7.1.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.4)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
base64 (0.2.0)
bigdecimal (3.1.4)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.11.1)
colorator (1.1.0)
commonmarker (0.23.9)
commonmarker (0.23.10)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
dnsruby (1.70.0)
simpleidn (~> 0.2.1)
drb (2.2.0)
ruby2_keywords
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
ethon (0.16.0)
ffi (>= 1.15.0)
eventmachine (1.2.7)
execjs (2.8.1)
faraday (2.7.10)
execjs (2.9.1)
faraday (2.7.12)
base64
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-net_http (3.0.2)
ffi (1.15.5)
ffi (1.16.3)
forwardable-extended (2.6.0)
gemoji (3.0.1)
github-pages (228)
Expand Down Expand Up @@ -209,16 +220,17 @@ GEM
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.19.0)
nokogiri (1.15.3-x86_64-linux)
minitest (5.20.0)
mutex_m (0.2.0)
nokogiri (1.15.5-x86_64-linux)
racc (~> 1.4)
octokit (4.25.1)
faraday (>= 1, < 3)
sawyer (~> 0.9)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.7)
racc (1.7.1)
racc (1.7.3)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
Expand All @@ -239,13 +251,13 @@ GEM
unf (~> 0.1.4)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
typhoeus (1.4.0)
typhoeus (1.4.1)
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unf_ext (0.0.9.1)
unicode-display_width (1.8.0)
webrick (1.8.1)

Expand Down
17 changes: 17 additions & 0 deletions assets/js/voidcommits.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,20 @@ function voidcommits(response) {
}
document.write(html);
}

function voidpulls(response) {
var html = "", commit, i;
function esc(str) {
return str.replace(/"/g, '&quot;').
replace(/</g, '&lt;').
replace(/>/g, '&gt;');
}
for(i = 0; i < response.data.length; i++) {
pull = response.data[i];
html += '<li><a href="' + esc(pull.html_url) + '" title="' +
esc(pull.title) + '">' +
'#' + pull.number + ': ' +
esc(pull.title.split('\n')[0]) + "</a></li>";
}
document.write(html);
}
13 changes: 5 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,16 @@ <h3>xbps-src</h3>
</div>
<hr>
<div class="row">
<div class="col-md-4">
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<script>
theme = "light"
if (window.matchMedia('(prefers-color-scheme: dark)').matches) theme="dark"
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>')
</script>
</div>
<div class="col-md-4">
<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>
<script src="/assets/js/voidcommits.js"></script>
<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>
</div>
<div class="col-md-4">
<h3>void-packages pull requests</h3>
<script src="/assets/js/voidcommits.js"></script>
<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>
</div>
<div class="col-md-4">
<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>
<script src="/assets/js/voidcommits.js"></script>
Expand Down