Files
go-htmx-templ/app/handlers/home.go
Eden Kirin 26635bbff1 Full demo
2024-01-21 11:01:31 +01:00

23 lines
365 B
Go

package handlers
import (
"templ-tests/app/templates"
"templ-tests/app/types"
"github.com/gin-gonic/gin"
)
func Home(c *gin.Context) {
user := types.User{
FirstName: "Pero",
LastName: "Perić",
}
pc := templates.PageContext{
Title: "Welcome to the demo",
ActivePage: "home",
User: &user,
}
templates.Home(pc).Render(c, c.Writer)
}