-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
77 lines (61 loc) · 1.81 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
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="pico.amber.css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JQuotes Test</title>
<script>
// Function to wake up the API
function wakeUpAPI() {
fetch('https://jquotes.onrender.com/wake', {
method: 'GET',
cache: 'no-cache' // Optional: to prevent caching the request
}).catch(error => {
// Optionally, handle errors, e.g., log them if necessary
console.error('API wake-up failed:', error);
});
}
// Call the function before the page fully loads
wakeUpAPI();
</script>
</head>
<body>
<main class="container-fluid">
<nav>
<ul>
<li>
<h1>JQuotes Test</h1>
</li>
</ul>
</nav>
<article>
<header class="grid">
<!-- <button id="uz">Unzip once</button>-->
<button id="get">Get Random Quote</button>
</header>
<label for="quote">Random Quote:</label>
<p id="quote">
<!-- Random quote goes here -->
</p>
<label for="author">
Author:
</label>
<p id="author">
<!-- Quote author goes here -->
</p>
<footer>
<label for="category">
Category:
</label>
<p id="category">
<!-- Category goes here -->
</p>
</footer>
</article>
<!-- <button id="button">Download</button>
<button id="read">Read</button> -->
</main>
<script type="module" src="./main.js"></script>
</body>
</html>