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-09-22 02:51:52 -04:00
package pages
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 (
"github.com/labstack/echo/v4"
2024-09-29 14:40:36 -04:00
"github.com/onsonr/sonr/pkg/nebula/components/blocks"
"github.com/onsonr/sonr/pkg/nebula/components/sections"
2024-09-14 12:47:25 -04:00
)
2024-09-29 14:40:36 -04:00
func Home ( c echo . Context ) error {
hero := sections . Hero {
2024-09-29 18:38:41 -04:00
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." ,
PrimaryButtonText : "Get Started" ,
PrimaryButtonLink : "/register" ,
SecondaryButtonText : "Learn More" ,
SecondaryButtonLink : "/about" ,
2024-09-29 14:40:36 -04:00
}
return echoResponse ( c , homeView ( hero ))
2024-09-24 17:54:33 -04:00
}
2024-09-29 14:40:36 -04:00
func homeView ( hero sections . Hero ) 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-09-29 14:40:36 -04:00
templ_7745c5c3_Err = sections . HeaderMarketingNav (). Render ( ctx , templ_7745c5c3_Buffer )
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 )
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
}
templ_7745c5c3_Err = sections . FooterMarketingNav (). 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-09-29 14:40:36 -04:00
templ_7745c5c3_Err = blocks . 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