refactor: change template generation from go-elem to templ and clean up the repository
This commit is contained in:
parent
f6b6f81826
commit
a3dc4eddfa
19 changed files with 842 additions and 874 deletions
16
controllers/create.go
Normal file
16
controllers/create.go
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
package controllers
|
||||
|
||||
import (
|
||||
"context"
|
||||
"echoTest/models"
|
||||
"echoTest/templates"
|
||||
"io"
|
||||
|
||||
"github.com/a-h/templ"
|
||||
)
|
||||
|
||||
func (c *Controller) CreateBewertungNode(bewertung models.Bewertung) templ.Component {
|
||||
return templ.ComponentFunc(func(ctx context.Context, w io.Writer) error {
|
||||
return templates.BewertungenTable([]models.Bewertung{bewertung}).Render(ctx, w)
|
||||
})
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue