From 0feee552405eca5c47c28588c2a7c52ff2bb5cf2 Mon Sep 17 00:00:00 2001 From: luke-dcz Date: Mon, 10 Feb 2025 11:14:25 +0000 Subject: [PATCH 1/3] upgrade templ version to support css style management --- go.mod | 2 +- go.sum | 2 ++ internal/ui/components/header/header_templ.go | 2 +- internal/ui/components/modal/modal_templ.go | 2 +- internal/ui/components/toast/toast_templ.go | 2 +- internal/ui/index_templ.go | 2 +- internal/ui/pages/active-search/index_templ.go | 2 +- internal/ui/pages/bulk-update/index_templ.go | 2 +- internal/ui/pages/click-to-edit/index_templ.go | 2 +- internal/ui/pages/click-to-load/index_templ.go | 2 +- internal/ui/pages/delete-row/index_templ.go | 2 +- internal/ui/pages/home/index_templ.go | 2 +- internal/ui/pages/inline-validation/index_templ.go | 2 +- internal/ui/pages/notfound/notfound_templ.go | 2 +- internal/ui/pages/page1/index_templ.go | 2 +- internal/ui/pages/page2/index_templ.go | 2 +- internal/ui/pages/validation/inline_templ.go | 2 +- 17 files changed, 18 insertions(+), 16 deletions(-) diff --git a/go.mod b/go.mod index 7189a49..8a4624a 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/gofs-cli/template go 1.23.5 require ( - github.com/a-h/templ v0.3.819 + github.com/a-h/templ v0.3.833 github.com/go-chi/chi/v5 v5.2.0 github.com/go-chi/cors v1.2.1 ) diff --git a/go.sum b/go.sum index e7ce977..eba5e03 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,7 @@ github.com/a-h/templ v0.3.819 h1:KDJ5jTFN15FyJnmSmo2gNirIqt7hfvBD2VXVDTySckM= github.com/a-h/templ v0.3.819/go.mod h1:iDJKJktpttVKdWoTkRNNLcllRI+BlpopJc+8au3gOUo= +github.com/a-h/templ v0.3.833 h1:L/KOk/0VvVTBegtE0fp2RJQiBm7/52Zxv5fqlEHiQUU= +github.com/a-h/templ v0.3.833/go.mod h1:cAu4AiZhtJfBjMY0HASlyzvkrtjnHWPeEsyGK2YYmfk= github.com/go-chi/chi/v5 v5.2.0 h1:Aj1EtB0qR2Rdo2dG4O94RIU35w2lvQSj6BRA4+qwFL0= github.com/go-chi/chi/v5 v5.2.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-chi/cors v1.2.1 h1:xEC8UT3Rlp2QuWNEr4Fs/c2EAGVKBwy/1vHx3bppil4= diff --git a/internal/ui/components/header/header_templ.go b/internal/ui/components/header/header_templ.go index 667778e..c85fbca 100644 --- a/internal/ui/components/header/header_templ.go +++ b/internal/ui/components/header/header_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package header //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/internal/ui/components/modal/modal_templ.go b/internal/ui/components/modal/modal_templ.go index ca24252..334c6ac 100644 --- a/internal/ui/components/modal/modal_templ.go +++ b/internal/ui/components/modal/modal_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package modal //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/internal/ui/components/toast/toast_templ.go b/internal/ui/components/toast/toast_templ.go index 9a61b49..e5357cd 100644 --- a/internal/ui/components/toast/toast_templ.go +++ b/internal/ui/components/toast/toast_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package toast //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/internal/ui/index_templ.go b/internal/ui/index_templ.go index 2e008e8..cfdacc7 100644 --- a/internal/ui/index_templ.go +++ b/internal/ui/index_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package ui //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/internal/ui/pages/active-search/index_templ.go b/internal/ui/pages/active-search/index_templ.go index b1f5dcb..4963657 100644 --- a/internal/ui/pages/active-search/index_templ.go +++ b/internal/ui/pages/active-search/index_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package activesearch //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/internal/ui/pages/bulk-update/index_templ.go b/internal/ui/pages/bulk-update/index_templ.go index 401b48e..8bb3995 100644 --- a/internal/ui/pages/bulk-update/index_templ.go +++ b/internal/ui/pages/bulk-update/index_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package bulkupdate //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/internal/ui/pages/click-to-edit/index_templ.go b/internal/ui/pages/click-to-edit/index_templ.go index a2274d7..4b123d8 100644 --- a/internal/ui/pages/click-to-edit/index_templ.go +++ b/internal/ui/pages/click-to-edit/index_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package clicktoedit //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/internal/ui/pages/click-to-load/index_templ.go b/internal/ui/pages/click-to-load/index_templ.go index 5ad702b..8ba365c 100644 --- a/internal/ui/pages/click-to-load/index_templ.go +++ b/internal/ui/pages/click-to-load/index_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package clicktoload //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/internal/ui/pages/delete-row/index_templ.go b/internal/ui/pages/delete-row/index_templ.go index 05a2716..d6f13cb 100644 --- a/internal/ui/pages/delete-row/index_templ.go +++ b/internal/ui/pages/delete-row/index_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package deleterow //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/internal/ui/pages/home/index_templ.go b/internal/ui/pages/home/index_templ.go index 00a2af3..8349b6f 100644 --- a/internal/ui/pages/home/index_templ.go +++ b/internal/ui/pages/home/index_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package home //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/internal/ui/pages/inline-validation/index_templ.go b/internal/ui/pages/inline-validation/index_templ.go index a565cc3..f11d5da 100644 --- a/internal/ui/pages/inline-validation/index_templ.go +++ b/internal/ui/pages/inline-validation/index_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package inlinevalidation //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/internal/ui/pages/notfound/notfound_templ.go b/internal/ui/pages/notfound/notfound_templ.go index 2725743..9c86135 100644 --- a/internal/ui/pages/notfound/notfound_templ.go +++ b/internal/ui/pages/notfound/notfound_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package notfound //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/internal/ui/pages/page1/index_templ.go b/internal/ui/pages/page1/index_templ.go index 7cc9b7d..ac07218 100644 --- a/internal/ui/pages/page1/index_templ.go +++ b/internal/ui/pages/page1/index_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package page1 //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/internal/ui/pages/page2/index_templ.go b/internal/ui/pages/page2/index_templ.go index 2120bc4..8db5163 100644 --- a/internal/ui/pages/page2/index_templ.go +++ b/internal/ui/pages/page2/index_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package page2 //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/internal/ui/pages/validation/inline_templ.go b/internal/ui/pages/validation/inline_templ.go index 90ad1c7..64b1f72 100644 --- a/internal/ui/pages/validation/inline_templ.go +++ b/internal/ui/pages/validation/inline_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package validation //lint:file-ignore SA4006 This context is only used if a nested component is present. From 7c9b4ffa3f7fd909226c6732c629ad95fc625bbe Mon Sep 17 00:00:00 2001 From: luke-dcz Date: Mon, 10 Feb 2025 11:18:28 +0000 Subject: [PATCH 2/3] add color throb --- internal/server/routes.go | 5 + internal/ui/pages/animations/handlers.go | 34 ++++ internal/ui/pages/animations/index.templ | 36 ++++ internal/ui/pages/animations/index_templ.go | 207 ++++++++++++++++++++ 4 files changed, 282 insertions(+) create mode 100644 internal/ui/pages/animations/handlers.go create mode 100644 internal/ui/pages/animations/index.templ create mode 100644 internal/ui/pages/animations/index_templ.go diff --git a/internal/server/routes.go b/internal/server/routes.go index 0d19465..b703461 100644 --- a/internal/server/routes.go +++ b/internal/server/routes.go @@ -6,6 +6,7 @@ import ( "github.com/gofs-cli/template/internal/server/assets" "github.com/gofs-cli/template/internal/server/handlers" activesearch "github.com/gofs-cli/template/internal/ui/pages/active-search" + "github.com/gofs-cli/template/internal/ui/pages/animations" bulkupdate "github.com/gofs-cli/template/internal/ui/pages/bulk-update" clicktoedit "github.com/gofs-cli/template/internal/ui/pages/click-to-edit" clicktoload "github.com/gofs-cli/template/internal/ui/pages/click-to-load" @@ -56,6 +57,10 @@ func (s *Server) Routes() { routesMux.Handle("GET /active-search", activesearch.Index()) routesMux.Handle("POST /active-search/search", activesearch.Search()) + // animations example + routesMux.Handle("GET /animations", animations.Index()) + routesMux.Handle("GET /animations/colors", animations.Colors()) + routesMux.Handle("GET /modal", home.Modal()) routesMux.Handle("GET /page1", page1.Index()) diff --git a/internal/ui/pages/animations/handlers.go b/internal/ui/pages/animations/handlers.go new file mode 100644 index 0000000..018d80e --- /dev/null +++ b/internal/ui/pages/animations/handlers.go @@ -0,0 +1,34 @@ +package animations + +import ( + "math/rand/v2" + "net/http" + + "github.com/a-h/templ" + "github.com/gofs-cli/template/internal/ui" + "github.com/gofs-cli/template/internal/ui/components/header" +) + +func Index() http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + templ.Handler(ui.IndexPage(layout(header.Header(), body()))).ServeHTTP(w, r) + }) +} + +func Colors() http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + colors := []string{ + "red", + "blue", + "green", + "orange", + "pink", + } + + // Fix: Ensure we use all colors + color := colors[rand.IntN(len(colors))] + + // Fix: Pass color correctly to the templ component + templ.Handler(newColor(color)).ServeHTTP(w, r) + }) +} diff --git a/internal/ui/pages/animations/index.templ b/internal/ui/pages/animations/index.templ new file mode 100644 index 0000000..7fd3321 --- /dev/null +++ b/internal/ui/pages/animations/index.templ @@ -0,0 +1,36 @@ +package animations + +import "fmt" + +css classLayout() { + display: grid; +} + +css smooth() { + transition: all 1s ease-in; +} + +templ layout(header, body templ.Component) { +
+
+ @header +
+
+ @body +
+
+} + +templ body() { +

Animations:

+

Color throb:

+
+ Color Swap Demo +
+} + +templ newColor(color string) { +
+ Color Swap Demo +
+} diff --git a/internal/ui/pages/animations/index_templ.go b/internal/ui/pages/animations/index_templ.go new file mode 100644 index 0000000..f7b9988 --- /dev/null +++ b/internal/ui/pages/animations/index_templ.go @@ -0,0 +1,207 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.3.833 +package animations + +//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 "fmt" + +func classLayout() templ.CSSClass { + templ_7745c5c3_CSSBuilder := templruntime.GetBuilder() + templ_7745c5c3_CSSBuilder.WriteString(`display:grid;`) + templ_7745c5c3_CSSID := templ.CSSID(`classLayout`, templ_7745c5c3_CSSBuilder.String()) + return templ.ComponentCSSClass{ + ID: templ_7745c5c3_CSSID, + Class: templ.SafeCSS(`.` + templ_7745c5c3_CSSID + `{` + templ_7745c5c3_CSSBuilder.String() + `}`), + } +} + +func smooth() templ.CSSClass { + templ_7745c5c3_CSSBuilder := templruntime.GetBuilder() + templ_7745c5c3_CSSBuilder.WriteString(`transition:all 1s ease-in;`) + templ_7745c5c3_CSSID := templ.CSSID(`smooth`, templ_7745c5c3_CSSBuilder.String()) + return templ.ComponentCSSClass{ + ID: templ_7745c5c3_CSSID, + Class: templ.SafeCSS(`.` + templ_7745c5c3_CSSID + `{` + templ_7745c5c3_CSSBuilder.String() + `}`), + } +} + +func layout(header, body templ.Component) 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) + var templ_7745c5c3_Var2 = []any{classLayout()} + templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var2...) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = header.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = body.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return nil + }) +} + +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_Var4 := templ.GetChildren(ctx) + if templ_7745c5c3_Var4 == nil { + templ_7745c5c3_Var4 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "

