-
-
Notifications
You must be signed in to change notification settings - Fork 357
/
declarative-syntax-page.go
58 lines (50 loc) · 1.67 KB
/
declarative-syntax-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
54
55
56
57
58
package main
import (
"github.com/maxence-charriere/go-app/v10/pkg/analytics"
"github.com/maxence-charriere/go-app/v10/pkg/app"
)
type declarativeSyntaxPage struct {
app.Compo
}
func newDeclarativeSyntaxPage() *declarativeSyntaxPage {
return &declarativeSyntaxPage{}
}
func (p *declarativeSyntaxPage) OnNav(ctx app.Context) {
p.initPage(ctx)
}
func (p *declarativeSyntaxPage) initPage(ctx app.Context) {
ctx.Page().SetTitle("Customize Components with go-app Declarative Syntax")
ctx.Page().SetDescription("Documentation about how to customize components with go-app declarative syntax.")
analytics.Page("declarative-syntax", nil)
}
func (p *declarativeSyntaxPage) Render() app.UI {
return newPage().
Title("Declarative Syntax").
Icon(keyboardSVG).
Index(
newIndexLink().Title("Intro"),
newIndexLink().Title("HTML Elements"),
newIndexLink().Title(" Create"),
newIndexLink().Title(" Standard Elements"),
newIndexLink().Title(" Self Closing Elements"),
newIndexLink().Title(" Attributes"),
newIndexLink().Title(" Style"),
newIndexLink().Title(" Event handlers"),
newIndexLink().Title("Raw elements"),
newIndexLink().Title("Nested Components"),
newIndexLink().Title("Condition"),
newIndexLink().Title(" If"),
newIndexLink().Title(" ElseIf"),
newIndexLink().Title(" Else"),
newIndexLink().Title("Range"),
newIndexLink().Title(" Slice"),
newIndexLink().Title(" Map"),
newIndexLink().Title("Form helpers"),
newIndexLink().Title(" ValueTo"),
app.Div().Class("separator"),
newIndexLink().Title("Next"),
).
Content(
newRemoteMarkdownDoc().Src("/web/documents/declarative-syntax.md"),
)
}