mirror of
https://github.com/web3privacy/web
synced 2024-10-15 18:26:27 +02:00
leaderboard repos
This commit is contained in:
parent
2079a12c23
commit
ec4fc36a15
4 changed files with 942 additions and 910 deletions
|
@ -35,7 +35,7 @@ import contributors from '../contributors.json';
|
|||
<div>{config.landing.community}</div>
|
||||
|
||||
<div class="flex gap-4 flex-wrap my-14 items-center">
|
||||
{contributors.map((contrib) => (
|
||||
{contributors.items.map((contrib) => (
|
||||
<div><a href={contrib.html_url} target="_blank" title={contrib.login}><img src={contrib.avatar_url} class="w-16 rounded-full aspect-square"></a></div>
|
||||
))}
|
||||
</div>
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -5,7 +5,7 @@ import contributors from '../contributors.json';
|
|||
|
||||
const points = {}
|
||||
let i = 0;
|
||||
for (const c of contributors) {
|
||||
for (const c of contributors.items) {
|
||||
const key = `c:${c.contributions}`
|
||||
if (!points[key]) {
|
||||
points[key] = { arr: [c.login], start: i }
|
||||
|
@ -34,11 +34,11 @@ function getPoint (num){
|
|||
<tr>
|
||||
<th></th>
|
||||
<th class="pb-4 uppercase" colspan="2">Contributor</th>
|
||||
<th align="left" class="pb-4 uppercase"># Contributions</th>
|
||||
<th align="left" class="pb-4 uppercase"># Commits</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{contributors.map((contrib, i) => (
|
||||
{contributors.items.map((contrib, i) => (
|
||||
<tr>
|
||||
<td align="right">
|
||||
{[getPoint(contrib.contributions)].map((r) => (
|
||||
|
@ -63,6 +63,16 @@ function getPoint (num){
|
|||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="middle-pane-medium flex items-center justify-center">
|
||||
<div class="mt-20">
|
||||
<h2>Eligible repositories</h2>
|
||||
<div class="mt-6">
|
||||
{contributors.repos.map(repo => (
|
||||
<div><a href=`https://github.com/${repo}` class="hover:underline">@{repo}</a></div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</BaseLayout>
|
||||
|
|
|
@ -61,7 +61,10 @@ async function getContributors() {
|
|||
return output.sort((x, y) => y.contributions > x.contributions ? 1 : -1);
|
||||
}
|
||||
|
||||
const contributors = await getContributors();
|
||||
const contributors = {
|
||||
repos: contributorRepos,
|
||||
items: await getContributors(),
|
||||
};
|
||||
await Deno.writeTextFile(
|
||||
"./src/contributors.json",
|
||||
JSON.stringify(contributors, null, 2),
|
||||
|
|
Loading…
Reference in a new issue