init login templ

This commit is contained in:
Sas Andy
2024-04-25 16:58:23 +07:00
parent da95e5b89f
commit e3288796ba
3 changed files with 541 additions and 0 deletions

View 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)
}