-
-
Notifications
You must be signed in to change notification settings - Fork 366
/
github-sponsor.go
52 lines (46 loc) · 988 Bytes
/
github-sponsor.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
package main
import (
"github.com/maxence-charriere/go-app/v10/pkg/app"
"github.com/maxence-charriere/go-app/v10/pkg/ui"
)
type githubSponsor struct {
app.Compo
Iclass string
}
func newGithubSponsor() *githubSponsor {
return &githubSponsor{}
}
func (s *githubSponsor) Class(v string) *githubSponsor {
s.Iclass = app.AppendClass(s.Iclass, v)
return s
}
func (s *githubSponsor) Render() app.UI {
return ui.Stack().
Class(s.Iclass).
Center().
Middle().
Content(
app.Aside().
Class("magnify").
Class("text-center").
Body(
app.A().
Class("default").
Href(githubSponsorURL).
Body(
ui.Icon().
Class("center").
Class("icon-top").
Size(72).
Src(githubSVG),
app.Header().
Class("h3").
Class("default").
Text("Support on GitHub"),
app.P().
Class("subtext").
Text("Help with go-app development by sponsoring it on GitHub."),
),
),
)
}