1
0
Fork 0
forked from goffee/cup
cup/controllers/sample.go

28 lines
564 B
Go
Raw Normal View History

2024-09-30 10:17:24 -04:00
// Copyright (c) 2024 Zeni Kim <zenik@smarteching.com>
// Use of this source code is governed by MIT-style
// license that can be found in the LICENSE file.
package controllers
import (
"git.smarteching.com/goffee/core"
"git.smarteching.com/goffee/core/template/components"
)
// Show basic template
func Sample(c *core.Context) *core.Response {
type templateData struct {
TheTitle components.Title
}
tmplData := templateData{
TheTitle: components.Title{
Label: "Lorem ipsum inside",
},
}
return c.Response.Template("basic.html", tmplData)
}