-
-
Notifications
You must be signed in to change notification settings - Fork 357
/
architecture-page.go
46 lines (38 loc) · 1.13 KB
/
architecture-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
package main
import (
"github.com/maxence-charriere/go-app/v10/pkg/analytics"
"github.com/maxence-charriere/go-app/v10/pkg/app"
)
type architecturePage struct {
app.Compo
}
func newArchitecturePage() *architecturePage {
return &architecturePage{}
}
func (p *architecturePage) OnNav(ctx app.Context) {
p.initPage(ctx)
}
func (p *architecturePage) initPage(ctx app.Context) {
ctx.Page().SetTitle("Understanding go-app Architecture")
ctx.Page().SetDescription("Documentation about how go-app parts are working together to form a Progressive Web App (PWA).")
analytics.Page("architecture", nil)
}
func (p *architecturePage) Render() app.UI {
return newPage().
Title("Architecture").
Icon(fileTreeSVG).
Index(
newIndexLink().Title("Overview"),
newIndexLink().Title("Web Browser"),
newIndexLink().Title("Server"),
newIndexLink().Title("HTML Pages"),
newIndexLink().Title("Package Resources"),
newIndexLink().Title("app.wasm"),
newIndexLink().Title("Static Resources"),
app.Div().Class("separator"),
newIndexLink().Title("Next"),
).
Content(
newRemoteMarkdownDoc().Src("/web/documents/architecture.md"),
)
}