-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
55 lines (50 loc) · 2.05 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Github Repositories Listing</title>
<link rel="stylesheet" href="./style.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
</head>
<body>
<!-- Fetch User information by entering their username -->
<div id="user-box">
<label for="username">Enter Github username:</label>
<input type="text" id="username" placeholder="Enter username">
<button onclick="fetchUserInfo()">Fetch UserInfo</button>
</div>
<!-- User Details -->
<div class="user-details"></div>
<!-- Github State -->
<div class="github"></div>
<!-- Loader indicator -->
<div id="loader" class="loader" style="display: none;"></div>
<div class="search-perPage"">
<!-- Search bar to filter the repositories -->
<div id="searchBar" style="display: none;">
<label for="search">Search repositories:</label>
<input type="text" id="search" oninput="filterRepositories()" placeholder="Type here...">
</div>
<!-- per-page setter -->
<div class="perPage-box" style="display: none;">
<label for="perPage">Repositories per page:</label>
<select id="perPage" onchange="fetchRepos()">
<option value="10">10</option>
<option value="30">30</option>
<option value="50">50</option>
<option value="100">100</option>
</select>
</div>
</div>
<!-- All repositories for any user comes here -->
<div id="repositories"></div>
<!-- Pagination -->
<div id="pagination-container" style="display: none;">
<button id="previousButton" onclick="previousPage()" disabled>Previous</button>
<span id="currentPage">1</span>
<button id="nextButton" onclick="nextPage()">Next</button>
</div>
</body>
</html>
<script type="text/javascript" src="./index.js"></script>