mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
feat: introduce Home model and refactor views
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package home
|
||||
|
||||
templ MarketingFooter() {
|
||||
templ Footer() {
|
||||
<!-- Site footer -->
|
||||
<footer>
|
||||
<div class="max-w-5xl mx-auto px-4 sm:px-6">
|
||||
|
||||
@@ -8,7 +8,7 @@ package home
|
||||
import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
func MarketingFooter() templ.Component {
|
||||
func Footer() templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package home
|
||||
|
||||
templ MarketingHeader() {
|
||||
templ Header() {
|
||||
<!-- Site header -->
|
||||
<header class="absolute top-2 md:top-6 w-full z-30">
|
||||
<div class="px-4 sm:px-6">
|
||||
|
||||
@@ -8,7 +8,7 @@ package home
|
||||
import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
func MarketingHeader() templ.Component {
|
||||
func Header() templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
|
||||
@@ -5,15 +5,15 @@ import (
|
||||
"github.com/onsonr/sonr/pkg/nebula/models"
|
||||
)
|
||||
|
||||
templ View(hero *models.Hero) {
|
||||
templ View(home *models.Home) {
|
||||
@blocks.LayoutNoBody("Sonr.ID", true) {
|
||||
@MarketingHeader()
|
||||
@SectionHero(hero)
|
||||
@Header()
|
||||
@SectionHero(home.Hero)
|
||||
@Highlights()
|
||||
@Features()
|
||||
@Bento()
|
||||
@Lowlights()
|
||||
@CallToAction()
|
||||
@MarketingFooter()
|
||||
@Footer()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
"github.com/onsonr/sonr/pkg/nebula/models"
|
||||
)
|
||||
|
||||
func View(hero *models.Hero) templ.Component {
|
||||
func View(home *models.Home) templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
@@ -46,7 +46,7 @@ func View(hero *models.Hero) templ.Component {
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Err = MarketingHeader().Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = Header().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -54,7 +54,7 @@ func View(hero *models.Hero) templ.Component {
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = SectionHero(hero).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = SectionHero(home.Hero).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -102,7 +102,7 @@ func View(hero *models.Hero) templ.Component {
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = MarketingFooter().Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = Footer().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user