2022-03-01 17:07:33 +01:00
|
|
|
package components
|
|
|
|
|
|
|
|
import "github.com/maxence-charriere/go-app/v9/pkg/app"
|
|
|
|
|
|
|
|
type navbar struct {
|
|
|
|
app.Compo
|
|
|
|
|
2022-03-07 13:05:33 +01:00
|
|
|
OnClickButton func(page string)
|
2022-03-01 17:07:33 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func (n *navbar) Render() app.UI {
|
|
|
|
return app.Div().Body(
|
|
|
|
app.Ul().Body(
|
|
|
|
app.Li().Body(
|
|
|
|
app.A().Href("/").Text("Home"),
|
|
|
|
),
|
|
|
|
app.Li().Body(
|
|
|
|
app.A().Href("/about").Text("About"),
|
|
|
|
),
|
2022-03-07 13:05:33 +01:00
|
|
|
app.Li().Body(
|
|
|
|
app.A().Href("/friends").Text("Friends"),
|
|
|
|
),
|
2022-03-01 17:07:33 +01:00
|
|
|
),
|
|
|
|
).Class("navbar")
|
|
|
|
}
|