Skip to content

Commit bec2537

Browse files
committed
new deployment
1 parent 792a90e commit bec2537

File tree

4 files changed

+34
-4
lines changed

4 files changed

+34
-4
lines changed

compiled/coder.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

compiled/coder.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,27 @@ let coder = new Vue({
5353
forks: function () {
5454
return this.repoRanking('forks_count');
5555
},
56+
repo_types: function () {
57+
let labels = [];
58+
let values = [];
59+
let types = {
60+
active_sources: 0,
61+
archived: 0,
62+
disabled: 0,
63+
forked: 0,
64+
mirrors: 0
65+
};
66+
for (let repo of this.repos_pushed) {
67+
if (repo.archived) types.archived++;else if (repo.disabled) types.disabled++;else if (repo.fork) types.forked++;else if (repo.mirror) types.mirrors++;else types.active_sources++;
68+
}
69+
for (let [label, value] of Object.entries(types)) {
70+
if (value > 0) {
71+
labels.push(label);
72+
values.push(value);
73+
}
74+
}
75+
return { labels: labels, values: values };
76+
},
5677
stars: function () {
5778
return this.repoRanking('stargazers_count');
5879
},
@@ -95,6 +116,10 @@ let coder = new Vue({
95116
this.rankingGraph(this.issues.slice(0, 10), 'open_issues_count', '#issues-ranking');
96117
this.rankingGraph(this.forks.slice(0, 10), 'forks_count', '#forks-ranking');
97118
this.rankingGraph(this.stars.slice(0, 10), 'stargazers_count', '#stars-ranking');
119+
120+
new Chartist.Pie('#repo-types-chart', {
121+
labels: this.repo_types.labels.map(d => d.replace('_', ' ')),
122+
series: this.repo_types.values });
98123
},
99124
methods: {
100125
fetchRepos: function () {

github/index.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
<div id="coder">
3131
<div v-if="user" class="row">
32-
<div class="col-12 col-2-xl col-2-l col-4-m meta">
32+
<div class="col-12 col-2-xl col-3-l col-4-m meta">
3333
<div class="padh">
3434
<header>
3535
<h3>{{ user.name }}</h3>
@@ -41,12 +41,17 @@ <h3>{{ user.name }}</h3>
4141
<span v-if="user.location" class="block"><i class="fa fa-globe" aria-hidden="true"></i> {{ user.location }}</span>
4242
<span v-if="user.company" class="block"><i class="fa fa-money" aria-hidden="true"></i> {{ user.company }}</span>
4343
<blockquote v-if="user.bio"><p>{{ user.bio }}</p></blockquote>
44+
45+
<div v-if="repo_types" class="padv">
46+
<h3>Repo types</h3>
47+
<div id="repo-types-chart"></div>
48+
</div>
4449
</div>
4550
</div>
4651
<div v-if="repos_pushed.length < 2" class="col-12 error">
4752
{{ user.name }} has not pushed changes to enough public repositories to show any interesting data here.
4853
</div>
49-
<div v-else class="col-12 col-10-xl col-10-l col-8-m no-padding main">
54+
<div v-else class="col-12 col-10-xl col-9-l col-8-m no-padding main">
5055
<div class="flex flex-wrap boxes">
5156
<div class="box-stat" title="The number of loaded repositories this user has pushed to.">
5257
<i class="fa fa-code" aria-hidden="true"></i> Pushed to repos

rss.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<channel><title>RSS Feed</title>
44
<link>https://coderstats.net</link>
55
<description>RSS Feed</description>
6-
<lastBuildDate>Wed, 29 May 2019 11:20:13 </lastBuildDate>
6+
<lastBuildDate>Mon, 03 Jun 2019 23:27:18 </lastBuildDate>
77
<generator>Logya</generator>
88
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
99
<item>

0 commit comments

Comments
 (0)