aboutsummaryrefslogtreecommitdiff
path: root/src/templates
diff options
context:
space:
mode:
Diffstat (limited to 'src/templates')
-rw-r--r--src/templates/about.html34
-rw-r--r--src/templates/expected.html1
-rw-r--r--src/templates/goals.html1
-rw-r--r--src/templates/ledger.html1
-rw-r--r--src/templates/login.html29
-rw-r--r--src/templates/sign-up.html23
-rw-r--r--src/templates/summary.html1
7 files changed, 62 insertions, 28 deletions
diff --git a/src/templates/about.html b/src/templates/about.html
new file mode 100644
index 0000000..314545e
--- /dev/null
+++ b/src/templates/about.html
@@ -0,0 +1,34 @@
+<!doctype html>
+<html lang="en">
+
+<head>
+ <title>Mark's Database - Login</title>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+ <link rel="stylesheet" type="text/css" href="/css/styles.css">
+</head>
+
+<body>
+ <div>
+ <a href="/ledger"><button class="bold">Ledger</button></a>
+ <a href="/summary"><button>Summary</button></a>
+ <a href="/goals"><button>Goals</button></a>
+ <a href="/expected"><button>Expected</button></a>
+ <a href="/about"><button>About</button></a>
+ </div>
+ <div>
+ <h1>About</h1>
+ <p>Welcome to the alpha budget app! You've been given exclusive access to this secret trial</p>
+ <p>Here is how I use this site</p>
+ <ol>
+ <li>Expenses go in <em>Ledger</em>. Income also goes in the ledger as negative</li>
+ <li>The category I use for big categories: bills, groceries, restaurants</li>
+ <li>Inside tags (which aren't csv yet) I have specifics: internet, coffee, gas</li>
+ <li><em>Summary</em> gives some view of where money is going and coming from</li>
+ <li><em>Expected</em> is what I expect in an out, for a period of days. For example, I pay internet every 31 days, and renew my domain every 365 days</li>
+ <li><em>Goals</em> can be used to subdivide net savings into categories. It is still W.I.P.</li>
+ </ol>
+ </div>
+</body>
+
+</html> \ No newline at end of file
diff --git a/src/templates/expected.html b/src/templates/expected.html
index 99bf6fd..64841a5 100644
--- a/src/templates/expected.html
+++ b/src/templates/expected.html
@@ -14,6 +14,7 @@
<a href="/summary"><button>Summary</button></a>
<a href="/goals"><button>Goals</button></a>
<a href="/expected"><button class="bold">Expected</button></a>
+ <a href="/about"><button>About</button></a>
</div>
<form method="post" action="/expected">
diff --git a/src/templates/goals.html b/src/templates/goals.html
index b617a6e..b5dbe42 100644
--- a/src/templates/goals.html
+++ b/src/templates/goals.html
@@ -14,6 +14,7 @@
<a href="/summary"><button>Summary</button></a>
<a href="/goals"><button class="bold">Goals</button></a>
<a href="/expected"><button>Expected</button></a>
+ <a href="/about"><button>About</button></a>
</div>
<form method="post" action="/goals">
diff --git a/src/templates/ledger.html b/src/templates/ledger.html
index f5c46de..543ee3a 100644
--- a/src/templates/ledger.html
+++ b/src/templates/ledger.html
@@ -15,6 +15,7 @@
<a href="/summary"><button>Summary</button></a>
<a href="/goals"><button>Goals</button></a>
<a href="/expected"><button>Expected</button></a>
+ <a href="/about"><button>About</button></a>
</div>
<form method="post" action="/transaction">
<input id="datePicker" name="when" placeholder="date" type="date">
diff --git a/src/templates/login.html b/src/templates/login.html
index f090108..dcf8f8e 100644
--- a/src/templates/login.html
+++ b/src/templates/login.html
@@ -2,37 +2,10 @@
<html lang="en">
<head>
- <title>Mark's Database - Login</title>
+ <title>Login</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" type="text/css" href="/css/styles.css">
- <script>
- let usernameEl = document.getElementById('username');
- let passwordEl = document.getElementById('password');
- function sendPost(){
- let username = usernameEl.value;
- let password = passwordEl.value;
- fetch(new Request("/login", {
- method: 'POST',
- headers: {
- 'Accept': 'application/json',
- 'Content-Type': 'application/json'
- },
- body: JSON.stringify({'username':username, 'password':password})
- }))
- .then((response) => {
- console.log(response);
- window.location = "/";
- });
- }
- let onEnterEvent = function(event) {
- if (event.keyCode === 13) {
- sendPost()
- }
- }
- usernameEl.addEventListener("keyup", onEnterEvent);
- passwordEl.addEventListener("keyup", onEnterEvent);
- </script>
</head>
<body>
diff --git a/src/templates/sign-up.html b/src/templates/sign-up.html
new file mode 100644
index 0000000..81789bf
--- /dev/null
+++ b/src/templates/sign-up.html
@@ -0,0 +1,23 @@
+<!doctype html>
+<html lang="en">
+
+<head>
+ <title>Sign Up</title>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+ <link rel="stylesheet" type="text/css" href="/css/styles.css">
+</head>
+
+<body>
+ <div>
+ <h1>Sign up!</h1>
+ <form method="post" action="/login/signup">
+ <input name="username" type="text" placeholder="Enter Username" required>
+ <input type="password" placeholder="Enter Password" name="password" required>
+ <input type="text" placeholder="Secret code" name="code" required>
+ <input type="submit" vallue="Log in">
+ </div>
+ </div>
+</body>
+
+</html> \ No newline at end of file
diff --git a/src/templates/summary.html b/src/templates/summary.html
index bdc2f44..a998be9 100644
--- a/src/templates/summary.html
+++ b/src/templates/summary.html
@@ -14,6 +14,7 @@
<a href="/summary"><button class="bold">Summary</button></a>
<a href="/goals"><button>Goals</button></a>
<a href="/expected"><button>Expected</button></a>
+ <a href="/about"><button>About</button></a>
</div>
<div class="summary-panel">