Files
sonr/pkg/nebula/components/home/page_templ.go
T

140 lines
5.1 KiB
Go
Raw Normal View History

2024-09-14 12:47:25 -04:00
// Code generated by templ - DO NOT EDIT.
2024-09-21 21:42:51 -04:00
// templ: version: v0.2.778
2024-10-01 14:42:11 -04:00
package home
2024-09-14 12:47:25 -04:00
//lint:file-ignore SA4006 This context is only used if a nested component is present.
import "github.com/a-h/templ"
import templruntime "github.com/a-h/templ/runtime"
import (
2024-10-07 10:39:50 -04:00
"github.com/onsonr/sonr/pkg/nebula/components/home/sections"
2024-10-07 10:20:14 -04:00
"github.com/onsonr/sonr/pkg/nebula/global/styles"
2024-09-30 21:16:13 -04:00
"github.com/onsonr/sonr/pkg/nebula/models"
2024-09-14 12:47:25 -04:00
)
var hero = models.Hero{
TitleFirst: "Simplified",
TitleEmphasis: "self-custody",
TitleSecond: "for everyone",
Subtitle: "Sonr is a modern re-imagination of online user identity, empowering users to take ownership of their digital footprint and unlocking a new era of self-sovereignty.",
PrimaryButton: &models.Button{Text: "Get Started", Href: "/register"},
SecondaryButton: &models.Button{Text: "Learn More", Href: "/about"},
Image: &models.Image{
Src: "https://cdn.sonr.id/img/hero-clipped.svg",
Width: "500",
Height: "500",
},
Stats: []*models.Stat{
{Value: "476K", Label: "Assets packed with power beyond your imagination."},
{Value: "1.44K", Label: "Assets packed with power beyond your imagination."},
{Value: "1.5M+", Label: "Assets packed with power beyond your imagination."},
},
}
func View() templ.Component {
2024-09-14 12:47:25 -04:00
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
2024-09-21 21:42:51 -04:00
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
return templ_7745c5c3_CtxErr
}
2024-09-14 12:47:25 -04:00
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
if templ_7745c5c3_Var1 == nil {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
2024-10-07 10:39:50 -04:00
templ_7745c5c3_Err = sections.Header().Render(ctx, templ_7745c5c3_Buffer)
2024-09-29 14:40:36 -04:00
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
if templ_7745c5c3_Err != nil {
2024-09-19 19:09:01 -04:00
return templ_7745c5c3_Err
2024-09-29 14:40:36 -04:00
}
templ_7745c5c3_Err = sections.SectionHero(&hero).Render(ctx, templ_7745c5c3_Buffer)
2024-09-29 14:40:36 -04:00
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
2024-10-07 10:39:50 -04:00
templ_7745c5c3_Err = sections.Highlights().Render(ctx, templ_7745c5c3_Buffer)
2024-10-01 02:09:04 -04:00
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
2024-10-07 10:39:50 -04:00
templ_7745c5c3_Err = sections.Features().Render(ctx, templ_7745c5c3_Buffer)
2024-10-01 02:09:04 -04:00
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
2024-10-07 10:39:50 -04:00
templ_7745c5c3_Err = sections.Bento().Render(ctx, templ_7745c5c3_Buffer)
2024-10-01 02:09:04 -04:00
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
2024-10-07 10:39:50 -04:00
templ_7745c5c3_Err = sections.Lowlights().Render(ctx, templ_7745c5c3_Buffer)
2024-10-01 02:09:04 -04:00
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
2024-10-07 10:39:50 -04:00
templ_7745c5c3_Err = sections.CallToAction().Render(ctx, templ_7745c5c3_Buffer)
2024-10-01 02:09:04 -04:00
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
2024-10-07 10:39:50 -04:00
templ_7745c5c3_Err = sections.Footer().Render(ctx, templ_7745c5c3_Buffer)
2024-09-14 12:47:25 -04:00
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
2024-10-07 10:20:14 -04:00
templ_7745c5c3_Err = styles.LayoutNoBody("Sonr.ID", true).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
2024-09-14 12:47:25 -04:00
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
var _ = templruntime.GeneratedTemplate