start theme cup templates
This commit is contained in:
parent
1b6f3e6103
commit
f80c062099
11 changed files with 202 additions and 48 deletions
|
|
@ -452,35 +452,37 @@ func Signout(c *core.Context) *core.Response {
|
|||
// Show basic app login
|
||||
func AppLogin(c *core.Context) *core.Response {
|
||||
|
||||
// first, include all compoments
|
||||
// first, include all compoments
|
||||
type templateData struct {
|
||||
TheTitle components.Title
|
||||
PageCard components.PageCard
|
||||
}
|
||||
|
||||
// now fill data of the components
|
||||
tmplData := templateData{
|
||||
TheTitle: components.Title{
|
||||
Label: "Login form",
|
||||
PageCard: components.PageCard{
|
||||
CardTitle: "Card title",
|
||||
CardBody: "Loerm ipsum at deim",
|
||||
},
|
||||
}
|
||||
|
||||
return c.Response.Template("login.html", tmplData)
|
||||
|
||||
}
|
||||
|
||||
// Show basic app sample
|
||||
func AppSample(c *core.Context) *core.Response {
|
||||
|
||||
title := "lorem"
|
||||
|
||||
// first, include all compoments
|
||||
type templateData struct {
|
||||
TheTitle components.Title
|
||||
PageCard components.PageCard
|
||||
}
|
||||
|
||||
// now fill data of the components
|
||||
tmplData := templateData{
|
||||
TheTitle: components.Title{
|
||||
Label: title,
|
||||
PageCard: components.PageCard{
|
||||
CardTitle: "Protected page",
|
||||
CardBody: "If you can see this page, your are loggedin",
|
||||
},
|
||||
}
|
||||
|
||||
//fmt.Printf("Outside cookie user is: %s", user.Email)
|
||||
|
||||
return c.Response.Template("app.html", tmplData)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue