diff --git a/handlers/landingpage.handlers.go b/handlers/landingpage.handlers.go
index 84e332a..1e4510d 100644
--- a/handlers/landingpage.handlers.go
+++ b/handlers/landingpage.handlers.go
@@ -14,6 +14,7 @@ type LandingPageService interface {
GetClientService() ([]services.ClientService, error)
GetClientAdvantage() ([]services.AdvantageClient, error)
GetPromotionList() ([]services.Promotion, error)
+ GetFooterNavList() ([]services.FooterNav, error)
}
func NewLandingPageHandler(us LandingPageService) *LandingPageHandler {
@@ -42,11 +43,15 @@ func (uh *LandingPageHandler) ShowLandingPage(c echo.Context) error {
// fmt.Println(err)
return err
}
+ ftNav, err := uh.LandingPageService.GetFooterNavList()
+ if err != nil {
+ return err
+ }
fmt.Printf("%+v\n", udata)
helo := landingpage.ShowLandingPage("Hello World",
landingpage.MainLandingPage(landingpage.ListMedicalService(udata),
landingpage.ListAdvantage(adData), landingpage.ListPromotion(lpData),
- landingpage.Footer()),
+ landingpage.FooterSection(ftNav)),
landingpage.CssLandingPage(),
landingpage.JsLandingPage())
return uh.View(c, helo)
diff --git a/services/landingpage.services.go b/services/landingpage.services.go
index 419a1ef..efae3b9 100644
--- a/services/landingpage.services.go
+++ b/services/landingpage.services.go
@@ -40,6 +40,18 @@ type Promotion struct {
PromotionLink string `json:"PromotionLink"`
}
+type FooterSubNav struct {
+ FootSubNavID int `json:"FootSubNavID"`
+ FootSubNavTitle string `json:"FootSubNavTitle"`
+ FootSubNavLink string `json:"FootSubNavLink"`
+}
+
+type FooterNav struct {
+ FooterNavID int `json:"FooterNavID"`
+ FooterNavTitle string `json:"FooterNavTitle"`
+ FooteSubNav []FooterSubNav `json:"FooterSubNav,omitempty"`
+}
+
type ServicesLandingPage struct {
LandingPage LandingPage
LandingPageStore db.LandingPageStore
@@ -203,3 +215,73 @@ func (su *ServicesLandingPage) GetPromotionList() ([]Promotion, error) {
return data, nil
}
+func (su *ServicesLandingPage) GetFooterNavList() ([]FooterNav, error) {
+ data := []FooterNav{
+ {
+ FooterNavID: 1,
+ FooterNavTitle: "Dashboard",
+ FooteSubNav: []FooterSubNav{
+ {
+ FootSubNavID: 1,
+ FootSubNavTitle: "Dashboard #1",
+ FootSubNavLink: "/",
+ },
+ {
+ FootSubNavID: 2,
+ FootSubNavTitle: "Dashboard #2",
+ FootSubNavLink: "/",
+ },
+ },
+ },
+ {
+ FooterNavID: 2,
+ FooterNavTitle: "Benefit",
+ FooteSubNav: []FooterSubNav{
+ {
+ FootSubNavID: 1,
+ FootSubNavTitle: "Benefit #1",
+ FootSubNavLink: "/",
+ },
+ {
+ FootSubNavID: 2,
+ FootSubNavTitle: "Benefit #2",
+ FootSubNavLink: "/",
+ },
+ },
+ },
+ {
+ FooterNavID: 3,
+ FooterNavTitle: "Finance & Claims",
+ FooteSubNav: []FooterSubNav{
+ {
+ FootSubNavID: 1,
+ FootSubNavTitle: "Finance & Claims #1",
+ FootSubNavLink: "/",
+ },
+ {
+ FootSubNavID: 2,
+ FootSubNavTitle: "Finance & Claims #2",
+ FootSubNavLink: "/",
+ },
+ },
+ },
+ {
+ FooterNavID: 4,
+ FooterNavTitle: "Memberships",
+ FooteSubNav: []FooterSubNav{
+ {
+ FootSubNavID: 1,
+ FootSubNavTitle: "Memberships #1",
+ FootSubNavLink: "/",
+ },
+ {
+ FootSubNavID: 2,
+ FootSubNavTitle: "Memberships #2",
+ FootSubNavLink: "/",
+ },
+ },
+ },
+ }
+
+ return data, nil
+}
diff --git a/views/landingpage/footer.templ b/views/landingpage/footer.templ
index 120127c..16b5c73 100644
--- a/views/landingpage/footer.templ
+++ b/views/landingpage/footer.templ
@@ -1,58 +1,118 @@
package landingpage
-templ FooterSection() {
+import "github.com/emarifer/go-templ-project-structure/services"
+
+templ FooterContact() {
+
+
+
+
+
+
+ // for _, d := range phone {
+ //
+ // }
+
+
+
+
+
+}
+
+templ FooterNav(title string, data []services.FooterSubNav) {
+
+
+ for _, d := range data {
+
+
+
+ }
+
+}
+
+templ FooterSection(navlist []services.FooterNav) {