-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
93 lines (81 loc) · 3.21 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 name="viewport" content="width=device-width, initial-scale=1.0">
<title>GitHub Profile Viewer</title>
<!-- Bootstrap CSS CDN -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<!-- Chart.js library CDN -->
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<link rel="stylesheet" href="styles.css">
</head>
<body class="container mt-5">
<h1 class="text-center">GitHub Profile Viewer</h1>
<!-- Search Input and Button -->
<div class="input-group mb-3">
<input type="text" class="form-control" id="searchInput" placeholder="Enter GitHub username"> <br />
<div class="input-group-append">
<button class="btn btn-primary" type="button" onclick="fetchProfile()">Search</button>
</div>
</div>
<!-- Loading Indicator, User Info, and Error Message Containers -->
<div class="text-center" id="loadingIndicator" style="display: none;">Loading...</div>
<div id="userInfo"></div>
<div id="errorMessage" class="text-danger"></div>
<!-- Modal Container -->
<div id="modal" class="modal" style="display: none;">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="repoName"></h5>
<button type="button" class="close" onclick="closeModal()">
<span>×</span>
</button>
</div>
<div class="modal-body">
<p id="repoDescription"></p>
<p id="repoLanguage"></p>
<p id="repoCreationDate"></p>
</div>
</div>
</div>
</div>
<!-- Chart Container -->
<div id="chartContainer" class="mt-4"></div>
<!-- Recent Activity Section -->
<div id="activity" class="mt-4">
<h2>Recent GitHub Activity</h2>
<ul id="activityList" class="list-group"></ul>
</div>
<!-- Repositories Section -->
<div id="repositories" class="mt-4">
<h2>Repositories</h2>
<!-- Sort and Filter Options -->
<div id="sortFilter" class="mb-3">
<label for="sortCriteria">Sort by:</label>
<select class="form-control" id="sortCriteria" onchange="sortRepositories()">
<option value="name">Name</option>
<option value="stargazers_count">Star Count</option>
<option value="pushed_at">Last Updated</option>
</select>
<label for="filterLanguage" class="ml-3">Filter by Language:</label>
<input type="text" class="form-control" id="filterLanguage" oninput="filterRepositories()">
</div>
<!-- List of Repositories -->
<ul id="repositoriesList" class="list-group"></ul>
</div>
<!-- Statistics Section -->
<div id="statistics" class="mt-4">
<h2>Statistics</h2>
<p id="longestStreak"></p>
<p id="mostUsedLanguage"></p>
</div>
<!-- Bootstrap JS and Popper.js CDN (Required for Bootstrap components) -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.10.2/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<!-- External JavaScript -->
<script src="main.js"></script>
</body>
</html>