forked from preeti-14-7/Codeforces-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsidenav.html
325 lines (287 loc) · 10.5 KB
/
sidenav.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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8">
<title>Codeforces Tracker | Profile</title>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We" crossorigin="anonymous" />
<link rel="stylesheet" href="./stylesheet/sidenav.css">
<link rel="stylesheet" href="./stylesheet/style.css" />
<link rel="stylesheet" href="./stylesheet/heatmap.css" />
<!-- Boxiocns CDN Link -->
<link href='https://unpkg.com/[email protected]/css/boxicons.min.css' rel='stylesheet'>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- material icon -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
<!-- Heat Map -->
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script type="text/javascript" src="./js/heatmap.js"></script>
<link href="./js/heatmap.js" media="all" rel="stylesheet" />
<!-- Google pie chart -->
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
//Generate random number between min and max
function randomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1) + min);
}
function getRandomTimeStamps(min, max, fromDate, isObject) {
var return_list = [];
var entries = randomInt(min, max);
for (var i = 0; i < entries; i++) {
var day = fromDate ? new Date(fromDate.getTime()) : new Date();
//Genrate random
var previous_date = randomInt(0, 365);
if (!fromDate) {
previous_date = -previous_date;
}
day.setDate(day.getDate() + previous_date);
if (isObject) {
var count = randomInt(1, 20);
return_list.push({
timestamp: day.getTime(),
count: count
});
} else {
return_list.push(day.getTime());
}
}
return return_list;
}
$(document).ready(function () {
$('#github_chart_1').github_graph({
//Generate random entries from 50-> 200 entries
data: getRandomTimeStamps(50, 500, null, false),
texts: ['completed task', 'completed tasks']
});
$('#heatmap').github_graph({
//Generate random entries from 10-> 100 entries
data: getRandomTimeStamps(10, 100, null, false),
texts: ['problem solved', 'problems solved'],
//override colours
colors: ['rgba(0,0,0,0.3)', '#d6e685', '#8cc665', '#44a340', '#44a340'],
});
// start from 1 Jan 2022
var start_from_2022 = new Date(2022, 00, 00, 0, 0, 0);
$('#github_chart_3').github_graph({
start_date: start_from_2022,
//Generate random entries from 10-> 100 entries
data: getRandomTimeStamps(5, 100, start_from_2022, true),
texts: ['category', 'categories'],
border: {
radius: 5,
hover_color: "red"
},
//Override month names
month_names: ['T1', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7', 'T8', 'T9', 'T10', 'T11', 'T12'],
h_days: ['2', '4', '6'],
//override colours with custom count
colors: [{
count: 0,
color: 'gray'
},
{
count: 5,
color: 'purple'
},
{
count: 10,
color: 'yellow'
},
{
count: 15,
color: 'green'
},
{
count: 20,
color: 'red'
}
],
// callback when click on selected date
click: function (date, count) {
alert('You clicked on: ' + date + ' with count is ' + count);
},
});
});
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Task', 'Hours per Day'],
['Label 1', 11],
['Label 2', 2],
['Label 3', 2],
['Label 4', 2],
['Label 5', 7],
['Label 6', 10]
]);
var options = {
title: 'Verdict',
backgroundColor: '#2d2f34',
titleTextStyle: {
color: 'white'
},
legend: { position: 'left', textStyle: { color: 'white' } }
};
var options_2 = {
title: 'languages',
backgroundColor: '#2d2f34',
titleTextStyle: {
color: 'white'
},
legend: { position: 'left', textStyle: { color: 'white'} }
};
var chart = new google.visualization.PieChart(document.querySelector('.piechart'));
chart.draw(data, options);
var chart_2 = new google.visualization.PieChart(document.querySelector('.piechart_2'));
chart_2.draw(data, options_2);
}
</script>
</head>
<body id="body-pd">
<!-- side navbar -->
<div class="sidebar close" id="nav-bar">
<div class="logo-details">
<i class='bx bxl-c-plus-plus'></i>
<span class="logo_name">Tracker</span>
</div>
<ul class="nav-links">
<li>
<a href="./index.html" class="nav__link">
<i class='bx bx-home'></i>
<span class="link_name">Home</span>
</a>
<ul class="sub-menu blank">
<li><a class="link_name" href="#">Home</a></li>
</ul>
</li>
<li>
<div class="iocn-link">
<a href="#" class="nav__link">
<i class='bx bx-user'></i>
<span class="link_name">Profile</span>
</a>
</div>
<ul class="sub-menu">
<li><a class="link_name" href="#">Profile</a></li>
</ul>
</li>
<li>
<div class="iocn-link">
<a href="#" class="nav__link">
<i class='bx bx-code-block'></i>
<span class="link_name">Contest</span>
</a>
<!-- <i class='bx bxs-chevron-down arrow' ></i> -->
</div>
<ul class="sub-menu">
<li><a class="link_name" href="#">Contest</a></li>
</ul>
</li>
<li>
<a href="#" class="nav__link">
<i class='bx bx-transfer-alt'></i>
<span class="link_name">Compare</span>
</a>
<ul class="sub-menu blank">
<li><a class="link_name" href="#">Compare</a></li>
</ul>
</li>
<li>
<a href="#" class="nav__link">
<i class='bx bx-pie-chart-alt-2'></i>
<span class="link_name">Submission</span>
</a>
<ul class="sub-menu blank">
<li><a class="link_name" href="#">Submission</a></li>
</ul>
</li>
<li>
<div class="iocn-link">
<a href="#" class="nav__link">
<i class='bx bx-box'></i>
<span class="link_name">Ladder</span>
</a>
</div>
<ul class="sub-menu">
<li><a class="link_name" href="#">Ladder</a></li>
</ul>
</li>
<li>
<a href="#" class="nav__link">
<i class='bx bx-line-chart'></i>
<span class="link_name">Contest History</span>
</a>
<ul class="sub-menu blank">
<li><a class="link_name" href="#">Contest History</a></li>
</ul>
</li>
<li>
<a href="#" class="nav__link">
<i class='bx bx-clipboard'></i>
<span class="link_name">TODO</span>
</a>
<ul class="sub-menu blank">
<li><a class="link_name" href="#">TODO</a></li>
</ul>
</li>
</ul>
</div>
<!-- end of side navbar -->
<section class="home-section" id="header">
<div class="home-content header__toggle">
<i class='bx bx-menu' id="header-toggle"></i>
<span class="text">Codeforces <span class="text2"> Tracker</span></span>
</div> -->
<div class="container">
<div class="col mt-3 mb-4">
<div class=" col mt-1 ms-1 me-1 titles">
<span class=" row ms-4 graphtitles ">Year Log</span>
<div class=" row graphtitle ">
<h5 class="heatmap-heading"> 2784 Problem Solved</h5>
<p class="para"> Solved for all times</p>
<h5 class="heatmap-heading"> 7 Days</h5>
<p class="para"> in a row in matrix</p>
</div>
<div class=" row graphtitle ">
<h5 class="heatmap-heading"> 455 Problems</h5>
<p class="para"> problems sloved for last year</p>
<h5 class="heatmap-heading"> 5 Days</h5>
<p class="para">in a row for last year</p>
</div>
<div class=" row graphtitle ">
<h5 class="heatmap-heading"> 32 Problems</h5>
<p class="para"> Solved for last month</p>
<h5 class="heatmap-heading"> 2 Days</h5>
<p class="para"> in a row for last month</p>
</div>
</div>
<div class="chart col ms-1 me-1 ps-2 mb-4" id="heatmap"> </div>
</div>
</div>
<div class='chart_container'>
<div class="piechart"></div>
<div class="piechart_2"></div>
</div>
</section>
<section class="footer">
<div class="foot">
Socials
<a href="https://github.com/wasim7raja10/Codeforces-tracker">
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" class="bi bi-github" viewBox="0 0 16 16">
<path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"/>
<a src="https://github.com/wasim7raja10/Codeforces-tracker"></a>
</svg>
</a>
</div>
<div class="foot">
codeforcer tracker
</div>
</section>
<script src="./js/script.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-U1DAWAznBHeqEIlVSCgzq+c9gqGAJn5c/t99JyeKa9xxaYpSvHU5awsuZVVFIhvj" crossorigin="anonymous">
</script>
<script src="./js/data.js"></script>
</body>
</html>