generated from nathanwoodburn/python-webserver-template
feat: Update css to work on mobile and update js to use direct API not proxied
All checks were successful
Build Docker / BuildImage (push) Successful in 34s
All checks were successful
Build Docker / BuildImage (push) Successful in 34s
This commit is contained in:
parent
4c4814006a
commit
c3db03e67d
@ -7,7 +7,7 @@ body {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
height: 100vh;
|
height: 100dvh;
|
||||||
transition: background-color 0.3s, color 0.3s;
|
transition: background-color 0.3s, color 0.3s;
|
||||||
background-color: #121212;
|
background-color: #121212;
|
||||||
color: #e0e0e0;
|
color: #e0e0e0;
|
||||||
|
@ -42,7 +42,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
async function fetchJoke() {
|
async function fetchJoke() {
|
||||||
const response = await fetch('/api/joke');
|
const response = await fetch('https://icanhazdadjoke.com', {
|
||||||
|
headers: {
|
||||||
|
'Accept': 'application/json'
|
||||||
|
}
|
||||||
|
});
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
document.getElementById('joke').innerText = data.joke;
|
document.getElementById('joke').innerText = data.joke;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user