-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
170 lines (151 loc) · 6.13 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
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
<!DOCTYPE html>
<html>
<!--
Todo
-->
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Gitcoin Ambassadors | Check-in</title>
<meta name="author" content="Gitcoin Ambassadors">
<meta name="description" content="Check-in portal for allowing ease of check-in's for Gitcoin issues.">
<meta name="keywords" content="gitcoin, issues, check-in">
<link rel="stylesheet" href="assets/styles/main.css" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
</head>
<body>
<div class='top'>
<img src='assets/images/logo.png' />
</div>
<div class='left'>
<!-- Tab links -->
<div class="tab">
<button class="tablinks" onclick="openSection(event, 'Open Issues')" id="defaultOpen">Open</button>
<button class="tablinks" onclick="openSection(event, 'Work Started')">Work Started</button>
<button class="tablinks" onclick="openSection(event, 'Work Finished')">Work Finished</button>
</div>
<!-- Tab content -->
<div id="Open Issues" class="tabcontent">
<h1>Open Issues</h1>
<p>Open Gitcoin issues from the issue explorer.</p>
<button onclick="nextFive()">Next 5</button>
<div id='contentOpen'>
<table>
<tr>
<th>Funder</th>
<th>Title</th>
<th>Modified On</th>
<th>Created On</th>
</tr>
<tr v-for="i in iss">
<td>{{ i.bounty_owner_github_username }}</td>
<td><a v-bind:href="i.github_url" target='_blank' class='linkHref'>{{ i.title }}</a></td>
<td class='date'>{{ i.modified_on }}</td>
<td>{{ i.created_on }}</td>
</tr>
</table>
</div>
</div>
<div id="Work Started" class="tabcontent">
<h1>Work Started</h1>
<p>Gitcoin issues where work has been started.</p>
<button>Next 5</button>
<div id='contentStarted'>
<table>
<tr>
<th>Funder</th>
<th>Title</th>
<th>Modified On</th>
<th>Created On</th>
</tr>
<tr v-for="i in iss">
<td>{{ i.bounty_owner_github_username }}</td>
<td><a v-bind:href="i.github_url" target='_blank'>{{ i.title }}</a></td>
<td>{{ i.modified_on }}</td>
<td>{{ i.created_on }}</td>
</tr>
</table>
</div>
</div>
<div id="Work Finished" class="tabcontent">
<h1>Work Finished</h1>
<p>Gitcoin issues where work has been finished.</p>
<button>Next 5</button>
<div id='contentFinished'>
<table>
<tr>
<th>Funder</th>
<th>Title</th>
<th>Modified On</th>
<th>Created On</th>
</tr>
<tr v-for="i in iss">
<td>{{ i.bounty_owner_github_username }}</td>
<td><a v-bind:href="i.github_url" target='_blank'>{{ i.title }}</a></td>
<td>{{ i.modified_on }}</td>
<td>{{ i.created_on }}</td>
</tr>
</table>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$.get(
"https://gitcoin.co/api/v0.1/bounties/?network=mainnet&idx_status=open&order_by=-web3_created&offset=0&limit=25",
function (d, s) {
var app = new Vue({
el: '#contentOpen',
data: {
iss: d
}
})
})
$.get(
"https://gitcoin.co/api/v0.1/bounties/?network=mainnet&idx_status=started&order_by=-web3_created&offset=0&limit=25",
function (d, s) {
var app = new Vue({
el: '#contentStarted',
data: {
iss: d
}
})
})
$.get(
"https://gitcoin.co/api/v0.1/bounties/?network=mainnet&idx_status=submitted&order_by=-web3_created&offset=0&limit=25",
function (d, s) {
var app = new Vue({
el: '#contentFinished',
data: {
iss: d
}
})
})
function openSection(evt, cityName) {
// Declare all variables
var i, tabcontent, tablinks;
// Get all elements with class="tabcontent" and hide them
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
// Get all elements with class="tablinks" and remove the class "active"
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
// Show the current tab, and add an "active" class to the button that opened the tab
document.getElementById(cityName).style.display = "block";
evt.currentTarget.className += " active";
}
function nextFive() {
var i;
for (i = 0; i < 5; i++) {
console.log('test');
}
}
document.getElementById("defaultOpen").click();
</script>
</body>
</html>