Migrate from templates to Gomponents (#103)
This commit is contained in:
parent
0bf9ab7189
commit
051d032038
104 changed files with 2768 additions and 2824 deletions
22
pkg/ui/models/file.go
Normal file
22
pkg/ui/models/file.go
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
package models
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
. "maragu.dev/gomponents"
|
||||
. "maragu.dev/gomponents/html"
|
||||
)
|
||||
|
||||
type File struct {
|
||||
Name string
|
||||
Size int64
|
||||
Modified string
|
||||
}
|
||||
|
||||
func (f *File) Render() Node {
|
||||
return Tr(
|
||||
Td(Text(f.Name)),
|
||||
Td(Text(fmt.Sprint(f.Size))),
|
||||
Td(Text(f.Modified)),
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue