Files
sonr/pkg/nebula/pages/home.templ
T

25 lines
540 B
Templ
Raw Normal View History

2024-09-29 14:40:36 -04:00
package pages
import (
"github.com/labstack/echo/v4"
"github.com/onsonr/sonr/pkg/nebula/components/blocks"
"github.com/onsonr/sonr/pkg/nebula/components/sections"
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) {
@sections.HeaderMarketingNav()
@sections.SectionHero(hero)
@sections.FooterMarketingNav()
}
}