mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-03 18:01:39 +00:00
feat: add new button components and layout improvements
This commit is contained in:
@@ -2,7 +2,7 @@ package internal
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/onsonr/sonr/pkg/webapp/components/ui"
|
||||
"github.com/onsonr/sonr/pkg/webapp/components/button"
|
||||
models "github.com/onsonr/sonr/pkg/webapp/models"
|
||||
)
|
||||
|
||||
@@ -20,8 +20,8 @@ templ Hero(hero *models.Hero) {
|
||||
{ hero.Subtitle }
|
||||
</p>
|
||||
<div class="max-w-xs mx-auto sm:max-w-none sm:inline-flex sm:justify-center space-y-4 sm:space-y-0 sm:space-x-4">
|
||||
@ui.PrimaryButton("/register", "Get Started")
|
||||
@ui.SecondaryButton("/learn", "Learn More")
|
||||
@button.Primary("/register", "Get Started")
|
||||
@button.Secondary("/learn", "Learn More")
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,7 @@ import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/onsonr/sonr/pkg/webapp/components/ui"
|
||||
"github.com/onsonr/sonr/pkg/webapp/components/button"
|
||||
models "github.com/onsonr/sonr/pkg/webapp/models"
|
||||
)
|
||||
|
||||
@@ -61,11 +61,11 @@ func Hero(hero *models.Hero) templ.Component {
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = ui.PrimaryButton("/register", "Get Started").Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = button.Primary("/register", "Get Started").Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = ui.SecondaryButton("/learn", "Learn More").Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = button.Secondary("/learn", "Learn More").Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
package home
|
||||
|
||||
import (
|
||||
"github.com/onsonr/sonr/pkg/webapp/components/ui"
|
||||
"github.com/onsonr/sonr/pkg/webapp/components/layout"
|
||||
landing "github.com/onsonr/sonr/pkg/webapp/pages/home/internal"
|
||||
)
|
||||
|
||||
// View renders the home page
|
||||
templ Page() {
|
||||
@ui.LayoutNoBody("Sonr.ID", true) {
|
||||
@layout.NoBody("Sonr.ID", true) {
|
||||
@landing.Header(header)
|
||||
@landing.Hero(hero)
|
||||
@landing.Highlights(highlights)
|
||||
|
||||
@@ -10,7 +10,7 @@ import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
import (
|
||||
"github.com/onsonr/sonr/pkg/webapp/components/ui"
|
||||
"github.com/onsonr/sonr/pkg/webapp/components/layout"
|
||||
landing "github.com/onsonr/sonr/pkg/webapp/pages/home/internal"
|
||||
)
|
||||
|
||||
@@ -110,7 +110,7 @@ func Page() templ.Component {
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
templ_7745c5c3_Err = ui.LayoutNoBody("Sonr.ID", true).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = layout.NoBody("Sonr.ID", true).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user