templates base
This commit is contained in:
parent
1f95f86829
commit
137b9f9a6a
8 changed files with 253 additions and 3 deletions
|
|
@ -171,6 +171,60 @@ func TablerTables(c *core.Context) *core.Response {
|
|||
return c.Response.Template("tabler_tables.html", data)
|
||||
}
|
||||
|
||||
// UserSignIn renders the sign-in page.
|
||||
func UserSignIn(c *core.Context) *core.Response {
|
||||
type authPageData struct {
|
||||
TablerPageData
|
||||
}
|
||||
data := authPageData{
|
||||
TablerPageData: TablerPageData{
|
||||
PageTitle: "Sign In",
|
||||
},
|
||||
}
|
||||
return c.Response.Template("apptabler_sign-in.html", data)
|
||||
}
|
||||
|
||||
// UserSignUp renders the sign-up page.
|
||||
func UserSignUp(c *core.Context) *core.Response {
|
||||
type authPageData struct {
|
||||
TablerPageData
|
||||
}
|
||||
data := authPageData{
|
||||
TablerPageData: TablerPageData{
|
||||
PageTitle: "Sign Up",
|
||||
},
|
||||
}
|
||||
return c.Response.Template("apptabler_sign-up.html", data)
|
||||
}
|
||||
|
||||
// UserForgot renders the forgot password page.
|
||||
func UserForgot(c *core.Context) *core.Response {
|
||||
type authPageData struct {
|
||||
TablerPageData
|
||||
}
|
||||
data := authPageData{
|
||||
TablerPageData: TablerPageData{
|
||||
PageTitle: "Forgot Password",
|
||||
},
|
||||
}
|
||||
return c.Response.Template("apptabler_forgot.html", data)
|
||||
}
|
||||
|
||||
// UserLock renders the account lock page.
|
||||
func UserLock(c *core.Context) *core.Response {
|
||||
type authLockPageData struct {
|
||||
TablerPageData
|
||||
PersonName string
|
||||
}
|
||||
data := authLockPageData{
|
||||
TablerPageData: TablerPageData{
|
||||
PageTitle: "Account Locked",
|
||||
},
|
||||
PersonName: "Paweł Kuna",
|
||||
}
|
||||
return c.Response.Template("apptabler_auth-lock.html", data)
|
||||
}
|
||||
|
||||
// TablerHome renders the homepage/dashboard layout
|
||||
func TablerHome(c *core.Context) *core.Response {
|
||||
data := TablerPageData{
|
||||
|
|
|
|||
|
|
@ -476,11 +476,16 @@ type FormtablerFormElementsPage struct {
|
|||
// FormtablerComponentsPage is the page-specific struct for the combined demo
|
||||
// showing alerts, toasts, and breadcrumbs.
|
||||
type FormtablerComponentsPage struct {
|
||||
Alerts []FormtablerAlert
|
||||
Alerts []FormtablerAlert
|
||||
Breadcrumbs []FormtablerBreadcrumb
|
||||
Toasts []FormtablerToast
|
||||
}
|
||||
|
||||
// AuthLockPageData holds the data for the account lock page.
|
||||
type AuthLockPageData struct {
|
||||
PersonName string
|
||||
}
|
||||
|
||||
// TablerPageData holds the common data for all tabler pages.
|
||||
// It should NOT contain component-specific fields like tables or forms.
|
||||
// Add those by creating a page-specific struct that embeds TablerPageData
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue