-
-
Notifications
You must be signed in to change notification settings - Fork 357
/
components-page.go
53 lines (45 loc) · 1.48 KB
/
components-page.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package main
import (
"github.com/maxence-charriere/go-app/v10/pkg/analytics"
"github.com/maxence-charriere/go-app/v10/pkg/app"
)
type componentsPage struct {
app.Compo
}
func newComponentsPage() *componentsPage {
return &componentsPage{}
}
func (p *componentsPage) OnNav(ctx app.Context) {
p.initPage(ctx)
}
func (p *componentsPage) initPage(ctx app.Context) {
ctx.Page().SetTitle("Building Components: Customizable, Independent, and Reusable UI Elements")
ctx.Page().SetDescription("Documentation about building customizable, independent, and reusable UI elements.")
analytics.Page("components", nil)
}
func (p *componentsPage) Render() app.UI {
return newPage().
Title("Components").
Icon(gridSVG).
Index(
newIndexLink().Title("What is a Component?"),
newIndexLink().Title("Create"),
newIndexLink().Title("Customize Look"),
newIndexLink().Title("Fields"),
newIndexLink().Title(" Exported vs Unexported"),
newIndexLink().Title(" How chose between Exported and Unexported?"),
newIndexLink().Title("Lifecycle Events"),
newIndexLink().Title(" PreRender"),
newIndexLink().Title(" Mount"),
newIndexLink().Title(" Nav"),
newIndexLink().Title(" Dismount"),
newIndexLink().Title(" Reference"),
newIndexLink().Title("Updates"),
newIndexLink().Title(" Manually Trigger an Update"),
app.Div().Class("separator"),
newIndexLink().Title("Next"),
).
Content(
newRemoteMarkdownDoc().Src("/web/documents/components.md"),
)
}