-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
207 lines (195 loc) · 11.8 KB
/
index.html
File metadata and controls
207 lines (195 loc) · 11.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Summary statistics, rankings and repositories about public source code repositories on GitHub.">
<title>CoderStats - Summary Statistics, Rankings and Repositories</title>
<link rel="shortcut icon" href="/img/coderstats.png">
<link rel="canonical" href="" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/chartist.js/latest/chartist.min.css">
<link rel="stylesheet" href="/compiled/coder.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="/compiled/style.css">
</head>
<body>
<nav class="container-full clear"><div class="row">
<div class="col-12 col-4-xl col-4-l col-5-m">
<a href="/"><img src="/img/coderstats.png" alt="logo"></a>
<span class="brand">CoderStats()</span>
</div>
<div class="col-12 col-8-xl col-8-l col-7-m" id="search">
<form @submit.prevent class="right">
<input id="username" type="text" placeholder="GitHub user name" v-model="username">
<button @click="coder" class="button">Get Stats</button>
</form>
</div>
</nav></div>
<div id="coder">
<div v-if="user" class="row">
<div class="col-12 col-2-xl col-3-l col-4-m meta">
<div class="padh">
<header>
<h3>{{ user.name }}</h3>
</header>
<img :src="user.avatar_url" :alt="user.name" class="img-fluid">
<p>Joined GitHub {{ user.created_at|formatDate }}</p>
<a :href="'https://github.com/' + user.login" class="block"><i class="fa fa-github" aria-hidden="true"></i> {{ user.login }}</a>
<a v-if="user.blog" :href="user.blog | fixURL" class="block"><i class="fa fa-home" aria-hidden="true"></i> {{ user.blog | formatURL }}</a>
<span v-if="user.location" class="block"><i class="fa fa-globe" aria-hidden="true"></i> {{ user.location }}</span>
<span v-if="user.company" class="block"><i class="fa fa-money" aria-hidden="true"></i> {{ user.company }}</span>
<blockquote v-if="user.bio"><p>{{ user.bio }}</p></blockquote>
<div v-if="repo_types" class="padv">
<h3>Repo types</h3>
<div id="repo-types-chart"></div>
</div>
</div>
</div>
<div v-if="repos_pushed.length < 2" class="col-12 error">
{{ user.name }} has not pushed changes to enough public repositories to show any interesting data here. </div>
<div v-else class="col-12 col-10-xl col-9-l col-8-m no-padding main">
<div class="boxes">
<div class="box-stat" title="The number of loaded repositories this user has pushed to.">
<i class="fa fa-code" aria-hidden="true"></i> Pushed to repos
<h4>{{ repos_pushed.length }}</h4>
</div>
<div class="box-stat" title="The number of different main languages in repositories this user has pushed to.">
<i class="fa fa-language" aria-hidden="true"></i> Main languages
<h4>{{ languages.length }}</h4>
</div>
<div class="box-stat" title="The sum of issues across repositories this user has pushed to.">
<i class="fa fa-bug" aria-hidden="true"></i> Total issues
<h4>{{ total_issues }}</h4>
</div>
<div class="box-stat" title="The sum of forks across repositories this user has pushed to.">
<i class="fa fa-code-fork" aria-hidden="true"></i> Total forks
<h4>{{ total_forks }}</h4>
</div>
<div class="box-stat" title="The sum of stars across repositories this user has pushed to.">
<i class="fa fa-star" aria-hidden="true"></i> Total stars
<h4>{{ total_stars }}</h4>
</div>
<div class="box-stat" title="The number of users who follow this user on GitHub">
<i class="fa fa-user" aria-hidden="true"></i> Followers
<h4>{{ user.followers }}</h4>
</div>
<div class="box-stat" title="The number of users this user follows on GitHub">
<i class="fa fa-user" aria-hidden="true"></i> Following
<h4>{{ user.following }}</h4>
</div>
</div>
<div class="padh">
<h2 id="summary">Summary</h2>
<p v-if="repos_pushed.length > 1">{{ user.name }} has {{ user.public_repos }} repositories on GitHub, the latest {{ repos.length }} with user activity were loaded from GitHub's web service for this evaluation. {{ user.name }} has pushed to <strong>{{ repos_pushed.length }}</strong> of these repositories.
<span v-if="repos_pushed_ratio > .8">This is a high ratio congratulations!</span>
<span v-else-if="repos_pushed_ratio < .4">This is a low ratio.</span>
</p>
<p v-if="languages.length > 1"><strong>{{ languages.length }}</strong> different main languages were identified across all repos pushed to. The main language is the one with the largest amount of code in a given repository, as identified by GitHub's <a href="https://github.com/github/linguist">linguist</a>.
<span v-if="languages.length > 5">Assuming a basic level of proficiency in all these languages {{ user.name }} can be considered hyperpolyglot in the world of computer languages.</span>
<strong>{{ languages[0].key }}</strong> occurs most frequently ‒ {{ languages[0].value }} times ‒ as the main repo language.
</p>
<p v-if="total_forks / repos_pushed.length > 20">The total number of forks across all pushed to repositories indicates that the GitHub projects {{ user.name }} contributes to are actually used by other people.</p>
</div>
<div class="padh">
<h2 id="rankings">Rankings</h2>
<div class="row">
<div v-if="languages.length > 1" class="col-12 col-3-xl col-6-l col-6-m">
<h3>Languages</h3>
<graph id="language-ranking" class="ct-major-third"></graph>
</div>
<div v-if="issues.length > 1" class="col-12 col-3-xl col-6-l col-6-m">
<h3>Issues</h3>
<graph id="issues-ranking" class="ct-major-third"></graph>
</div>
<div v-if="forks.length > 1" class="col-12 col-3-xl col-6-l col-6-m">
<h3>Forks</h3>
<graph id="forks-ranking" class="ct-major-third"></graph>
</div>
<div v-if="stars.length > 1" class="col-12 col-3-xl col-6-l col-6-m">
<h3>Stars</h3>
<graph id="stars-ranking" class="ct-major-third"></graph>
</div>
</div>
</div>
</div>
</div>
<div v-if="repos_pushed.length" class="padh padv">
<div class="tabs padv">
<a v-on:click="showTab('repos')" v-bind:class="[ activetab === 'repos' ? 'active' : '' ]" class="button inline">Repositories</a>
<a v-on:click="showTab('issues')" v-bind:class="[ activetab === 'issues' ? 'active' : '' ]" class="button inline">Latest Issues</a>
</div>
<div class="content">
<div v-if="activetab === 'repos'" class="tabcontent">
<table>
<thead>
<tr>
<th @click="sortBy('name', 'string')" :class="{ active: sort_key == 'name' }">Name <span class="arrow" :class="order('name')"></span></th>
<th @click="sortBy('language', 'string')" :class="{ active: sort_key == 'language' }">Language <span class="arrow" :class="order('language')"></span></th>
<th class="text-right" @click="sortBy('created_at')" :class="{ active: sort_key == 'created_at' }">Created at <span class="arrow" :class="order('created_at')"></span></th>
<th class="text-right" @click="sortBy('pushed_at')" :class="{ active: sort_key == 'pushed_at' }">Pushed at <span class="arrow" :class="order('pushed_at')"></span></th>
<th class="text-right" @click="sortBy('open_issues_count')" :class="{ active: sort_key == 'open_issues_count' }">Issues <span class="arrow" :class="order('open_issues_count')"></span></th>
<th class="text-right" @click="sortBy('forks_count')" :class="{ active: sort_key == 'forks_count' }">Forks <span class="arrow" :class="order('forks_count')"></span></th>
<th class="text-right" @click="sortBy('watchers_count')" :class="{ active: sort_key == 'watchers_count' }">Stars <span class="arrow" :class="order('watchers_count')"></span></th>
<th class="text-right" @click="sortBy('size')" :class="{ active: sort_key == 'size' }">Size <span class="arrow" :class="order('size')"></span></th>
</tr>
</thead>
<tbody>
<tr v-for="repo in repos_pushed" :title="repo.description">
<td>
<strong><a v-bind:href="repo.html_url">{{ repo.name }}</a></strong>
<i v-if="repo.fork" class="fa fa-code-fork" aria-hidden="true" title="Forked Repository"></i>
<i v-if="repo.archived" class="fa fa-archive" aria-hidden="true" title="Archived Repository"></i>
</td>
<td>{{ repo.language }}</td>
<td class="text-right">{{ repo.created_at | formatDate }}</td>
<td class="text-right">{{ repo.pushed_at | formatDate }}</td>
<td class="text-right">{{ repo.open_issues_count }}</td>
<td class="text-right">{{ repo.forks_count }}</td>
<td class="text-right">{{ repo.watchers_count }}</td>
<td class="text-right">{{ repo.size }}</td>
</tr>
</tbody>
</table>
</div>
<div v-if="activetab === 'issues'" class="tabcontent">
<table>
<thead>
<tr>
<th @click="sortBy('repository_url', 'string', 'latest_issues')" :class="{ active: sort_key == 'repository_url' }">Repo <span class="arrow" :class="order('repository_url')"></span></th>
<th>Title</th>
<th @click="sortBy('state', 'string', 'latest_issues')" :class="{ active: sort_key == 'state' }">State <span class="arrow" :class="order('state')"></span></th>
<th>Created by</th>
<th class="text-right" @click="sortBy('created_at', 'string', 'latest_issues')" :class="{ active: sort_key == 'created_at' }">Created at <span class="arrow" :class="order('created_at')"></span></th>
<th class="text-right" @click="sortBy('updated_at', 'string', 'latest_issues')" :class="{ active: sort_key == 'updated_at' }">Latest update <span class="arrow" :class="order('updated_at')"></span></th>
</tr>
</thead>
<tbody>
<tr v-for="issue in latest_issues">
<td><a :href="issue.repository_url.replace('api.github.com/repos/', 'github.com/')">{{ issue.repository_url.split('/').slice(-2).join('/') }}</a></td>
<td><a :href="issue.html_url">{{ issue.title }}</a></td>
<td>{{ issue.state }}</td>
<td><a :href="issue.user.url">{{ issue.user.login }}</a></td>
<td class="text-right">{{ issue.created_at | formatDate }}</td>
<td class="text-right">{{ issue.updated_at | formatDate }}</td>
</tr>
</tbody>
</table>
</div>
</div>
<a href="#">↑</a>
</div>
</div>
<footer class="container-full padv">
<p><a href="/">CoderStats</a> is a free service that displays statistics for coders with public Git repositories on GitHub.<br>
<a href="https://github.com/coderstats/coderstats">Source Code</a> •
<a href="https://chrome.google.com/webstore/detail/necogepejonacpphmlmcagmbjaogpbng">Chrome Extension</a> • <a href="https://addons.mozilla.org/en-US/firefox/addon/coderstats/">Firefox Add-on</a> • <a href="https://geeksta.net/merch/" title="T-Shirts, hoodies, mugs and stickers for coders">Coder Merchandise</a>
</footer>
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-resource@1.5.1/dist/vue-resource.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/d3-collection@1.0.7/dist/d3-collection.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/d3-array@2.2.0/dist/d3-array.min.js"></script>
<script src="https://cdn.jsdelivr.net/chartist.js/latest/chartist.min.js"></script>
<script src="/compiled/coder.js"></script>
<script src="/compiled/search.js"></script>
</body>
</html>