From 1e9b8d0fa114ce706c4fa05004991e516cbddcd7 Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Sun, 14 Apr 2024 23:51:04 +0200 Subject: Add time to timer --- view/timer.templ | 53 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 18 deletions(-) (limited to 'view/timer.templ') diff --git a/view/timer.templ b/view/timer.templ index 8d20933..a447d01 100644 --- a/view/timer.templ +++ b/view/timer.templ @@ -1,26 +1,43 @@ package view import ( - "stevenlr.com/timer/model" + "fmt" + "stevenlr.com/timer/model" ) templ TimerView(timer model.Timer) { -

This is timer { timer.Name }

-

Back to list

-

Start time: { timer.StartTime.AsUTCString() }

-

End time: { timer.EndTime.AsUTCString() }

-

- Total time: - -

-

- Remaining time: - -

+
+

This is timer { timer.Name }

+

Back to list

+

Start time: { timer.StartTime.AsUTCString() }

+

End time: { timer.EndTime.AsUTCString() }

+

+ Total time: + +

+

+ Remaining time: + +

+ if !timer.IsFinished() { +

Add time

+

+ + + + + + + + + +

+ } +
} -- cgit