init login templ
This commit is contained in:
21
handlers/login.handlers.go
Normal file
21
handlers/login.handlers.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"github.com/a-h/templ"
|
||||
"github.com/emarifer/go-templ-project-structure/views/login"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
|
||||
func HandlerShowLoginCompany(c echo.Context) error {
|
||||
|
||||
// si := user.ShowIndex("| Home", user.Show(udata))
|
||||
si := login.ShowLogin("Login ", login.DivLogin(), login.CssLogin(), login.JsLogin())
|
||||
|
||||
return ViewLoginCompany(c, si)
|
||||
}
|
||||
func ViewLoginCompany(c echo.Context, cmp templ.Component) error {
|
||||
c.Response().Header().Set(echo.HeaderContentType, echo.MIMETextHTML)
|
||||
|
||||
return cmp.Render(c.Request().Context(), c.Response().Writer)
|
||||
}
|
||||
Reference in New Issue
Block a user