-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
73 lines (66 loc) · 2.9 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="shortcut icon" href="favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
crossorigin="anonymous"
/>
<script
src="https://code.jquery.com/jquery-3.5.1.min.js"
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
crossorigin="anonymous"
></script>
<link href="https://fonts.googleapis.com/css?family=Shadows+Into+Light" rel="stylesheet" />
<link href="style.css" rel="stylesheet" />
<title>XKCD Comics | API</title>
</head>
<body>
<div id="loader" class="loader__container d-flex align-items-center">
<div class="loader"></div>
</div>
<main class="main__container">
<h1 class="main__title pt-5 mb-4">XKCD Comics</h1>
<span id="error"></span>
<div class="container">
<div>
<button id="request-prev" class="btn btn-outline-dark mb-2">‹ Prev</button>
<button id="request-random" class="btn btn-outline-dark mb-2">Random</button>
<button id="request-next" class="btn btn-outline-dark mb-2">Next ›</button>
</div>
<div>
<button id="request-first" class="btn btn-outline-dark mb-2">« First</button>
<button id="request-last" class="btn btn-outline-dark mb-2">Last »</button>
</div>
</div>
<div class="container my-4">
<h2 id="comic-title">Loading ...</h2>
<img id="comic-image" class="img-fluid" />
<div id="comic-date"></div>
</div>
<div class="pt-5 mb-4">
<h4 class="mb-3">Search Comics by ID</h4>
<form id="comic-form" class="form-inline d-flex justify-content-center">
<div>
<input
aria-label="find comics by ID"
type="number"
id="search-input"
class="form-control form-control-sm mr-3"
placeholder="Comics number"
required
/>
</div>
<button type="submit" class="btn btn-sm btn-dark">find</button>
</form>
<span id="form-error"></span>
</div>
</main>
</body>
<script src="https://unpkg.com/superagent"></script>
<script src="script.js"></script>
</html>