From 8ceb89053f9438418ba0b28f0410ea6da92de6d3 Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Mon, 9 Dec 2024 18:27:55 -0500 Subject: [PATCH] refactor: Move form templates and styles to common directory --- .../styles}/forms/create_profile.templ | 2 +- .../styles}/forms/create_profile_templ.go | 6 ++--- .../styles}/forms/register_passkey.templ | 0 .../styles}/forms/register_passkey_templ.go | 10 ++++----- .../styles}/forms/setup_wallet.templ | 2 +- .../styles}/forms/setup_wallet_templ.go | 4 ++-- .../styles}/layout/container.templ | 0 .../styles}/layout/container_templ.go | 2 +- .../styles}/layout/layout.templ | 0 .../styles}/layout/layout_templ.go | 2 +- .../styles}/layout/scripts.templ | 0 .../styles}/layout/scripts_templ.go | 22 +++++++++---------- .../styles}/text/header.templ | 2 +- .../styles}/text/header_templ.go | 6 ++--- pkg/gateway/handlers/register_handler.go | 2 +- pkg/gateway/pages/index/error.templ | 2 +- pkg/gateway/pages/index/error_templ.go | 2 +- pkg/gateway/pages/index/page.templ | 4 ++-- pkg/gateway/pages/index/page_templ.go | 4 ++-- pkg/gateway/pages/register/page.templ | 5 ++--- pkg/gateway/pages/register/page_templ.go | 5 ++--- 21 files changed, 40 insertions(+), 42 deletions(-) rename pkg/{blocks => common/styles}/forms/create_profile.templ (97%) rename pkg/{blocks => common/styles}/forms/create_profile_templ.go (94%) rename pkg/{blocks => common/styles}/forms/register_passkey.templ (100%) rename pkg/{blocks => common/styles}/forms/register_passkey_templ.go (95%) rename pkg/{blocks => common/styles}/forms/setup_wallet.templ (95%) rename pkg/{blocks => common/styles}/forms/setup_wallet_templ.go (95%) rename pkg/{blocks => common/styles}/layout/container.templ (100%) rename pkg/{blocks => common/styles}/layout/container_templ.go (98%) rename pkg/{blocks => common/styles}/layout/layout.templ (100%) rename pkg/{blocks => common/styles}/layout/layout_templ.go (98%) rename pkg/{blocks => common/styles}/layout/scripts.templ (100%) rename pkg/{blocks => common/styles}/layout/scripts_templ.go (93%) rename pkg/{blocks => common/styles}/text/header.templ (82%) rename pkg/{blocks => common/styles}/text/header_templ.go (89%) diff --git a/pkg/blocks/forms/create_profile.templ b/pkg/common/styles/forms/create_profile.templ similarity index 97% rename from pkg/blocks/forms/create_profile.templ rename to pkg/common/styles/forms/create_profile.templ index 4747b988e..8ff7e8b97 100644 --- a/pkg/blocks/forms/create_profile.templ +++ b/pkg/common/styles/forms/create_profile.templ @@ -2,7 +2,7 @@ package forms import ( "fmt" - "github.com/onsonr/sonr/pkg/blocks/layout" + "github.com/onsonr/sonr/pkg/common/styles/layout" ) type CreateProfileData struct { diff --git a/pkg/blocks/forms/create_profile_templ.go b/pkg/common/styles/forms/create_profile_templ.go similarity index 94% rename from pkg/blocks/forms/create_profile_templ.go rename to pkg/common/styles/forms/create_profile_templ.go index d6270eeaa..3e00e8f60 100644 --- a/pkg/blocks/forms/create_profile_templ.go +++ b/pkg/common/styles/forms/create_profile_templ.go @@ -10,7 +10,7 @@ import templruntime "github.com/a-h/templ/runtime" import ( "fmt" - "github.com/onsonr/sonr/pkg/blocks/layout" + "github.com/onsonr/sonr/pkg/common/styles/layout" ) type CreateProfileData struct { @@ -61,7 +61,7 @@ func CreateProfile(action string, method string, data CreateProfileData) templ.C 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: `pkg/blocks/forms/create_profile.templ`, Line: 20, Col: 55} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/forms/create_profile.templ`, Line: 20, Col: 55} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -112,7 +112,7 @@ func CreateProfile(action string, method string, data CreateProfileData) templ.C var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(data.IsHumanLabel()) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/blocks/forms/create_profile.templ`, Line: 38, Col: 56} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/forms/create_profile.templ`, Line: 38, Col: 56} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { diff --git a/pkg/blocks/forms/register_passkey.templ b/pkg/common/styles/forms/register_passkey.templ similarity index 100% rename from pkg/blocks/forms/register_passkey.templ rename to pkg/common/styles/forms/register_passkey.templ diff --git a/pkg/blocks/forms/register_passkey_templ.go b/pkg/common/styles/forms/register_passkey_templ.go similarity index 95% rename from pkg/blocks/forms/register_passkey_templ.go rename to pkg/common/styles/forms/register_passkey_templ.go index 3a9f43b5c..6f2398dff 100644 --- a/pkg/blocks/forms/register_passkey_templ.go +++ b/pkg/common/styles/forms/register_passkey_templ.go @@ -53,7 +53,7 @@ func RegisterPasskey(action, method string, data RegisterPasskeyData) templ.Comp 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: `pkg/blocks/forms/register_passkey.templ`, Line: 12, Col: 55} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/forms/register_passkey.templ`, Line: 12, Col: 55} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -244,7 +244,7 @@ func sonrProfile(addr string, name string, handle string, creationBlock string) var templ_7745c5c3_Var7 string templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(handle) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/blocks/forms/register_passkey.templ`, Line: 135, Col: 43} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/forms/register_passkey.templ`, Line: 135, Col: 43} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) if templ_7745c5c3_Err != nil { @@ -257,7 +257,7 @@ func sonrProfile(addr string, name string, handle string, creationBlock string) var templ_7745c5c3_Var8 string templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(shortenAddress(addr)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/blocks/forms/register_passkey.templ`, Line: 142, Col: 58} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/forms/register_passkey.templ`, Line: 142, Col: 58} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) if templ_7745c5c3_Err != nil { @@ -270,7 +270,7 @@ func sonrProfile(addr string, name string, handle string, creationBlock string) var templ_7745c5c3_Var9 string templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(creationBlock) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/blocks/forms/register_passkey.templ`, Line: 147, Col: 55} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/forms/register_passkey.templ`, Line: 147, Col: 55} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) if templ_7745c5c3_Err != nil { @@ -283,7 +283,7 @@ func sonrProfile(addr string, name string, handle string, creationBlock string) var templ_7745c5c3_Var10 string templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/blocks/forms/register_passkey.templ`, Line: 151, Col: 32} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/forms/register_passkey.templ`, Line: 151, Col: 32} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10)) if templ_7745c5c3_Err != nil { diff --git a/pkg/blocks/forms/setup_wallet.templ b/pkg/common/styles/forms/setup_wallet.templ similarity index 95% rename from pkg/blocks/forms/setup_wallet.templ rename to pkg/common/styles/forms/setup_wallet.templ index dd8ca56fa..be5d4b274 100644 --- a/pkg/blocks/forms/setup_wallet.templ +++ b/pkg/common/styles/forms/setup_wallet.templ @@ -1,6 +1,6 @@ package forms -import "github.com/onsonr/sonr/pkg/blocks/layout" +import "github.com/onsonr/sonr/pkg/common/styles/layout" type SetupWalletData struct { TurnstileSiteKey string diff --git a/pkg/blocks/forms/setup_wallet_templ.go b/pkg/common/styles/forms/setup_wallet_templ.go similarity index 95% rename from pkg/blocks/forms/setup_wallet_templ.go rename to pkg/common/styles/forms/setup_wallet_templ.go index 9dc9359eb..295ade535 100644 --- a/pkg/blocks/forms/setup_wallet_templ.go +++ b/pkg/common/styles/forms/setup_wallet_templ.go @@ -8,7 +8,7 @@ package forms import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" -import "github.com/onsonr/sonr/pkg/blocks/layout" +import "github.com/onsonr/sonr/pkg/common/styles/layout" type SetupWalletData struct { TurnstileSiteKey string @@ -54,7 +54,7 @@ func SetupWallet(action string, method string, data CreateProfileData) templ.Com 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: `pkg/blocks/forms/setup_wallet.templ`, Line: 13, Col: 55} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/forms/setup_wallet.templ`, Line: 13, Col: 55} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { diff --git a/pkg/blocks/layout/container.templ b/pkg/common/styles/layout/container.templ similarity index 100% rename from pkg/blocks/layout/container.templ rename to pkg/common/styles/layout/container.templ diff --git a/pkg/blocks/layout/container_templ.go b/pkg/common/styles/layout/container_templ.go similarity index 98% rename from pkg/blocks/layout/container_templ.go rename to pkg/common/styles/layout/container_templ.go index d45be523d..fca150767 100644 --- a/pkg/blocks/layout/container_templ.go +++ b/pkg/common/styles/layout/container_templ.go @@ -179,7 +179,7 @@ func Separator(text string) templ.Component { var templ_7745c5c3_Var6 string templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(text) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/blocks/layout/container.templ`, Line: 38, Col: 45} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/layout/container.templ`, Line: 38, Col: 45} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) if templ_7745c5c3_Err != nil { diff --git a/pkg/blocks/layout/layout.templ b/pkg/common/styles/layout/layout.templ similarity index 100% rename from pkg/blocks/layout/layout.templ rename to pkg/common/styles/layout/layout.templ diff --git a/pkg/blocks/layout/layout_templ.go b/pkg/common/styles/layout/layout_templ.go similarity index 98% rename from pkg/blocks/layout/layout_templ.go rename to pkg/common/styles/layout/layout_templ.go index 62c53434b..58c09ca31 100644 --- a/pkg/blocks/layout/layout_templ.go +++ b/pkg/common/styles/layout/layout_templ.go @@ -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/blocks/layout/layout.templ`, Line: 50, Col: 16} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/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/blocks/layout/scripts.templ b/pkg/common/styles/layout/scripts.templ similarity index 100% rename from pkg/blocks/layout/scripts.templ rename to pkg/common/styles/layout/scripts.templ diff --git a/pkg/blocks/layout/scripts_templ.go b/pkg/common/styles/layout/scripts_templ.go similarity index 93% rename from pkg/blocks/layout/scripts_templ.go rename to pkg/common/styles/layout/scripts_templ.go index c7000c1c3..82580d386 100644 --- a/pkg/blocks/layout/scripts_templ.go +++ b/pkg/common/styles/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/blocks/layout/scripts.templ`, Line: 36, Col: 68} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/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/blocks/layout/scripts.templ`, Line: 37, Col: 75} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/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/blocks/layout/scripts.templ`, Line: 44, Col: 67} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/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/blocks/layout/scripts.templ`, Line: 45, Col: 94} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/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/blocks/layout/scripts.templ`, Line: 52, Col: 69} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/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/blocks/layout/scripts.templ`, Line: 53, Col: 84} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/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/blocks/layout/scripts.templ`, Line: 54, Col: 82} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/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/blocks/layout/scripts.templ`, Line: 55, Col: 84} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/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/blocks/layout/scripts.templ`, Line: 64, Col: 71} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/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/blocks/layout/scripts.templ`, Line: 69, Col: 70} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/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/blocks/layout/scripts.templ`, Line: 73, Col: 98} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/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/pkg/blocks/text/header.templ b/pkg/common/styles/text/header.templ similarity index 82% rename from pkg/blocks/text/header.templ rename to pkg/common/styles/text/header.templ index e22a79b5b..f40149509 100644 --- a/pkg/blocks/text/header.templ +++ b/pkg/common/styles/text/header.templ @@ -1,6 +1,6 @@ package text -import "github.com/onsonr/sonr/pkg/blocks/layout" +import "github.com/onsonr/sonr/pkg/common/styles/layout" templ Header(title string, subtitle string) {
diff --git a/pkg/blocks/text/header_templ.go b/pkg/common/styles/text/header_templ.go similarity index 89% rename from pkg/blocks/text/header_templ.go rename to pkg/common/styles/text/header_templ.go index 8799e8e57..a1ee4f1aa 100644 --- a/pkg/blocks/text/header_templ.go +++ b/pkg/common/styles/text/header_templ.go @@ -8,7 +8,7 @@ package text import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" -import "github.com/onsonr/sonr/pkg/blocks/layout" +import "github.com/onsonr/sonr/pkg/common/styles/layout" func Header(title string, subtitle string) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { @@ -38,7 +38,7 @@ func Header(title string, subtitle string) templ.Component { 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/blocks/text/header.templ`, Line: 8, Col: 10} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/text/header.templ`, Line: 8, Col: 10} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -51,7 +51,7 @@ func Header(title string, subtitle string) templ.Component { 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/blocks/text/header.templ`, Line: 11, Col: 13} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/common/styles/text/header.templ`, Line: 11, Col: 13} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { diff --git a/pkg/gateway/handlers/register_handler.go b/pkg/gateway/handlers/register_handler.go index 9481d4942..5b63d0807 100644 --- a/pkg/gateway/handlers/register_handler.go +++ b/pkg/gateway/handlers/register_handler.go @@ -9,8 +9,8 @@ import ( "github.com/go-webauthn/webauthn/protocol" "github.com/labstack/echo/v4" "github.com/onsonr/sonr/crypto/mpc" - "github.com/onsonr/sonr/pkg/blocks/forms" "github.com/onsonr/sonr/pkg/common/response" + "github.com/onsonr/sonr/pkg/common/styles/forms" "github.com/onsonr/sonr/pkg/gateway/internal/database" "github.com/onsonr/sonr/pkg/gateway/pages/register" ) diff --git a/pkg/gateway/pages/index/error.templ b/pkg/gateway/pages/index/error.templ index d862dc3cd..cdaaabf87 100644 --- a/pkg/gateway/pages/index/error.templ +++ b/pkg/gateway/pages/index/error.templ @@ -1,6 +1,6 @@ package index -import "github.com/onsonr/sonr/pkg/blocks/layout" +import "github.com/onsonr/sonr/pkg/common/styles/layout" templ NoWebauthnErrorView() { @layout.Root("Error | Sonr.ID") { diff --git a/pkg/gateway/pages/index/error_templ.go b/pkg/gateway/pages/index/error_templ.go index bf9a5e07a..ef0cf3330 100644 --- a/pkg/gateway/pages/index/error_templ.go +++ b/pkg/gateway/pages/index/error_templ.go @@ -8,7 +8,7 @@ package index import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" -import "github.com/onsonr/sonr/pkg/blocks/layout" +import "github.com/onsonr/sonr/pkg/common/styles/layout" func NoWebauthnErrorView() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { diff --git a/pkg/gateway/pages/index/page.templ b/pkg/gateway/pages/index/page.templ index 2cbd7a3ea..c6559c7c1 100644 --- a/pkg/gateway/pages/index/page.templ +++ b/pkg/gateway/pages/index/page.templ @@ -1,8 +1,8 @@ package index import ( - "github.com/onsonr/sonr/pkg/blocks/layout" - "github.com/onsonr/sonr/pkg/blocks/text" + "github.com/onsonr/sonr/pkg/common/styles/layout" + "github.com/onsonr/sonr/pkg/common/styles/text" ) templ InitialView() { diff --git a/pkg/gateway/pages/index/page_templ.go b/pkg/gateway/pages/index/page_templ.go index 654df2515..6d063f3f0 100644 --- a/pkg/gateway/pages/index/page_templ.go +++ b/pkg/gateway/pages/index/page_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/pkg/blocks/layout" - "github.com/onsonr/sonr/pkg/blocks/text" + "github.com/onsonr/sonr/pkg/common/styles/layout" + "github.com/onsonr/sonr/pkg/common/styles/text" ) func InitialView() templ.Component { diff --git a/pkg/gateway/pages/register/page.templ b/pkg/gateway/pages/register/page.templ index c462ecf39..c4ef86618 100644 --- a/pkg/gateway/pages/register/page.templ +++ b/pkg/gateway/pages/register/page.templ @@ -1,9 +1,8 @@ package register import ( - "github.com/onsonr/sonr/pkg/blocks/forms" - "github.com/onsonr/sonr/pkg/blocks/layout" - "github.com/onsonr/sonr/pkg/blocks/text" + "github.com/onsonr/sonr/pkg/common/styles/layout" + "github.com/onsonr/sonr/pkg/common/styles/text" ) templ ProfileFormView(data forms.CreateProfileData) { diff --git a/pkg/gateway/pages/register/page_templ.go b/pkg/gateway/pages/register/page_templ.go index 66a79d7c3..4e8685973 100644 --- a/pkg/gateway/pages/register/page_templ.go +++ b/pkg/gateway/pages/register/page_templ.go @@ -9,9 +9,8 @@ import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" import ( - "github.com/onsonr/sonr/pkg/blocks/forms" - "github.com/onsonr/sonr/pkg/blocks/layout" - "github.com/onsonr/sonr/pkg/blocks/text" + "github.com/onsonr/sonr/pkg/common/styles/layout" + "github.com/onsonr/sonr/pkg/common/styles/text" ) func ProfileFormView(data forms.CreateProfileData) templ.Component {