diff --git a/internal/gateway/handlers/index/views.templ b/internal/gateway/handlers/index/views.templ index 3f9fde21b..a2621410c 100644 --- a/internal/gateway/handlers/index/views.templ +++ b/internal/gateway/handlers/index/views.templ @@ -1,14 +1,15 @@ package index import ( - "github.com/onsonr/sonr/pkg/common/styles/layout" - "github.com/onsonr/sonr/pkg/common/styles/text" + "github.com/onsonr/sonr/internal/nebula/card" + "github.com/onsonr/sonr/internal/nebula/layout" + "github.com/onsonr/sonr/internal/nebula/text" ) templ InitialView() { @layout.Root("Sonr.ID") { - @layout.Container() { - @text.Header("Sonr.ID", "The decentralized identity layer for the web.") + @card.Container() { + @text.TitleDescription("Sonr.ID", "The decentralized identity layer for the web.")
@@ -33,8 +34,8 @@ templ InitialView() { templ ReturningView() { @layout.Root("Login | Sonr.ID") { - @layout.Container() { - @text.Header("Welcome Back!", "Continue with your existing Sonr.ID.") + @card.Container() { + @text.TitleDescription("Welcome Back!", "Continue with your existing Sonr.ID.")
diff --git a/internal/gateway/handlers/index/views_templ.go b/internal/gateway/handlers/index/views_templ.go index c8d1c5e9e..cf8c0522c 100644 --- a/internal/gateway/handlers/index/views_templ.go +++ b/internal/gateway/handlers/index/views_templ.go @@ -9,8 +9,9 @@ import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" import ( - "github.com/onsonr/sonr/pkg/common/styles/layout" - "github.com/onsonr/sonr/pkg/common/styles/text" + "github.com/onsonr/sonr/internal/nebula/card" + "github.com/onsonr/sonr/internal/nebula/layout" + "github.com/onsonr/sonr/internal/nebula/text" ) func InitialView() templ.Component { @@ -58,7 +59,7 @@ func InitialView() templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = text.Header("Sonr.ID", "The decentralized identity layer for the web.").Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Err = text.TitleDescription("Sonr.ID", "The decentralized identity layer for the web.").Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -68,7 +69,7 @@ func InitialView() templ.Component { } return templ_7745c5c3_Err }) - templ_7745c5c3_Err = layout.Container().Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = card.Container().Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -127,7 +128,7 @@ func ReturningView() templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = text.Header("Welcome Back!", "Continue with your existing Sonr.ID.").Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Err = text.TitleDescription("Welcome Back!", "Continue with your existing Sonr.ID.").Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -137,7 +138,7 @@ func ReturningView() templ.Component { } return templ_7745c5c3_Err }) - templ_7745c5c3_Err = layout.Container().Render(templ.WithChildren(ctx, templ_7745c5c3_Var6), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = card.Container().Render(templ.WithChildren(ctx, templ_7745c5c3_Var6), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/internal/gateway/handlers/register/data.go b/internal/gateway/handlers/register/data.go index b0109d9c0..502cf9a8d 100644 --- a/internal/gateway/handlers/register/data.go +++ b/internal/gateway/handlers/register/data.go @@ -67,8 +67,6 @@ func extractCredentialDescriptor(jsonString string) (*Credential, error) { "Type: %s\n"+ "Authenticator Attachment: %s\n"+ "Transports: %v\n"+ - "Attestation Object Size: %d bytes\n"+ - "Client Data Size: %d bytes\n", cred.ID, cred.RawID, cred.Type, diff --git a/internal/gateway/handlers/register/forms.templ b/internal/gateway/handlers/register/forms.templ index fdea2661a..88dc234eb 100644 --- a/internal/gateway/handlers/register/forms.templ +++ b/internal/gateway/handlers/register/forms.templ @@ -1,66 +1,25 @@ package register import ( - "github.com/onsonr/sonr/internal/gateway/handlers/register/ui" - "github.com/onsonr/sonr/pkg/common/styles/layout" + "github.com/onsonr/sonr/internal/nebula/card" + "github.com/onsonr/sonr/internal/nebula/form" ) templ formCreateProfile(action string, method string, data CreateProfileData) { -
- -
-
- -
-
-
- - -
- @layout.Spacer() - -
- -
-
- @layout.Spacer() - -
- - - Cancel - - - Next - - -
- -
-
+ @form.Root(action, method, "create-profile") { + @form.Body() { + @form.Header() { + + } + @form.InputName() + @form.InputHandle() + @form.InputHumanSlider(data.FirstNumber, data.LastNumber) + @form.Footer() { + @form.CancelButton() + @form.SubmitButton("Next") + } + } + } } templ formRegisterPasskey(action, method string, data RegisterPasskeyData) { @@ -69,12 +28,12 @@ templ formRegisterPasskey(action, method string, data RegisterPasskeyData) {
- @ui.ProfileCard(data.Address, data.Name, data.Handle, data.CreationBlock) + @card.SonrProfile(data.Address, data.Name, data.Handle, data.CreationBlock)
- @ui.SelectCoins() + @form.InputCoinSelect()
- @ui.InputPasskey(data.Address, data.Handle, data.Challenge) + @form.InputPasskey(data.Address, data.Handle, data.Challenge) Cancel diff --git a/internal/gateway/handlers/register/forms_templ.go b/internal/gateway/handlers/register/forms_templ.go index 211dab30d..4a0880b90 100644 --- a/internal/gateway/handlers/register/forms_templ.go +++ b/internal/gateway/handlers/register/forms_templ.go @@ -9,8 +9,8 @@ import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" import ( - "github.com/onsonr/sonr/internal/gateway/handlers/register/ui" - "github.com/onsonr/sonr/pkg/common/styles/layout" + "github.com/onsonr/sonr/internal/nebula/card" + "github.com/onsonr/sonr/internal/nebula/form" ) func formCreateProfile(action string, method string, data CreateProfileData) templ.Component { @@ -34,58 +34,119 @@ func formCreateProfile(action string, method string, data CreateProfileData) tem templ_7745c5c3_Var1 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = form.Header().Render(templ.WithChildren(ctx, templ_7745c5c3_Var4), 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 = form.InputName().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 = form.InputHandle().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 = form.InputHumanSlider(data.FirstNumber, data.LastNumber).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_Var5 := 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) + templ_7745c5c3_Err = form.CancelButton().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 = form.SubmitButton("Next").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = form.Footer().Render(templ.WithChildren(ctx, templ_7745c5c3_Var5), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = form.Body().Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } return templ_7745c5c3_Err - } - var templ_7745c5c3_Var2 templ.SafeURL = templ.SafeURL(action) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var2))) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" method=\"") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var3 string - templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(method) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/gateway/handlers/register/forms.templ`, Line: 9, Col: 55} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) - 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 = layout.Spacer().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 = layout.Spacer().Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Cancel Next
") + }) + templ_7745c5c3_Err = form.Root(action, method, "create-profile").Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -109,17 +170,17 @@ func formRegisterPasskey(action, method string, data RegisterPasskeyData) templ. }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var5 := templ.GetChildren(ctx) - if templ_7745c5c3_Var5 == nil { - templ_7745c5c3_Var5 = templ.NopComponent + templ_7745c5c3_Var6 := templ.GetChildren(ctx) + if templ_7745c5c3_Var6 == nil { + templ_7745c5c3_Var6 = templ.NopComponent } ctx = templ.ClearChildren(ctx) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
+
+
+
+ { children... } +
+
+
+
+} diff --git a/internal/nebula/card/container_templ.go b/internal/nebula/card/container_templ.go new file mode 100644 index 000000000..2af9be2fb --- /dev/null +++ b/internal/nebula/card/container_templ.go @@ -0,0 +1,48 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.793 +package card + +//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" + +func Container() 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 { + return templ_7745c5c3_CtxErr + } + 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_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templ_7745c5c3_Var1.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 + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/internal/gateway/handlers/register/ui/card_profile.templ b/internal/nebula/card/sonr_profile.templ similarity index 77% rename from internal/gateway/handlers/register/ui/card_profile.templ rename to internal/nebula/card/sonr_profile.templ index 340ffc097..35463cdee 100644 --- a/internal/gateway/handlers/register/ui/card_profile.templ +++ b/internal/nebula/card/sonr_profile.templ @@ -1,6 +1,6 @@ -package ui +package card -templ ProfileCard(addr, name, handle, creationBlock string) { +templ SonrProfile(addr, name, handle, creationBlock string) {
@@ -28,3 +28,11 @@ templ ProfileCard(addr, name, handle, creationBlock string) {
} + +// Helper function to shorten address +func shortenAddress(address string) string { + if len(address) <= 20 { + return address + } + return address[:16] + "..." + address[len(address)-4:] +} diff --git a/internal/gateway/handlers/register/ui/card_profile_templ.go b/internal/nebula/card/sonr_profile_templ.go similarity index 89% rename from internal/gateway/handlers/register/ui/card_profile_templ.go rename to internal/nebula/card/sonr_profile_templ.go index 49a132b26..3d01b0dfc 100644 --- a/internal/gateway/handlers/register/ui/card_profile_templ.go +++ b/internal/nebula/card/sonr_profile_templ.go @@ -1,14 +1,14 @@ // Code generated by templ - DO NOT EDIT. // templ: version: v0.2.793 -package ui +package card //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" -func ProfileCard(addr, name, handle, creationBlock string) templ.Component { +func SonrProfile(addr, name, handle, creationBlock string) 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 { @@ -36,7 +36,7 @@ func ProfileCard(addr, name, handle, creationBlock string) templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(handle) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/gateway/handlers/register/ui/card_profile.templ`, Line: 9, Col: 43} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/card/sonr_profile.templ`, Line: 9, Col: 43} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -49,7 +49,7 @@ func ProfileCard(addr, name, handle, creationBlock string) templ.Component { var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(shortenAddress(addr)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/gateway/handlers/register/ui/card_profile.templ`, Line: 16, Col: 58} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/card/sonr_profile.templ`, Line: 16, Col: 58} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -62,7 +62,7 @@ func ProfileCard(addr, name, handle, creationBlock string) templ.Component { var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(creationBlock) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/gateway/handlers/register/ui/card_profile.templ`, Line: 21, Col: 55} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/card/sonr_profile.templ`, Line: 21, Col: 55} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { @@ -75,7 +75,7 @@ func ProfileCard(addr, name, handle, creationBlock string) templ.Component { var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/gateway/handlers/register/ui/card_profile.templ`, Line: 25, Col: 32} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/card/sonr_profile.templ`, Line: 25, Col: 32} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { @@ -89,4 +89,12 @@ func ProfileCard(addr, name, handle, creationBlock string) templ.Component { }) } +// Helper function to shorten address +func shortenAddress(address string) string { + if len(address) <= 20 { + return address + } + return address[:16] + "..." + address[len(address)-4:] +} + var _ = templruntime.GeneratedTemplate diff --git a/internal/gateway/handlers/register/ui/select_coins.templ b/internal/nebula/form/input_coin_select.templ similarity index 96% rename from internal/gateway/handlers/register/ui/select_coins.templ rename to internal/nebula/form/input_coin_select.templ index d3536c263..8dfc286d8 100644 --- a/internal/gateway/handlers/register/ui/select_coins.templ +++ b/internal/nebula/form/input_coin_select.templ @@ -1,4 +1,4 @@ -package ui +package form type Coin struct { Ticker string @@ -23,9 +23,10 @@ var defaultCoins = []Coin{ {Ticker: "AXL", Name: "Axelar", IsDefault: false}, } -templ SelectCoins() { +templ InputCoinSelect() { ") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -99,7 +99,7 @@ func CoinOption(a Coin) templ.Component { var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(a.Ticker) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/gateway/handlers/register/ui/select_coins.templ`, Line: 57, Col: 29} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/form/input_coin_select.templ`, Line: 58, Col: 29} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -112,7 +112,7 @@ func CoinOption(a Coin) templ.Component { var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(a.Ticker) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/gateway/handlers/register/ui/select_coins.templ`, Line: 58, Col: 41} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/form/input_coin_select.templ`, Line: 59, Col: 41} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { @@ -125,7 +125,7 @@ func CoinOption(a Coin) templ.Component { var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(a.Name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/gateway/handlers/register/ui/select_coins.templ`, Line: 59, Col: 11} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/form/input_coin_select.templ`, Line: 60, Col: 11} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { @@ -143,7 +143,7 @@ func CoinOption(a Coin) templ.Component { var templ_7745c5c3_Var6 string templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(a.Ticker) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/gateway/handlers/register/ui/select_coins.templ`, Line: 63, Col: 29} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/form/input_coin_select.templ`, Line: 64, Col: 29} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) if templ_7745c5c3_Err != nil { @@ -156,7 +156,7 @@ func CoinOption(a Coin) templ.Component { var templ_7745c5c3_Var7 string templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(a.Ticker) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/gateway/handlers/register/ui/select_coins.templ`, Line: 64, Col: 41} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/form/input_coin_select.templ`, Line: 65, Col: 41} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) if templ_7745c5c3_Err != nil { @@ -169,7 +169,7 @@ func CoinOption(a Coin) templ.Component { var templ_7745c5c3_Var8 string templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(a.Name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/gateway/handlers/register/ui/select_coins.templ`, Line: 65, Col: 11} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/form/input_coin_select.templ`, Line: 66, Col: 11} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) if templ_7745c5c3_Err != nil { diff --git a/internal/gateway/handlers/register/ui/input_handle.templ b/internal/nebula/form/input_handle.templ similarity index 98% rename from internal/gateway/handlers/register/ui/input_handle.templ rename to internal/nebula/form/input_handle.templ index 7cbfb2706..eca44c2b1 100644 --- a/internal/gateway/handlers/register/ui/input_handle.templ +++ b/internal/nebula/form/input_handle.templ @@ -1,4 +1,4 @@ -package ui +package form type InputHandleState string diff --git a/internal/gateway/handlers/register/ui/input_handle_templ.go b/internal/nebula/form/input_handle_templ.go similarity index 99% rename from internal/gateway/handlers/register/ui/input_handle_templ.go rename to internal/nebula/form/input_handle_templ.go index 7ee1c3447..6fd532c7b 100644 --- a/internal/gateway/handlers/register/ui/input_handle_templ.go +++ b/internal/nebula/form/input_handle_templ.go @@ -1,7 +1,7 @@ // Code generated by templ - DO NOT EDIT. // templ: version: v0.2.793 -package ui +package form //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/internal/gateway/handlers/register/ui/input_name.templ b/internal/nebula/form/input_name.templ similarity index 99% rename from internal/gateway/handlers/register/ui/input_name.templ rename to internal/nebula/form/input_name.templ index b41db7df4..9508bfd37 100644 --- a/internal/gateway/handlers/register/ui/input_name.templ +++ b/internal/nebula/form/input_name.templ @@ -1,4 +1,4 @@ -package ui +package form type InputNameState string diff --git a/internal/gateway/handlers/register/ui/input_name_templ.go b/internal/nebula/form/input_name_templ.go similarity index 99% rename from internal/gateway/handlers/register/ui/input_name_templ.go rename to internal/nebula/form/input_name_templ.go index 7c80dcddb..a6c4d98d1 100644 --- a/internal/gateway/handlers/register/ui/input_name_templ.go +++ b/internal/nebula/form/input_name_templ.go @@ -1,7 +1,7 @@ // Code generated by templ - DO NOT EDIT. // templ: version: v0.2.793 -package ui +package form //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/internal/gateway/handlers/register/ui/input_passkey.templ b/internal/nebula/form/input_passkey.templ similarity index 93% rename from internal/gateway/handlers/register/ui/input_passkey.templ rename to internal/nebula/form/input_passkey.templ index c0b60d221..4c400af1f 100644 --- a/internal/gateway/handlers/register/ui/input_passkey.templ +++ b/internal/nebula/form/input_passkey.templ @@ -1,4 +1,4 @@ -package ui +package form templ InputPasskey(addr string, userHandle string, challenge string) { @@ -80,15 +80,15 @@ navigator.credentials }; // Set the form value with the stringified credential data - const credentialInput = document.getElementById('credential-data'); - credentialInput.value = JSON.stringify(credentialJSON); + const credential = document.getElementById('credential-data'); + credential.value = JSON.stringify(credentialJSON); // Submit the form const form = document.getElementById('passkey-form'); form.submit(); }) .catch((err) => { - console.error('Passkey creation failed:', err); + console.error('InputPasskey creation failed:', err); alert(`Failed to create passkey: ${err.message || 'Unknown error'}`); }); } diff --git a/internal/gateway/handlers/register/ui/input_passkey_templ.go b/internal/nebula/form/input_passkey_templ.go similarity index 92% rename from internal/gateway/handlers/register/ui/input_passkey_templ.go rename to internal/nebula/form/input_passkey_templ.go index b69c40f4e..f78d52e6f 100644 --- a/internal/gateway/handlers/register/ui/input_passkey_templ.go +++ b/internal/nebula/form/input_passkey_templ.go @@ -1,7 +1,7 @@ // Code generated by templ - DO NOT EDIT. // templ: version: v0.2.793 -package ui +package form //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -52,8 +52,8 @@ func InputPasskey(addr string, userHandle string, challenge string) templ.Compon func navigatorCredentialsCreate(userId string, userHandle string, challenge string) templ.ComponentScript { return templ.ComponentScript{ - Name: `__templ_navigatorCredentialsCreate_18a8`, - Function: `function __templ_navigatorCredentialsCreate_18a8(userId, userHandle, challenge){const publicKey = { + Name: `__templ_navigatorCredentialsCreate_7c0a`, + Function: `function __templ_navigatorCredentialsCreate_7c0a(userId, userHandle, challenge){const publicKey = { challenge: Uint8Array.from(challenge, (c) => c.charCodeAt(0)), rp: { name: "Sonr.ID", @@ -125,20 +125,20 @@ navigator.credentials }; // Set the form value with the stringified credential data - const credentialInput = document.getElementById('credential-data'); - credentialInput.value = JSON.stringify(credentialJSON); + const credential = document.getElementById('credential-data'); + credential.value = JSON.stringify(credentialJSON); // Submit the form const form = document.getElementById('passkey-form'); form.submit(); }) .catch((err) => { - console.error('Passkey creation failed:', err); + console.error('InputPasskey creation failed:', err); alert(` + "`" + `Failed to create passkey: ${err.message || 'Unknown error'}` + "`" + `); }); }`, - Call: templ.SafeScript(`__templ_navigatorCredentialsCreate_18a8`, userId, userHandle, challenge), - CallInline: templ.SafeScriptInline(`__templ_navigatorCredentialsCreate_18a8`, userId, userHandle, challenge), + Call: templ.SafeScript(`__templ_navigatorCredentialsCreate_7c0a`, userId, userHandle, challenge), + CallInline: templ.SafeScriptInline(`__templ_navigatorCredentialsCreate_7c0a`, userId, userHandle, challenge), } } diff --git a/internal/gateway/handlers/register/ui/slider_ishuman.templ b/internal/nebula/form/input_slider_isHuman.templ similarity index 81% rename from internal/gateway/handlers/register/ui/slider_ishuman.templ rename to internal/nebula/form/input_slider_isHuman.templ index 9ed34fda3..25eec4ec1 100644 --- a/internal/gateway/handlers/register/ui/slider_ishuman.templ +++ b/internal/nebula/form/input_slider_isHuman.templ @@ -1,8 +1,8 @@ -package ui +package form import "fmt" -templ HumanSlider(firstNumber int, lastNumber int) { +templ InputHumanSlider(firstNumber int, lastNumber int) { } diff --git a/internal/gateway/handlers/register/ui/slider_ishuman_templ.go b/internal/nebula/form/input_slider_isHuman_templ.go similarity index 93% rename from internal/gateway/handlers/register/ui/slider_ishuman_templ.go rename to internal/nebula/form/input_slider_isHuman_templ.go index 895172e18..32f6bff59 100644 --- a/internal/gateway/handlers/register/ui/slider_ishuman_templ.go +++ b/internal/nebula/form/input_slider_isHuman_templ.go @@ -1,7 +1,7 @@ // Code generated by templ - DO NOT EDIT. // templ: version: v0.2.793 -package ui +package form //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -10,7 +10,7 @@ import templruntime "github.com/a-h/templ/runtime" import "fmt" -func HumanSlider(firstNumber int, lastNumber int) templ.Component { +func InputHumanSlider(firstNumber int, lastNumber int) 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 { @@ -38,7 +38,7 @@ func HumanSlider(firstNumber int, lastNumber int) templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(formatHumanSliderLabel(firstNumber, lastNumber)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/gateway/handlers/register/ui/slider_ishuman.templ`, Line: 6, Col: 82} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/form/input_slider_isHuman.templ`, Line: 6, Col: 82} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { diff --git a/internal/nebula/form/layout.templ b/internal/nebula/form/layout.templ new file mode 100644 index 000000000..871ccd2df --- /dev/null +++ b/internal/nebula/form/layout.templ @@ -0,0 +1,58 @@ +package form + +templ Root(action, method, id string) { + + { children... } + +} + +templ Header() { +
+
+ { children... } +
+
+} + +templ Body() { + + { children... } + + +} + +templ Footer() { +
+ { children... } +
+} + +templ CancelButton() { + + + Cancel + +} + +templ SubmitButton(text string) { + + { text } + + +} diff --git a/internal/nebula/form/layout_templ.go b/internal/nebula/form/layout_templ.go new file mode 100644 index 000000000..a91620827 --- /dev/null +++ b/internal/nebula/form/layout_templ.go @@ -0,0 +1,265 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.793 +package form + +//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" + +func Root(action, method, id string) 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 { + return templ_7745c5c3_CtxErr + } + 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_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templ_7745c5c3_Var1.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 + } + return templ_7745c5c3_Err + }) +} + +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 { + return templ_7745c5c3_CtxErr + } + 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_Var5 := templ.GetChildren(ctx) + if templ_7745c5c3_Var5 == nil { + templ_7745c5c3_Var5 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templ_7745c5c3_Var5.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 + } + return templ_7745c5c3_Err + }) +} + +func Body() 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 { + return templ_7745c5c3_CtxErr + } + 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_Var6 := templ.GetChildren(ctx) + if templ_7745c5c3_Var6 == nil { + templ_7745c5c3_Var6 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templ_7745c5c3_Var6.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 + } + return templ_7745c5c3_Err + }) +} + +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 { + return templ_7745c5c3_CtxErr + } + 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_Var7 := templ.GetChildren(ctx) + if templ_7745c5c3_Var7 == nil { + templ_7745c5c3_Var7 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templ_7745c5c3_Var7.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 + } + return templ_7745c5c3_Err + }) +} + +func CancelButton() 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 { + return templ_7745c5c3_CtxErr + } + 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_Var8 := templ.GetChildren(ctx) + if templ_7745c5c3_Var8 == nil { + templ_7745c5c3_Var8 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" Cancel") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func SubmitButton(text string) 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 { + return templ_7745c5c3_CtxErr + } + 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_Var9 := templ.GetChildren(ctx) + if templ_7745c5c3_Var9 == nil { + templ_7745c5c3_Var9 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var10 string + templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(text) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/form/layout.templ`, Line: 53, Col: 8} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10)) + 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 + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/common/styles/layout/container.templ b/internal/nebula/layout/container.templ similarity index 60% rename from pkg/common/styles/layout/container.templ rename to internal/nebula/layout/container.templ index ff39c7d64..4b2ef729b 100644 --- a/pkg/common/styles/layout/container.templ +++ b/internal/nebula/layout/container.templ @@ -7,18 +7,6 @@ templ Columns() {
} -templ Container() { -
-
-
-
- { children... } -
-
-
-
-} - // Rows is a component that renders a responsive flex container that wraps on mobile templ Rows() {
@@ -26,11 +14,6 @@ templ Rows() {
} -// Spacer is a component that renders a
tag -templ Spacer() { -
-} - templ Separator(text string) {
diff --git a/pkg/common/styles/layout/container_templ.go b/internal/nebula/layout/container_templ.go similarity index 62% rename from pkg/common/styles/layout/container_templ.go rename to internal/nebula/layout/container_templ.go index 3df14298a..34a8679ee 100644 --- a/pkg/common/styles/layout/container_templ.go +++ b/internal/nebula/layout/container_templ.go @@ -46,7 +46,8 @@ func Columns() templ.Component { }) } -func Container() templ.Component { +// Rows is a component that renders a responsive flex container that wraps on mobile +func Rows() 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 { @@ -67,7 +68,7 @@ func Container() templ.Component { templ_7745c5c3_Var2 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -75,44 +76,6 @@ func Container() templ.Component { 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 - } - return templ_7745c5c3_Err - }) -} - -// Rows is a component that renders a responsive flex container that wraps on mobile -func Rows() 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 { - return templ_7745c5c3_CtxErr - } - 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_Var3 := templ.GetChildren(ctx) - if templ_7745c5c3_Var3 == nil { - templ_7745c5c3_Var3 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templ_7745c5c3_Var3.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 @@ -121,36 +84,6 @@ func Rows() templ.Component { }) } -// Spacer is a component that renders a
tag -func Spacer() 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 { - return templ_7745c5c3_CtxErr - } - 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_Var4 := templ.GetChildren(ctx) - if templ_7745c5c3_Var4 == nil { - templ_7745c5c3_Var4 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - func Separator(text string) 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 @@ -167,21 +100,21 @@ func Separator(text string) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var5 := templ.GetChildren(ctx) - if templ_7745c5c3_Var5 == nil { - templ_7745c5c3_Var5 = templ.NopComponent + templ_7745c5c3_Var3 := templ.GetChildren(ctx) + if templ_7745c5c3_Var3 == nil { + templ_7745c5c3_Var3 = templ.NopComponent } ctx = templ.ClearChildren(ctx) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var6 string - templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(text) + var templ_7745c5c3_Var4 string + templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(text) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/layout/container.templ`, Line: 38, Col: 45} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/layout/container.templ`, Line: 21, Col: 45} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/pkg/common/styles/layout/layout.templ b/internal/nebula/layout/layout.templ similarity index 98% rename from pkg/common/styles/layout/layout.templ rename to internal/nebula/layout/layout.templ index db31300cc..6fca2bbd2 100644 --- a/pkg/common/styles/layout/layout.templ +++ b/internal/nebula/layout/layout.templ @@ -29,7 +29,7 @@ templ Root(title string) { @Head(title, "0.0.11") -
+
{ children... }
diff --git a/pkg/common/styles/layout/layout_templ.go b/internal/nebula/layout/layout_templ.go similarity index 98% rename from pkg/common/styles/layout/layout_templ.go rename to internal/nebula/layout/layout_templ.go index 30afab727..bf5dbf675 100644 --- a/pkg/common/styles/layout/layout_templ.go +++ b/internal/nebula/layout/layout_templ.go @@ -61,7 +61,7 @@ func Root(title string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -133,7 +133,7 @@ func Head(title string, nebulaVersion string) templ.Component { var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/layout/layout.templ`, Line: 50, Col: 16} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/layout/layout.templ`, Line: 50, Col: 16} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { diff --git a/pkg/common/styles/layout/scripts.templ b/internal/nebula/layout/scripts.templ similarity index 100% rename from pkg/common/styles/layout/scripts.templ rename to internal/nebula/layout/scripts.templ diff --git a/pkg/common/styles/layout/scripts_templ.go b/internal/nebula/layout/scripts_templ.go similarity index 93% rename from pkg/common/styles/layout/scripts_templ.go rename to internal/nebula/layout/scripts_templ.go index 82580d386..76c0b5823 100644 --- a/pkg/common/styles/layout/scripts_templ.go +++ b/internal/nebula/layout/scripts_templ.go @@ -160,7 +160,7 @@ func Alpine() templ.Component { var templ_7745c5c3_Var7 string templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(jsDelivrURL("alpinejs", "3.14.6", "dist/cdn.min.js")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/layout/scripts.templ`, Line: 36, Col: 68} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/layout/scripts.templ`, Line: 36, Col: 68} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) if templ_7745c5c3_Err != nil { @@ -173,7 +173,7 @@ func Alpine() templ.Component { var templ_7745c5c3_Var8 string templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(jsDelivrURL("@alpinejs/focus", "3.14.6", "dist/cdn.min.js")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/layout/scripts.templ`, Line: 37, Col: 75} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/layout/scripts.templ`, Line: 37, Col: 75} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) if templ_7745c5c3_Err != nil { @@ -234,7 +234,7 @@ func Dexie() templ.Component { var templ_7745c5c3_Var11 string templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(jsDelivrURL("dexie", "4.0.10", "dist/dexie.min.js")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/layout/scripts.templ`, Line: 44, Col: 67} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/layout/scripts.templ`, Line: 44, Col: 67} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11)) if templ_7745c5c3_Err != nil { @@ -247,7 +247,7 @@ func Dexie() templ.Component { var templ_7745c5c3_Var12 string templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(jsDelivrURL("dexie-export-import", "4.1.4", "dist/dexie-export-import.min.js")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/layout/scripts.templ`, Line: 45, Col: 94} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/layout/scripts.templ`, Line: 45, Col: 94} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12)) if templ_7745c5c3_Err != nil { @@ -308,7 +308,7 @@ func Htmx() templ.Component { var templ_7745c5c3_Var15 string templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(jsDelivrURL("htmx.org", "1.9.12", "dist/htmx.min.js")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/layout/scripts.templ`, Line: 52, Col: 69} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/layout/scripts.templ`, Line: 52, Col: 69} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15)) if templ_7745c5c3_Err != nil { @@ -321,7 +321,7 @@ func Htmx() templ.Component { var templ_7745c5c3_Var16 string templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(jsDelivrURL("htmx-ext-include-vals", "2.0.0", "include-vals.min.js")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/layout/scripts.templ`, Line: 53, Col: 84} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/layout/scripts.templ`, Line: 53, Col: 84} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16)) if templ_7745c5c3_Err != nil { @@ -334,7 +334,7 @@ func Htmx() templ.Component { var templ_7745c5c3_Var17 string templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(jsDelivrURL("htmx-ext-path-params", "2.0.0", "path-params.min.js")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/layout/scripts.templ`, Line: 54, Col: 82} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/layout/scripts.templ`, Line: 54, Col: 82} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17)) if templ_7745c5c3_Err != nil { @@ -347,7 +347,7 @@ func Htmx() templ.Component { var templ_7745c5c3_Var18 string templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(jsDelivrURL("htmx-ext-alpine-morph", "2.0.0", "alpine-morph.min.js")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/layout/scripts.templ`, Line: 55, Col: 84} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/layout/scripts.templ`, Line: 55, Col: 84} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18)) if templ_7745c5c3_Err != nil { @@ -396,7 +396,7 @@ func Nebula(version string) templ.Component { var templ_7745c5c3_Var20 string templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(jsDelivrURL("@onsonr/nebula", version, "cdn/themes/light.css")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/layout/scripts.templ`, Line: 64, Col: 71} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/layout/scripts.templ`, Line: 64, Col: 71} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20)) if templ_7745c5c3_Err != nil { @@ -409,7 +409,7 @@ func Nebula(version string) templ.Component { var templ_7745c5c3_Var21 string templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(jsDelivrURL("@onsonr/nebula", version, "cdn/themes/dark.css")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/layout/scripts.templ`, Line: 69, Col: 70} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/layout/scripts.templ`, Line: 69, Col: 70} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21)) if templ_7745c5c3_Err != nil { @@ -438,7 +438,7 @@ func Nebula(version string) templ.Component { var templ_7745c5c3_Var23 string templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(jsDelivrURL("@onsonr/nebula", version, "cdn/shoelace-autoloader.js")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/layout/scripts.templ`, Line: 73, Col: 98} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/layout/scripts.templ`, Line: 73, Col: 98} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23)) if templ_7745c5c3_Err != nil { diff --git a/internal/nebula/nav/footer.templ b/internal/nebula/nav/footer.templ new file mode 100644 index 000000000..a7fddc9eb --- /dev/null +++ b/internal/nebula/nav/footer.templ @@ -0,0 +1,10 @@ +package nav + +templ Footer() { +
+
+ +

Sonr.ID

+
+
+} diff --git a/internal/nebula/nav/footer_templ.go b/internal/nebula/nav/footer_templ.go new file mode 100644 index 000000000..45efa7b52 --- /dev/null +++ b/internal/nebula/nav/footer_templ.go @@ -0,0 +1,40 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.793 +package nav + +//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" + +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 { + return templ_7745c5c3_CtxErr + } + 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_Err = templ_7745c5c3_Buffer.WriteString("

Sonr.ID

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/internal/nebula/nav/header.templ b/internal/nebula/nav/header.templ new file mode 100644 index 000000000..0b74facff --- /dev/null +++ b/internal/nebula/nav/header.templ @@ -0,0 +1,35 @@ +package nav + +templ Header() { +
+ +
+} + +templ NavFooter() { +
+
+ +

Sonr.ID

+
+
+} diff --git a/internal/nebula/nav/header_templ.go b/internal/nebula/nav/header_templ.go new file mode 100644 index 000000000..c31b6c624 --- /dev/null +++ b/internal/nebula/nav/header_templ.go @@ -0,0 +1,69 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.793 +package nav + +//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" + +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 { + return templ_7745c5c3_CtxErr + } + 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_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func NavFooter() 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 { + return templ_7745c5c3_CtxErr + } + 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_Var2 := templ.GetChildren(ctx) + if templ_7745c5c3_Var2 == nil { + templ_7745c5c3_Var2 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Sonr.ID

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/internal/nebula/text/titles.templ b/internal/nebula/text/titles.templ new file mode 100644 index 000000000..2e8b9eb6c --- /dev/null +++ b/internal/nebula/text/titles.templ @@ -0,0 +1,12 @@ +package text + +templ TitleDescription(title string, subtitle string) { +
+

+ { title } +

+

+ { subtitle } +

+
+} diff --git a/pkg/common/styles/text/header_templ.go b/internal/nebula/text/titles_templ.go similarity index 77% rename from pkg/common/styles/text/header_templ.go rename to internal/nebula/text/titles_templ.go index a1ee4f1aa..c103e2953 100644 --- a/pkg/common/styles/text/header_templ.go +++ b/internal/nebula/text/titles_templ.go @@ -8,9 +8,7 @@ package text import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" -import "github.com/onsonr/sonr/pkg/common/styles/layout" - -func Header(title string, subtitle string) templ.Component { +func TitleDescription(title string, subtitle string) 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 { @@ -31,27 +29,27 @@ func Header(title string, subtitle string) templ.Component { templ_7745c5c3_Var1 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/text/header.templ`, Line: 8, Col: 10} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/text/titles.templ`, Line: 6, Col: 10} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(subtitle) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/text/header.templ`, Line: 11, Col: 13} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/nebula/text/titles.templ`, Line: 9, Col: 13} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -61,10 +59,6 @@ func Header(title string, subtitle string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = layout.Spacer().Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } return templ_7745c5c3_Err }) } diff --git a/pkg/common/styles/text/header.templ b/pkg/common/styles/text/header.templ deleted file mode 100644 index f40149509..000000000 --- a/pkg/common/styles/text/header.templ +++ /dev/null @@ -1,15 +0,0 @@ -package text - -import "github.com/onsonr/sonr/pkg/common/styles/layout" - -templ Header(title string, subtitle string) { -

-

- { title } -

-

- { subtitle } -

-
- @layout.Spacer() -}