2024-09-29 14:40:36 -04:00
|
|
|
package pages
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/labstack/echo/v4"
|
|
|
|
|
"github.com/onsonr/sonr/pkg/nebula/components/blocks"
|
2024-10-01 13:48:28 -04:00
|
|
|
"github.com/onsonr/sonr/pkg/nebula/components/home"
|
2024-09-30 21:16:13 -04:00
|
|
|
"github.com/onsonr/sonr/pkg/nebula/models"
|
2024-09-29 14:40:36 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func Home(c echo.Context) error {
|
2024-09-30 21:16:13 -04:00
|
|
|
mdls, err := models.GetModels()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
2024-09-29 14:40:36 -04:00
|
|
|
}
|
2024-09-30 21:16:13 -04:00
|
|
|
return echoResponse(c, homeView(mdls.Hero))
|
2024-09-29 14:40:36 -04:00
|
|
|
}
|
|
|
|
|
|
2024-09-30 21:16:13 -04:00
|
|
|
templ homeView(hero *models.Hero) {
|
2024-09-29 14:40:36 -04:00
|
|
|
@blocks.LayoutNoBody("Sonr.ID", true) {
|
2024-10-01 13:48:28 -04:00
|
|
|
@home.MarketingHeader()
|
|
|
|
|
@home.SectionHero(hero)
|
|
|
|
|
@home.Highlights()
|
|
|
|
|
@home.Features()
|
|
|
|
|
@home.Bento()
|
|
|
|
|
@home.Lowlights()
|
|
|
|
|
@home.CallToAction()
|
|
|
|
|
@home.MarketingFooter()
|
2024-09-29 14:40:36 -04:00
|
|
|
}
|
|
|
|
|
}
|