-
Notifications
You must be signed in to change notification settings - Fork 0
/
centeredsection.go
67 lines (64 loc) · 1.66 KB
/
centeredsection.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
59
60
61
62
63
64
65
66
67
package page
import app "github.com/maxence-charriere/go-app/v9/pkg/app"
type CenteredSection struct {
app.Compo
}
func (c *CenteredSection) Render() app.UI {
return app.Div().
Class("pf-c-page").
Body(
app.Header().
Class("pf-c-page__header").
Body(
app.Div().
Class("pf-c-page__header-brand").
Body(
app.Div().
Class("pf-c-page__header-brand-toggle").
Body(
app.Text("toggle"),
),
app.A().
Href("#").
Class("pf-c-page__header-brand-link").
Body(
app.Text("Logo"),
),
),
app.Div().
Class("pf-c-page__header-tools").
Body(
app.Text("header-tools"),
),
),
app.Main().
Class("pf-c-page__main").
TabIndex(-1).
Body(
app.Section().
Class("pf-c-page__main-section pf-m-limit-width pf-m-align-center").
Body(
app.Div().
Class("pf-c-page__main-body").
Body(
app.Div().
Class("pf-c-card").
Body(
app.Div().
Class("pf-c-card__body").
Body(
app.Text("When a width limited page section is wider than the value of"), app.Code().
Body(
app.Text("--pf-c-page--section--m-limit-width--MaxWidth"),
),
app.Text(", the section will be centered in the main section."),
app.Br(),
app.Br(),
app.Text("The content in this example is placed in a card to better illustrate how the section behaves when it is centered. A card is not required to center a page section."),
),
),
),
),
),
)
}