';
var items = [];
// GitHub
items.push({
@@ -34,6 +34,20 @@ function layoutDiv() {
text: 'GitHub',
href: 'https://github.com/' + repo
});
+ // Stars
+ items.push({
+ icon: '
',
+ text: 'Stars',
+ apiKey: 'stargazers_count',
+ href: 'https://github.com/' + repo + '/stargazers'
+ });
+ // Forks
+ items.push({
+ icon: '
',
+ text: 'Forks',
+ apiKey: 'forks_count',
+ href: 'https://github.com/' + repo + '/network/members'
+ });
// Releases
items.push({
icon: '
',
@@ -43,15 +57,9 @@ function layoutDiv() {
// Download
items.push({
icon: '
',
- text: 'Download',
+ text: 'Download Zip',
href: 'https://github.com/' + repo + '/archive/refs/heads/' + branch + '.zip'
});
- // Issues
- items.push({
- icon: '
',
- text: 'Issues',
- href: 'https://github.com/' + repo + '/issues'
- });
items.forEach((item, i) => {
el += '
';
el += '
';
- el += item.icon;
+ // left
+ el += '';
el += '' + item.text + '';
+ el += '
';
+ // right
+ el += '';
+ if (item.apiKey) {
+ el += '';
+ }
+ if (item.icon) {
+ el += item.icon;
+ }
+ el += '
';
el += '';
});
el += '
';
diff --git a/source/css/_common/base.styl b/source/css/_common/base.styl
index 750dad1..0789201 100644
--- a/source/css/_common/base.styl
+++ b/source/css/_common/base.styl
@@ -14,7 +14,7 @@ a
// md > a
p:not([class]), li:not([class])
- >a:not([class])
+ a:not([class])
position: relative
margin: 0 1px
padding: 2px
diff --git a/source/css/_layout/sidebar/repo_info.styl b/source/css/_layout/sidebar/repo_info.styl
index 42dede2..c48b268 100644
--- a/source/css/_layout/sidebar/repo_info.styl
+++ b/source/css/_layout/sidebar/repo_info.styl
@@ -20,9 +20,9 @@
padding: 0.5rem .5rem
font-size: $fs-13
justify-content: space-between
- flex-direction: row-reverse
svg
width: 1em
height: 1em
+ margin-left: 4px
a:hover
background: var(--block-hover)
diff --git a/source/js/main.js b/source/js/main.js
index 3158927..222564e 100644
--- a/source/js/main.js
+++ b/source/js/main.js
@@ -230,6 +230,14 @@ if (stellar.plugins.friendsjs) {
})
}
}
+if (stellar.plugins.ghinfo) {
+ const issues_api = document.getElementById('ghinfo-api');
+ if (issues_api != undefined) {
+ stellar.jQuery(() => {
+ stellar.loadScript(stellar.plugins.ghinfo, { defer: true })
+ })
+ }
+}
// swiper
if (stellar.plugins.swiper) {
diff --git a/source/js/plugins/friends.js b/source/js/plugins/friends.js
index 0187d3b..2649b07 100644
--- a/source/js/plugins/friends.js
+++ b/source/js/plugins/friends.js
@@ -48,7 +48,6 @@ const friendsjs = {
friendsjs.requestAPI(cfg.api, function(data) {
$(el).find('.loading-wrap').remove();
const arr = data.content || data;
- console.log(data);
arr.forEach((item, i) => {
var user = '