Animations:

Color throb:

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var5 = []any{smooth()} + templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var5...) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "
Color Swap Demo
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return nil + }) +} + +func newColor(color 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_Var7 := templ.GetChildren(ctx) + if templ_7745c5c3_Var7 == nil { + templ_7745c5c3_Var7 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + var templ_7745c5c3_Var8 = []any{smooth()} + templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var8...) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "
Color Swap Demo
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return nil + }) +} + +var _ = templruntime.GeneratedTemplate From 1a5e4ba737ab70c95e3c7cf1e19e289e3c0c79fe Mon Sep 17 00:00:00 2001 From: luke-dcz Date: Mon, 10 Feb 2025 11:25:30 +0000 Subject: [PATCH 3/3] add fade in example --- internal/server/routes.go | 1 + internal/ui/pages/animations/handlers.go | 9 ++++-- internal/ui/pages/animations/index.templ | 21 +++++++++++++ internal/ui/pages/animations/index_templ.go | 35 ++++++++++++++++++++- 4 files changed, 62 insertions(+), 4 deletions(-) diff --git a/internal/server/routes.go b/internal/server/routes.go index b703461..d4fb8db 100644 --- a/internal/server/routes.go +++ b/internal/server/routes.go @@ -60,6 +60,7 @@ func (s *Server) Routes() { // animations example routesMux.Handle("GET /animations", animations.Index()) routesMux.Handle("GET /animations/colors", animations.Colors()) + routesMux.Handle("POST /animations/fade_in_demo", animations.FadeIn()) routesMux.Handle("GET /modal", home.Modal()) diff --git a/internal/ui/pages/animations/handlers.go b/internal/ui/pages/animations/handlers.go index 018d80e..37523c0 100644 --- a/internal/ui/pages/animations/handlers.go +++ b/internal/ui/pages/animations/handlers.go @@ -24,11 +24,14 @@ func Colors() http.Handler { "orange", "pink", } - - // Fix: Ensure we use all colors color := colors[rand.IntN(len(colors))] - // Fix: Pass color correctly to the templ component templ.Handler(newColor(color)).ServeHTTP(w, r) }) } + +func FadeIn() http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + templ.Handler(fadeIn()).ServeHTTP(w, r) + }) +} diff --git a/internal/ui/pages/animations/index.templ b/internal/ui/pages/animations/index.templ index 7fd3321..9bd84e3 100644 --- a/internal/ui/pages/animations/index.templ +++ b/internal/ui/pages/animations/index.templ @@ -27,6 +27,7 @@ templ body() {
Color Swap Demo
+ @fadeIn() } templ newColor(color string) { @@ -34,3 +35,23 @@ templ newColor(color string) { Color Swap Demo } + +templ fadeIn() { + + +} diff --git a/internal/ui/pages/animations/index_templ.go b/internal/ui/pages/animations/index_templ.go index f7b9988..3c118d8 100644 --- a/internal/ui/pages/animations/index_templ.go +++ b/internal/ui/pages/animations/index_templ.go @@ -140,6 +140,10 @@ func body() templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } + templ_7745c5c3_Err = fadeIn().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } return nil }) } @@ -190,7 +194,7 @@ func newColor(color string) templ.Component { var templ_7745c5c3_Var10 string templ_7745c5c3_Var10, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues(fmt.Sprintf("color: %s;", color)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/ui/pages/animations/index.templ`, Line: 33, Col: 81} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/ui/pages/animations/index.templ`, Line: 34, Col: 81} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10)) if templ_7745c5c3_Err != nil { @@ -204,4 +208,33 @@ func newColor(color string) templ.Component { }) } +func fadeIn() 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_Var11 := templ.GetChildren(ctx) + if templ_7745c5c3_Var11 == nil { + templ_7745c5c3_Var11 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return nil + }) +} + var _ = templruntime.GeneratedTemplate