diff options
author | Mark Powers <markppowers0@gmail.com> | 2020-10-19 21:55:02 -0500 |
---|---|---|
committer | Mark Powers <markppowers0@gmail.com> | 2020-10-19 21:55:02 -0500 |
commit | e0a4d1bb1339e80775aa37efaf8cac314278f8e9 (patch) | |
tree | 91c09487df6793e4faaed4c0a883cba2ae199d20 /src/templates/ledger.html | |
parent | ad24db7fe9fca72c38caaa40d2ada8cbeb04994d (diff) |
Add navigation template and logout
Diffstat (limited to 'src/templates/ledger.html')
-rw-r--r-- | src/templates/ledger.html | 82 |
1 files changed, 39 insertions, 43 deletions
diff --git a/src/templates/ledger.html b/src/templates/ledger.html index 9ffdeea..e2b7625 100644 --- a/src/templates/ledger.html +++ b/src/templates/ledger.html @@ -9,49 +9,45 @@ </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> - <a href="/about"><button>About</button></a> + <div class="main"> + <h1>{{name}}'s Budget</h1> + <form method="post" action="/transaction"> + <input id="datePicker" name="when" placeholder="date" type="date"> + <input required name="where" placeholder="where" type="text"> + <input required 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> + <th></th> + <th></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> + <td><a href="/ledger/edit/{{this.id}}"><button>⚙</button></a></td> + <td><button onclick="remove({{this.id}})">X</button></td> + </tr> + {{/each}} + </table> + <script> + document.getElementById('datePicker').value = new Date().toLocaleDateString(); + </script> </div> - <form method="post" action="/transaction"> - <input id="datePicker" name="when" placeholder="date" type="date"> - <input required name="where" placeholder="where" type="text"> - <input required 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> - <th></th> - <th></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> - <td><a href="/ledger/edit/{{this.id}}"><button>⚙</button></a></td> - <td><button onclick="remove({{this.id}})">X</button></td> - </tr> - {{/each}} - </table> - <script> - document.getElementById('datePicker').value = new Date().toLocaleDateString(); - </script> + {{> navigation}} </body> -</html> +</html>
\ No newline at end of file |