refactor: rename hero components and update imports

This commit is contained in:
Prad Nukala 2025-01-06 15:08:52 -05:00
parent 957f923c6e
commit 2bad49a2d8
2 changed files with 8 additions and 8 deletions

View File

@ -1,6 +1,6 @@
package views package hero
templ HeroTitle(title string, subtitle string) { templ Title(title string, subtitle string) {
<div class="flex flex-col items-center justify-center h-full w-full gap-2.5"> <div class="flex flex-col items-center justify-center h-full w-full gap-2.5">
<h1 class="text-2xl md:text-3xl lg:text-4xl font-bold"> <h1 class="text-2xl md:text-3xl lg:text-4xl font-bold">
{ title } { title }
@ -11,7 +11,7 @@ templ HeroTitle(title string, subtitle string) {
</div> </div>
} }
templ HeroStart() { templ Start() {
<div class="pt-1.5 mb-3 flex flex-col items-center justify-center h-full"> <div class="pt-1.5 mb-3 flex flex-col items-center justify-center h-full">
<sl-button size="large" hx-target="#container" hx-get="/register" hx-push-url="/register/start" type="button"> <sl-button size="large" hx-target="#container" hx-get="/register" hx-push-url="/register/start" type="button">
<sl-icon slot="prefix" library="sonr" name="sonr"></sl-icon> <sl-icon slot="prefix" library="sonr" name="sonr"></sl-icon>
@ -21,7 +21,7 @@ templ HeroStart() {
</div> </div>
} }
templ HeroSocials() { templ Socials() {
<div class="pt-1.5 flex flex-row items-center justify-center h-full gap-3"> <div class="pt-1.5 flex flex-row items-center justify-center h-full gap-3">
<sl-button circle outline href="https://sonr.io"> <sl-button circle outline href="https://sonr.io">
<sl-icon name="home" library="sonr" label="Home"></sl-icon> <sl-icon name="home" library="sonr" label="Home"></sl-icon>

View File

@ -1,14 +1,14 @@
// Code generated by templ - DO NOT EDIT. // Code generated by templ - DO NOT EDIT.
// templ: version: v0.3.819 // templ: version: v0.3.819
package views package hero
//lint:file-ignore SA4006 This context is only used if a nested component is present. //lint:file-ignore SA4006 This context is only used if a nested component is present.
import "github.com/a-h/templ" import "github.com/a-h/templ"
import templruntime "github.com/a-h/templ/runtime" import templruntime "github.com/a-h/templ/runtime"
func HeroTitle(title string, subtitle string) templ.Component { func Title(title string, subtitle string) templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { 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 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
@ -63,7 +63,7 @@ func HeroTitle(title string, subtitle string) templ.Component {
}) })
} }
func HeroStart() templ.Component { func Start() templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { 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 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
@ -92,7 +92,7 @@ func HeroStart() templ.Component {
}) })
} }
func HeroSocials() templ.Component { func Socials() templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { 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 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {