This repository has been archived by the owner on May 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
107 lines (104 loc) · 5.28 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Awesome Competitive Programming Projects</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="referrer" content="no-referrer" />
<meta name="description"
content="An awesome list of competitive-programming-related projects on GitHub, with stats instead of comments.">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@4/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="index.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/js-yaml@3/dist/js-yaml.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/moment@2/moment.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/emoji-js@3/lib/emoji.min.js"></script>
<script src="index.js"></script>
</head>
<body>
<div v-cloak id="app">
<div v-if="list.length === 0">
Loading...
</div>
<div v-else>
<div class="container">
<div class="row">
<h2>Settings</h2>
</div>
<div class="row">
<div class="form-group">
<label class="form-text">GitHub Personal Access Token (optional, used to
<a target="_blank" href="https://docs.github.com/rest/reference/rate-limit">
increase the API rate limit</a>,
saved in your local storage)</label>
<input class="form-control" type="password" v-model="inputToken"
:class="{ 'is-invalid' : token !== '' && !isTokenValid, 'is-valid': isTokenValid }"
@change="saveToken">
<small class="form-text text-muted">
You can
<a target="_blank" href="https://github.com/settings/tokens/new">
generate a new GitHub Personal Access Token
</a>
without any scopes.
</small>
</div>
</div>
<div class="row">
<h2>Table of Contents</h2>
</div>
<div>
<ul class="list-group" v-for="({name}) in list" :key="name">
<li class="list-group-item"><a :href="'#' + idForName(name)">{{ name }}</a></li>
</ul>
</div>
<div class="row pt-4 pb-3">
<button class="btn btn-primary" @click="refresh(false)">Refresh</button>
</div>
</div>
<div class="container" v-for="({name, repos}) in list" :key="name">
<div class="row pb-2">
<h3 :id="idForName(name)" class="col-sm-8 col-md-9 col-lg-10">{{ name }}</h3>
<a :href="starHistory(repos)" class="col-sm-4 col-md-3 col-lg-2 btn btn-secondary" target="_blank">
View Star History
</a>
</div>
<div class="row">
<table class="table table-bordered">
<thead class="thead-light">
<tr>
<th scope="col" @click="sort(repos, 'name')">Name</th>
<th scope="col" @click="sort(repos, 'repo')">Repo</th>
<th scope="col" @click="sort(repos, 'stars')">Stars</th>
<th scope="col" @click="sort(repos, 'forks')">Forks</th>
<th scope="col" @click="sort(repos, 'pushedSort')">Pushed</th>
<th scope="col" @click="sort(repos, 'createdSort')">Created</th>
<th scope="col" @click="sort(repos, 'starSpeedSort')">Star Speed</th>
</tr>
</thead>
<tbody v-for="repo in repos" :key="repo.repo">
<tr>
<td :title="repo.description">{{ repo.name }}</td>
<td><a :href="repo.link" target="_blank">{{ repo.repo }}</a></td>
<td :title="repo.starsTitle">{{ repo.stars }}</td>
<td :title="repo.forksTitle">{{ repo.forks }}</td>
<td :title="repo.pushedTitle">{{ repo.pushed }}</td>
<td :title="repo.createdTitle">{{ repo.created }}</td>
<td :title="repo.starSpeedTitle">{{ repo.starSpeed }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<hr>
<footer class="page-footer">
<div class="footer-copyright text-center py-3">
<a target="_blank" href="https://github.com/awesome-cp-projects/awesome-cp-projects.github.io">
GitHub Repo
</a>
</div>
</footer>
</body>
</html>