aboutsummaryrefslogtreecommitdiff
path: root/src/templates
diff options
context:
space:
mode:
authorMark Powers <markppowers0@gmail.com>2020-10-18 16:09:40 -0500
committerMark Powers <markppowers0@gmail.com>2020-10-18 16:09:40 -0500
commita1baf96009692aff2ca123b3071d34fdcba0de63 (patch)
treef7d59d411b65581b3e008488a06183c7cf3a9d2c /src/templates
parent292048edaf0e2d4c4d591cfec1d923cb6d845991 (diff)
Add monthly averages, fix login tempalte
Diffstat (limited to 'src/templates')
-rw-r--r--src/templates/login.html8
-rw-r--r--src/templates/summary.html22
2 files changed, 26 insertions, 4 deletions
diff --git a/src/templates/login.html b/src/templates/login.html
index ec41762..f090108 100644
--- a/src/templates/login.html
+++ b/src/templates/login.html
@@ -38,10 +38,10 @@
<body>
<div>
<h1>Login</h1>
- <div class="form">
- <input on type="text" placeholder="Enter Username" name="username" id="username" required>
- <input type="password" placeholder="Enter Password" name="password" id="password" required>
- <button onclick="sendPost()">Log in</button>
+ <form method="post" action="/login">
+ <input name="username" type="text" placeholder="Enter Username" required>
+ <input type="password" placeholder="Enter Password" name="password" required>
+ <input type="submit" vallue="Log in">
</div>
</div>
</body>
diff --git a/src/templates/summary.html b/src/templates/summary.html
index bffd46b..d78182a 100644
--- a/src/templates/summary.html
+++ b/src/templates/summary.html
@@ -35,6 +35,14 @@
<td class="{{this.classes}}">{{this.net}}</td>
</tr>
{{/each}}
+ Avg:
+ <tr>
+ <td>Avg:</td>
+ <td></td>
+ <td>{{week_avg.in}}</td>
+ <td>{{week_avg.out}}</td>
+ <td class="{{week_avg.classes}}">{{week_avg.net}}</td>
+ </tr>
</table>
</div>
<div class="summary-panel">
@@ -56,6 +64,13 @@
<td class="{{this.classes}}">{{this.net}}</td>
</tr>
{{/each}}
+ <tr>
+ <td>Avg:</td>
+ <td></td>
+ <td>{{month_avg.in}}</td>
+ <td>{{month_avg.out}}</td>
+ <td class="{{month_avg.classes}}">{{month_avg.net}}</td>
+ </tr>
</table>
</div>
<div class="summary-panel">
@@ -75,6 +90,13 @@
<td class="{{this.classes}}">{{this.net}}</td>
</tr>
{{/each}}
+ Avg:
+ <tr>
+ <td>Avg:</td>
+ <td>{{year_avg.in}}</td>
+ <td>{{year_avg.out}}</td>
+ <td class="{{year_avg.classes}}">{{year_avg.net}}</td>
+ </tr>
</table>
</div>
</body>