From 32563a551d82d41ba2eec4c73a743fb96dbf9e92 Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Wed, 9 Oct 2024 14:18:50 -0400 Subject: [PATCH] refactor: move index template to routes package --- pkg/nebula/{global => routes}/index.templ | 10 +++++----- pkg/nebula/{global => routes}/index_templ.go | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) rename pkg/nebula/{global => routes}/index.templ (83%) rename pkg/nebula/{global => routes}/index_templ.go (89%) diff --git a/pkg/nebula/global/index.templ b/pkg/nebula/routes/index.templ similarity index 83% rename from pkg/nebula/global/index.templ rename to pkg/nebula/routes/index.templ index 46842a0bb..5fee0be5e 100644 --- a/pkg/nebula/global/index.templ +++ b/pkg/nebula/routes/index.templ @@ -1,17 +1,17 @@ -package global +package routes import ( - cdn "github.com/onsonr/sonr/pkg/nebula/assets" "github.com/onsonr/sonr/pkg/nebula/global/state" + "github.com/onsonr/sonr/pkg/nebula/global/styles" ) templ IndexFile() { - @cdn.Alpine() - @cdn.Htmx() - @cdn.Styles() + @styles.Alpine() + @styles.Htmx() + @styles.Styles() diff --git a/pkg/nebula/global/index_templ.go b/pkg/nebula/routes/index_templ.go similarity index 89% rename from pkg/nebula/global/index_templ.go rename to pkg/nebula/routes/index_templ.go index 5e3670f31..dfef71211 100644 --- a/pkg/nebula/global/index_templ.go +++ b/pkg/nebula/routes/index_templ.go @@ -1,7 +1,7 @@ // Code generated by templ - DO NOT EDIT. // templ: version: v0.2.778 -package global +package routes //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -9,8 +9,8 @@ import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" import ( - cdn "github.com/onsonr/sonr/pkg/nebula/assets" "github.com/onsonr/sonr/pkg/nebula/global/state" + "github.com/onsonr/sonr/pkg/nebula/global/styles" ) func IndexFile() templ.Component { @@ -38,15 +38,15 @@ func IndexFile() templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = cdn.Alpine().Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Err = styles.Alpine().Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = cdn.Htmx().Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Err = styles.Htmx().Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = cdn.Styles().Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Err = styles.Styles().Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err }