diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-04-13 23:48:00 +0200 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-04-13 23:48:00 +0200 |
commit | c3b66fc95102b36bf21eacdc960183216683c270 (patch) | |
tree | 76b94129c680dd67979e44bf2adf48213513a0d3 /view/timer.templ | |
parent | 5e12dabced6ce55031f5c7f13afb15048d03edcd (diff) |
Show timer, set time on create
Diffstat (limited to 'view/timer.templ')
-rw-r--r-- | view/timer.templ | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/view/timer.templ b/view/timer.templ index fa258eb..8d20933 100644 --- a/view/timer.templ +++ b/view/timer.templ @@ -7,6 +7,20 @@ import ( templ TimerView(timer model.Timer) {
<h1>This is timer { timer.Name } </h1>
<p><a href="/">Back to list</a></p>
- <p>Start time: { timer.StartTime.String() }</p>
- <p>End time: { timer.EndTime.String() }</p>
+ <p>Start time: <local-date>{ timer.StartTime.AsUTCString() }</local-date></p>
+ <p>End time: <local-date>{ timer.EndTime.AsUTCString() }</local-date></p>
+ <p>
+ Total time:
+ <timer-countdown
+ start={ timer.StartTime.AsUTCString() }
+ end={ timer.EndTime.AsUTCString() }
+ ></timer-countdown>
+ </p>
+ <p>
+ Remaining time:
+ <timer-countdown
+ end={ timer.EndTime.AsUTCString() }
+ ></timer-countdown>
+ </p>
}
+
|