Added auth layout and route for login.
This commit is contained in:
parent
869fa82f14
commit
fe0fb8c801
8 changed files with 124 additions and 32 deletions
24
controllers/login.go
Normal file
24
controllers/login.go
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
package controllers
|
||||
|
||||
import (
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
|
||||
type Login struct {
|
||||
Controller
|
||||
}
|
||||
|
||||
func (l *Login) Get(c echo.Context) error {
|
||||
p := NewPage(c)
|
||||
p.Layout = "auth"
|
||||
p.Name = "login"
|
||||
p.Title = "Log in"
|
||||
p.Data = "This is the login page"
|
||||
return l.RenderPage(c, p)
|
||||
}
|
||||
|
||||
//func (a *Contact) Post(c echo.Context) error {
|
||||
// msg.Set(c, msg.Success, "Thank you for contacting us!")
|
||||
// msg.Set(c, msg.Info, "We will respond to you shortly.")
|
||||
// return a.Redirect(c, "home")
|
||||
//}
|
||||
Loading…
Add table
Add a link
Reference in a new issue