proper-website-2/src/navbar.go

29 lines
504 B
Go
Raw Normal View History

2022-03-15 12:48:47 +01:00
package main
2022-03-01 17:07:33 +01:00
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("/galaxies").Text("Galaxies"),
2022-03-07 13:05:33 +01:00
),
2022-03-24 13:25:07 +01:00
app.Li().Body(
app.A().Href("/blog").Text("Blog"),
),
2022-03-01 17:07:33 +01:00
),
).Class("navbar")
}