-
-
Notifications
You must be signed in to change notification settings - Fork 357
/
getting-started-page.go
50 lines (42 loc) · 1.35 KB
/
getting-started-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
package main
import (
"github.com/maxence-charriere/go-app/v10/pkg/analytics"
"github.com/maxence-charriere/go-app/v10/pkg/app"
)
type gettingStartedPage struct {
app.Compo
}
func newGettingStartedPage() *gettingStartedPage {
return &gettingStartedPage{}
}
func (p *gettingStartedPage) OnNav(ctx app.Context) {
p.initPage(ctx)
}
func (p *gettingStartedPage) initPage(ctx app.Context) {
ctx.Page().SetTitle("Start building a PWA with Go and WASM")
ctx.Page().SetDescription("Documentation that shows how to start building a Progressive Web App (PWA) with Go (Golang) and WebAssembly (WASM).")
analytics.Page("getting-started", nil)
}
func (p *gettingStartedPage) Render() app.UI {
return newPage().
Title("Getting Started").
Icon(rocketSVG).
Index(
newIndexLink().Title("Intro"),
newIndexLink().Title("Prerequisite"),
newIndexLink().Title("Install"),
newIndexLink().Title("Code"),
newIndexLink().Title(" Hello component"),
newIndexLink().Title(" Main"),
newIndexLink().Title("Build and Run"),
newIndexLink().Title(" Build the Client"),
newIndexLink().Title(" Build the Server"),
newIndexLink().Title(" Run the App"),
newIndexLink().Title(" Use a Makefile"),
app.Div().Class("separator"),
newIndexLink().Title("Next"),
).
Content(
newRemoteMarkdownDoc().Src("/web/documents/getting-started.md"),
)
}