revisi templ landing page

This commit is contained in:
Sas Andy
2024-04-29 14:38:20 +07:00
parent d8e8f91fbd
commit b3883c9a8d
7 changed files with 390 additions and 169 deletions

View File

@@ -13,6 +13,7 @@ import (
type LandingPageService interface {
GetClientService() ([]services.ClientService, error)
GetClientAdvantage() ([]services.AdvantageClient, error)
GetPromotionList() ([]services.Promotion, error)
}
func NewLandingPageHandler(us LandingPageService) *LandingPageHandler {
@@ -36,8 +37,18 @@ func (uh *LandingPageHandler) ShowLandingPage(c echo.Context) error {
// fmt.Println(err)
return err
}
lpData, err := uh.LandingPageService.GetPromotionList()
if err != nil {
// fmt.Println(err)
return err
}
fmt.Printf("%+v\n", udata)
helo := landingpage.ShowLandingPage("Hello World", landingpage.MainLandingPage(udata, adData), landingpage.CssLandingPage(), landingpage.JsLandingPage())
helo := landingpage.ShowLandingPage("Hello World",
landingpage.MainLandingPage(landingpage.ListMedicalService(udata),
landingpage.ListAdvantage(adData), landingpage.ListPromotion(lpData),
landingpage.Footer()),
landingpage.CssLandingPage(),
landingpage.JsLandingPage())
return uh.View(c, helo)
}