|
19 | 19 | </div> |
20 | 20 | </nav></div> |
21 | 21 |
|
22 | | -{% raw %} |
23 | 22 | <div id="coder"> |
24 | 23 | <div v-if="user" class="row"> |
25 | 24 | <div class="col-12 col-2-xl col-3-l col-4-m meta"> |
26 | | - <div class="padh"> |
27 | | - <header> |
28 | | - <h3>{{ user.name }}</h3> |
29 | | - </header> |
30 | | - <img :src="user.avatar_url" :alt="user.name" class="img-fluid"> |
31 | | - <p>Joined GitHub {{ user.created_at|formatDate }}</p> |
32 | | - <a :href="'https://github.com/' + user.login" class="block"><i class="fa fa-github" aria-hidden="true"></i> {{ user.login }}</a> |
33 | | - <a v-if="user.blog" :href="user.blog | fixURL" class="block"><i class="fa fa-home" aria-hidden="true"></i> {{ user.blog | formatURL }}</a> |
34 | | - <span v-if="user.location" class="block"><i class="fa fa-globe" aria-hidden="true"></i> {{ user.location }}</span> |
35 | | - <span v-if="user.company" class="block"><i class="fa fa-money" aria-hidden="true"></i> {{ user.company }}</span> |
36 | | - <blockquote v-if="user.bio"><p>{{ user.bio }}</p></blockquote> |
37 | | - |
38 | | - <div v-if="repo_types" class="padv"> |
39 | | - <h3>Repo types</h3> |
40 | | - <div id="repo-types-chart"></div> |
41 | | - </div> |
42 | | - </div> |
| 25 | + {% include 'coder/meta.html' %} |
43 | 26 | </div> |
44 | 27 | <div v-if="repos_pushed.length < 2" class="col-12 error"> |
45 | | - {{ user.name }} has not pushed changes to enough public repositories to show any interesting data here. |
| 28 | + {% raw %}{{ user.name }} has not pushed changes to enough public repositories to show any interesting data here.{% endraw %} |
46 | 29 | </div> |
47 | 30 | <div v-else class="col-12 col-10-xl col-9-l col-8-m no-padding main"> |
48 | | - <div class="flex flex-wrap boxes"> |
49 | | - <div class="box-stat" title="The number of loaded repositories this user has pushed to."> |
50 | | - <i class="fa fa-code" aria-hidden="true"></i> Pushed to repos |
51 | | - <h4>{{ repos_pushed.length }}</h4> |
52 | | - </div> |
53 | | - <div class="box-stat" title="The number of different main languages in repositories this user has pushed to."> |
54 | | - <i class="fa fa-language" aria-hidden="true"></i> Main languages |
55 | | - <h4>{{ languages.length }}</h4> |
56 | | - </div> |
57 | | - <div class="box-stat" title="The sum of issues across repositories this user has pushed to."> |
58 | | - <i class="fa fa-bug" aria-hidden="true"></i> Total issues |
59 | | - <h4>{{ total_issues }}</h4> |
60 | | - </div> |
61 | | - <div class="box-stat" title="The sum of forks across repositories this user has pushed to."> |
62 | | - <i class="fa fa-code-fork" aria-hidden="true"></i> Total forks |
63 | | - <h4>{{ total_forks }}</h4> |
64 | | - </div> |
65 | | - <div class="box-stat" title="The sum of stars across repositories this user has pushed to."> |
66 | | - <i class="fa fa-star" aria-hidden="true"></i> Total stars |
67 | | - <h4>{{ total_stars }}</h4> |
68 | | - </div> |
69 | | - <div class="box-stat" title="The number of users who follow this user on GitHub"> |
70 | | - <i class="fa fa-user" aria-hidden="true"></i> Followers |
71 | | - <h4>{{ user.followers }}</h4> |
72 | | - </div> |
73 | | - <div class="box-stat" title="The number of users this user follows on GitHub"> |
74 | | - <i class="fa fa-user" aria-hidden="true"></i> Following |
75 | | - <h4>{{ user.following }}</h4> |
76 | | - </div> |
77 | | - </div> |
78 | | - |
79 | | - <div class="padh"> |
80 | | - <h2 id="summary">Summary</h2> |
81 | | - <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. |
82 | | - <span v-if="repos_pushed_ratio > .8">This is a high ratio congratulations!</span> |
83 | | - <span v-else-if="repos_pushed_ratio < .4">This is a low ratio.</span> |
84 | | - </p> |
85 | | - <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>. |
86 | | - <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> |
87 | | - <strong>{{ languages[0].key }}</strong> occurs most frequently ‒ {{ languages[0].value }} times ‒ as the main repo language. |
88 | | - </p> |
89 | | - <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 as well.</p> |
90 | | - </div> |
91 | | - |
92 | | - <div class="padh"> |
93 | | - <h2 id="rankings">Rankings</h2> |
94 | | - <div class="row"> |
95 | | - <div v-if="languages.length > 1" class="col-12 col-3-xl col-6-l col-6-m"> |
96 | | - <h3>Languages</h3> |
97 | | - <graph id="language-ranking" class="ct-major-third"></graph> |
98 | | - </div> |
99 | | - <div v-if="issues.length > 1" class="col-12 col-3-xl col-6-l col-6-m"> |
100 | | - <h3>Issues</h3> |
101 | | - <graph id="issues-ranking" class="ct-major-third"></graph> |
102 | | - </div> |
103 | | - <div v-if="forks.length > 1" class="col-12 col-3-xl col-6-l col-6-m"> |
104 | | - <h3>Forks</h3> |
105 | | - <graph id="forks-ranking" class="ct-major-third"></graph> |
106 | | - </div> |
107 | | - <div v-if="stars.length > 1" class="col-12 col-3-xl col-6-l col-6-m"> |
108 | | - <h3>Stars</h3> |
109 | | - <graph id="stars-ranking" class="ct-major-third"></graph> |
110 | | - </div> |
111 | | - </div> |
112 | | - </div> |
| 31 | + {% include 'coder/boxes.html' %} |
| 32 | + {% include 'coder/summary.html' %} |
| 33 | + {% include 'coder/rankings.html' %} |
113 | 34 | </div> |
114 | 35 | </div> |
115 | 36 |
|
116 | 37 | <div v-if="repos_pushed.length" class="padh padv"> |
117 | | - <h2 id="repos">Repositories</h2> |
118 | | - <table> |
119 | | - <thead> |
120 | | - <tr> |
121 | | - <th>#</th> |
122 | | - <th @click="sortBy('name', 'string')" :class="{ active: sort_key == 'name' }">Name <span class="arrow" :class="order('name')"></span></th> |
123 | | - <th @click="sortBy('language', 'string')" :class="{ active: sort_key == 'language' }">Language <span class="arrow" :class="order('language')"></span></th> |
124 | | - <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> |
125 | | - <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> |
126 | | - <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> |
127 | | - <th class="text-right" @click="sortBy('forks_count')" :class="{ active: sort_key == 'forks_count' }">Forks <span class="arrow" :class="order('forks_count')"></span></th> |
128 | | - <th class="text-right" @click="sortBy('watchers_count')" :class="{ active: sort_key == 'watchers_count' }">Stars <span class="arrow" :class="order('watchers_count')"></span></th> |
129 | | - <th class="text-right" @click="sortBy('size')" :class="{ active: sort_key == 'size' }">Size <span class="arrow" :class="order('size')"></span></th> |
130 | | - </tr> |
131 | | - </thead> |
132 | | - <tbody> |
133 | | - <tr v-for="(repo, idx) in repos_pushed" :title="repo.description"> |
134 | | - <td>{{ idx + 1}}</td> |
135 | | - <td> |
136 | | - <strong><a v-bind:href="repo.html_url">{{ repo.name }}</a></strong> |
137 | | - <i v-if="repo.fork" class="fa fa-code-fork" aria-hidden="true" title="Forked Repository"></i> |
138 | | - <i v-if="repo.archived" class="fa fa-archive" aria-hidden="true" title="Archived Repository"></i> |
139 | | - </td> |
140 | | - <td>{{ repo.language }}</td> |
141 | | - <td class="text-right">{{ repo.created_at | formatDate }}</td> |
142 | | - <td class="text-right">{{ repo.pushed_at | formatDate }}</td> |
143 | | - <td class="text-right">{{ repo.open_issues_count }}</td> |
144 | | - <td class="text-right">{{ repo.forks_count }}</td> |
145 | | - <td class="text-right">{{ repo.watchers_count }}</td> |
146 | | - <td class="text-right">{{ repo.size }}</td> |
147 | | - </tr> |
148 | | - </tbody> |
149 | | - </table> |
| 38 | + <div class="tabs padv"> |
| 39 | + <a v-on:click="showTab('repos')" v-bind:class="[ activetab === 'repos' ? 'active' : '' ]" class="button inline">Repositories</a> |
| 40 | + <a v-on:click="showTab('issues')" v-bind:class="[ activetab === 'issues' ? 'active' : '' ]" class="button inline">Latest Issues</a> |
| 41 | + </div> |
| 42 | + <div class="content"> |
| 43 | + <div v-if="activetab === 'repos'" class="tabcontent"> |
| 44 | + {% include 'coder/repos.html' %} |
| 45 | + </div> |
| 46 | + <div v-if="activetab === 'issues'" class="tabcontent"> |
| 47 | + {% include 'coder/issues.html' %} |
| 48 | + </div> |
| 49 | + </div> |
150 | 50 | <a href="#">↑</a> |
151 | 51 | </div> |
152 | | - |
153 | 52 | </div> |
154 | | -{% endraw %} |
155 | 53 | {% endblock %} |
156 | 54 |
|
157 | 55 | {% block scripts %} |
|
0 commit comments