proper-website-2/components/homepage.go

30 lines
442 B
Go
Raw Normal View History

2022-03-01 15:50:53 +01:00
package components
import (
"github.com/maxence-charriere/go-app/v9/pkg/app"
)
type Homepage struct {
app.Compo
2022-03-01 17:07:33 +01:00
content *contentView
2022-03-01 15:50:53 +01:00
}
func NewHomepage() *Homepage {
2022-03-01 17:07:33 +01:00
p1 := newHomePanel()
c := newContentView(p1)
return &Homepage{content: c}
2022-03-01 15:50:53 +01:00
}
func (p *Homepage) Render() app.UI {
return app.Div().Body(
&header{},
app.Div().Body(
2022-03-01 17:07:33 +01:00
newNavbar(),
newHomePanel(),
newHomePanel(),
newHomePanel(),
2022-03-01 15:50:53 +01:00
).Class("main"),
)
}