-
-
Notifications
You must be signed in to change notification settings - Fork 355
/
github-deploy-page.go
41 lines (34 loc) · 1015 Bytes
/
github-deploy-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
package main
import (
"github.com/maxence-charriere/go-app/v10/pkg/analytics"
"github.com/maxence-charriere/go-app/v10/pkg/app"
)
type githubDeployPage struct {
app.Compo
}
func newGithubDeployPage() *githubDeployPage {
return &githubDeployPage{}
}
func (p *githubDeployPage) OnNav(ctx app.Context) {
p.initPage(ctx)
}
func (p *githubDeployPage) initPage(ctx app.Context) {
ctx.Page().SetTitle("Deploy a PWA on GitHub Pages")
ctx.Page().SetDescription("Documentation about how to deploy a PWA created with go-app on GitHub Pages.")
analytics.Page("github-deploy", nil)
}
func (p *githubDeployPage) Render() app.UI {
return newPage().
Title("Deploy on GitHub Pages").
Icon(githubSVG).
Index(
newIndexLink().Title("Intro"),
newIndexLink().Title("Generate a Static Website"),
newIndexLink().Title("Deployment"),
newIndexLink().Title(" Domainless Repository"),
app.Div().Class("separator"),
).
Content(
newRemoteMarkdownDoc().Src("/web/documents/github-deploy.md"),
)
}