Some work
This commit is contained in:
17
view/timers_list.templ
Normal file
17
view/timers_list.templ
Normal file
@ -0,0 +1,17 @@
|
||||
package view
|
||||
|
||||
import (
|
||||
"stevenlr.com/timer/model"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
templ timer(t model.Timer) {
|
||||
<p><a href={ templ.URL(fmt.Sprintf("/timer/%s", t.Id)) }>{ t.Name }</a></p>
|
||||
}
|
||||
|
||||
templ TimersList(timers []model.Timer) {
|
||||
<h1>Timers</h1>
|
||||
for _, t := range timers {
|
||||
@timer(t)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user