summaryrefslogtreecommitdiff
path: root/view/timer.templ
blob: 8d2093394a87f54bed3e02602c801e9c49fcb6e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package view

import (
    "stevenlr.com/timer/model"
)

templ TimerView(timer model.Timer) {
    <h1>This is timer { timer.Name } </h1>
    <p><a href="/">Back to list</a></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>
}