add web client - future plans for loading screen during refresh
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
3
templates/README.md
Normal file
3
templates/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Templates
|
||||
|
||||
This directory contains HTML templates used by the Go templating engine.
|
22
templates/home.html
Normal file
22
templates/home.html
Normal file
@ -0,0 +1,22 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>YNAB Portfolio Monitor</title>
|
||||
<script>
|
||||
req = new XMLHttpRequest();
|
||||
req.open("GET", "/status");
|
||||
req.send();
|
||||
req.onload = () => {
|
||||
if (req.readyState == 4 && req.status == 200) {
|
||||
// redirect to budget when refresh complete signal is received
|
||||
window.location.href = "https://app.ynab.com/{{ .BudgetID }}"
|
||||
}
|
||||
};
|
||||
|
||||
// do some fancy preloader stuff
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<p>Loading...</p>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user