-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
149 lines (122 loc) · 3.38 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>GitHub Repositories</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
padding-top: 20px;
background-color: #f0f0f0;
font-family: 'Arial', sans-serif;
}
.container {
max-width: 800px;
background-color: #ffffff;
padding: 20px;
border-radius: 15px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}
h1 {
color: #007bff;
}
.input-group {
margin-bottom: 20px;
}
.input-group-append button {
border-top-left-radius: 8px;
border-bottom-left-radius: 8px;
}
#usernameInput,
#searchInput,
#perPageSelect {
border-radius: 8px;
margin-left: 2px;
}
.row .col-md-4,
.row .col-md-2 {
margin-bottom: 10px;
}
.pagination {
justify-content: center;
margin-top: 20px;
}
.card {
margin-bottom: 20px;
border: 2px solid black;
border-radius: 15px;
transition: transform 0.3s;
}
.card:hover {
transform: scale(1.03);
}
.card-title {
font-size: 1.2rem;
color: black;
}
.card-body {
padding: 15px;
}
.card-text {
font-size: 0.9rem;
color: #6c757d;
}
.mt-2 {
margin-top: 10px;
}
.btn-primary {
background-color: #007bff;
border-color: #007bff;
border-radius: 8px;
}
.btn-primary:hover {
background-color: #0056b3;
border-color: #0056b3;
}
.input-group + .input-group {
margin-top: 10px;
}
#perPageSelect {
height: auto;
padding: 6px;
font-size: small;
}
</style>
</head>
<body>
<div class="container">
<h1 class="mb-4">GitHub Repositories</h1>
<div class="input-group mb-3">
<input type="text" id="usernameInput" class="form-control" placeholder="Enter GitHub username">
<div class="input-group-append">
<button class="btn btn-primary" type="button" onclick="fetchRepositories()">Fetch Repositories</button>
</div>
</div>
<div class="row">
<div class="col-md-6">
<input type="text" id="searchInput" class="form-control" placeholder="Search repositories" oninput="searchRepositories()">
</div>
<div class="col-md-6">
<div class="input-group">
<label for="perPageSelect" class="input-group-text">Repos Per Page:</label>
<select id="perPageSelect" class="form-select" onchange="changePerPage()">
<option value="5">5</option>
<option value="10">10</option>
<option value="20">20</option>
<option value="100">100</option>
</select>
</div>
</div>
</div>
<div id="userInfo"></div>
<div id="repositoriesList"></div>
<nav aria-label="...">
<ul class="pagination" id="pagination"></ul>
</nav>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
<script src="script.js"></script>
</body>
</html>