-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
90 lines (84 loc) · 2.46 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
---
layout: default
---
<style>
.column {
float: left;
width: 180px;
white-space: nowrap;
padding: 10px 10px;
}
.row {margin: 0 -5px;}
.row:after {
content: "";
display: table;
clear: both;
}
@media screen and (max-width: 600px) {
.column {
width: 180px;
display: block;
margin-bottom: 20px;
}
}
.card {
box-shadow: 0 4px 8px 0 rgba(1, 1, 1, 0.2);
padding: 16px;
text-align: center;
background-color: #292929;
}
</style>
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<h1>Writeups</h1>
<table id="writeups-table">
<tr>
<td>CTF Name</td>
<td>CTFTime URL</td>
</tr>
<script type="text/javascript">
$.getJSON("https://api.github.com/orgs/Dunsp4rce", function(orgdetails){
home_url = orgdetails.blog
$.getJSON("https://api.github.com/orgs/Dunsp4rce/repos", function(result){
result.sort ( (a, b) => {
return new Date(b.created_at) - new Date(a.created_at);
});
for(let i=0;i<result.length;i++){
if(result[i].has_pages && result[i].name !== "Dunsp4rce.github.io"){
repo_name = result[i].name;
repo_url = home_url + "/" + repo_name;
ctf_time_link = result[i].description.substr(14);
$('#writeups-table').append(`<tr>
<td><a href='${repo_url}'>${repo_name}</a></td>
<td><a href='${ctf_time_link}'>${ctf_time_link}</a></td>
</tr>`);
}
}
});
});
</script>
</table>
<h1>Members</h1>
<div class="row" id="member_list">
<script type="text/javascript">
$.getJSON("https://api.github.com/orgs/Dunsp4rce/members", function(orgmembers){
orgmembers = orgmembers.sort(() => Math.random() - 0.5)
for(let i=0;i<orgmembers.length;i++){
$.getJSON(orgmembers[i].url, function(member){
image = member.avatar_url;
if(!member.name)
name = member.login
else
name = member.name
username = member.login;
$("#member_list").append(`<div class="column">
<div class="card">
<img src="${image}" alt=${username} width=100%>
<p><b>${name}</b></p>
<a href="https://github.com/${username}">${username}</a>
</div>
</div>`);
});
}
});
</script>
</div>