aboutsummaryrefslogtreecommitdiff
path: root/src/templates/ledger.html
diff options
context:
space:
mode:
authorMark Powers <markppowers0@gmail.com>2020-10-10 09:49:26 -0500
committerMark Powers <markppowers0@gmail.com>2020-10-10 09:49:26 -0500
commite242733deb546c2b7f00d302a96bee0c0e609a2e (patch)
tree483a772579fdb6e585a33a54f102c2a29269ccfb /src/templates/ledger.html
parent0345f90a7baceae507f417abe30736cc95cdc0cf (diff)
Create expected, goals, and summary pages
Diffstat (limited to 'src/templates/ledger.html')
-rw-r--r--src/templates/ledger.html51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/templates/ledger.html b/src/templates/ledger.html
new file mode 100644
index 0000000..0ac9b0e
--- /dev/null
+++ b/src/templates/ledger.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <title>{{name}}'s Budget</title>
+ <meta charset="UTF-8">
+ <link rel="stylesheet" type="text/css" href="static/styles.css">
+</head>
+
+<body>
+ <h1>{{name}}'s Budget</h1>
+ <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>
+ </div>
+ <form method="post" action="/transaction">
+ <input id="datePicker" name="when" placeholder="date" type="date">
+ <input name="where" placeholder="where" type="text">
+ <input name="amount" placeholder="amount" type="number" step="0.01">
+ <input name="category" placeholder="category" type="text">
+ <input name="subcategory" placeholder="tags (csv)" type="text">
+ <input type="submit" value="Add">
+ </form>
+ <table>
+ <tr>
+ <th></th>
+ <th>When</th>
+ <th>Where</th>
+ <th>Amount</th>
+ <th>Category</th>
+ <th>Tags</th>
+ </tr>
+ {{#each ledger}}
+ <tr>
+ <td>{{this.index}}</td>
+ <td>{{this.when}}</td>
+ <td>{{this.where}}</td>
+ <td>{{this.amount}}</td>
+ <td>{{this.category}}</td>
+ <td>{{this.subcategory}}</td>
+ </tr>
+ {{/each}}
+ </table>
+ <script>
+ document.getElementById('datePicker').value = new Date().toLocaleDateString();
+ </script>
+</body>
+</html>
+