This repository has been archived by the owner on Jun 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
80 lines (71 loc) · 1.85 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Lumenaipsum</title>
<style>
html, body {
margin: 0;
}
.content {
display: flex;
place-content: center;
height: 100vh;
}
.container {
display: flex;
place-content: center;
flex-direction: column;
width: 65vw;
}
.ui {
display: flex;
align-items: center;
margin-bottom: 30px;
}
.flip {
-webkit-transform: scaleX(-1);
transform: scaleX(-1);
}
button {
margin: 0px 40px;
font-size: 3em;
}
span {
margin: 0px 10px;
font-style: italic;
font-size: 1.3em;
text-align: center;
height: 40px;
}
</style>
</head>
<body>
<div class="content">
<div class="container">
<div class="ui">
<img src="lumenajpg">
<button onclick="fetchQuote()">lumenar</button>
<img src="lumenajpg" class="flip">
</div>
<span id="quote"></span>
</div>
</div>
<script>
const endpoint = 'https://lumenaipsum.azurewebsites.net/Lumena'
async function fetchQuote() {
console.log('fetching')
const config = {
method: 'GET',
headers: new Headers({
'Accept': 'text/plain'
})
}
const response = await fetch(endpoint, config)
const text = await response.text()
document.getElementById('quote').innerText = text;
}
</script>
</body>
</html>