-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
92 lines (88 loc) · 4.32 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GraphQL dashboard - grit:lab</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.js">
</script>
</head>
<body class="bg-dark text-light">
<div class="container">
<div class="row d-flex justify-content-center">
<div id="errorMsg" class="col-12 d-none text-center m-5">
<h1 class="text-danger">
Error:
</h1>
<p class="text-danger">
Probably CORS issues, but the token is not valid or the GraphQL endpoint is not reachable.
</p>
</div>
<div id="signIn" class="container w-50 m-3 d-none col-12">
<h1>Sign in (Provide authentication for the GraphQL endpoint)</h1>
<form id="signInForm">
<div class="mb-3">
<label for="username" class="form-label">Username/Email: </label>
<input type="text" name="username" id="username" placeholder="Username" class="form-control"
required>
<label for="password" class="form-label">Password: </label>
<input type="password" name="password" id="password" placeholder="Password" class="form-control"
required>
</div>
<div id="signInErrorMsg">
<p class="text-danger" id="msg"></p>
</div>
<input type="submit" value="Sign in" class="btn btn-primary">
</form>
</div>
<div id="content" class="col-12 container m-3 d-none">
<div class="row">
<div class="col-11">
<h1 class="text-center">grit:lab Dashboard</h1>
</div>
<div class="col-1">
<button id="logOutBtn" class="btn-outline-light rounded-2 bg-dark text-light" disabled>Log
Out</button>
</div>
</div>
<div class="row mt-4">
<div class="col-6">
<div class="bg-secondary bg-opacity-25 rounded-3 p-2 h-100">
<h2>
Username: <span id="contentUsername"></span> (ID: <span id="contentId"></span>)
</h2>
<h2>
Email: <span id="contentEmail"></span>
</h2>
<h2>Firstname: <span id="contentFName"></span></h2>
<h2>Lastname: <span id="contentLName"></span></h2>
<br>
</div>
</div>
<div class="col-6">
<div class="bg-secondary bg-opacity-25 rounded-3 p-2">
<h2 class="text-center text-decoration-underline">XP (Growth per day awarded): </h2>
<canvas id="xpGraph"></canvas>
</div>
</div>
</div>
<div class="row mt-4">
<div class="col-12 ">
<div class="bg-secondary bg-opacity-25 rounded-3 p-2">
<h2 class="text-center text-decoration-underline">Skills:</h2>
<div id="skills" class="row d-flex justify-content-center text-center"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="./index.js"></script>
</body>
</html>