Fix footer icons and GitHub header
This commit is contained in:
3 files changed
+25
-38
No files matched your search
@@ -32,11 +32,11 @@
|
||||
$(document).ready(function() {
|
||||
var url = "https://api.github.com/search/repositories?q={{ site.github_user }}/{{ site.github_repo }}";
|
||||
fetch(url, {
|
||||
headers: {"Accept":"application/vnd.github.preview"}
|
||||
headers: {"Accept":"application/vnd.github.v3+json"}
|
||||
}).then(function(e) {
|
||||
return e.json()
|
||||
}).then(function(r) {
|
||||
console.log(r.items[0])
|
||||
if (r.items[0].full_name !== "{{ site.github_user }}/{{ site.github_repo }}") return
|
||||
stars = r.items[0]['stargazers_count']
|
||||
forks = r.items[0]['forks_count']
|
||||
$('#stars').text(stars + " Stars")
|
||||
|
||||
Reference in new issue
Block a user