-
-
Notifications
You must be signed in to change notification settings - Fork 357
/
static-resources-page.go
46 lines (38 loc) · 1.21 KB
/
static-resources-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 staticResourcesPage struct {
app.Compo
}
func newStaticResourcePage() *staticResourcesPage {
return &staticResourcesPage{}
}
func (p *staticResourcesPage) OnNav(ctx app.Context) {
p.initPage(ctx)
}
func (p *staticResourcesPage) initPage(ctx app.Context) {
ctx.Page().SetTitle("Images and Static Resources")
ctx.Page().SetDescription("Documentation about how to deal with images and other static resources.")
analytics.Page("static-resources", nil)
}
func (p *staticResourcesPage) Render() app.UI {
return newPage().
Title("Images and Static Resources").
Icon(imgFolderSVG).
Index(
newIndexLink().Title("Intro"),
newIndexLink().Title("Access static resources"),
newIndexLink().Title(" In Handler"),
newIndexLink().Title(" In components"),
newIndexLink().Title("Setup Custom Web directory"),
newIndexLink().Title(" Setup local web directory"),
newIndexLink().Title(" Setup remote web directory"),
app.Div().Class("separator"),
newIndexLink().Title("Next"),
).
Content(
newRemoteMarkdownDoc().Src("/web/documents/static-resources.md"),
)
}