blob: 37b797fa72c0770bfac93b503588285d4b89f903 (
plain)
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
|
package html
import (
"time"
. "github.com/maragudk/gomponents"
. "github.com/maragudk/gomponents/html"
)
func AboutPage() Node {
now := time.Now()
return page("About",
H1(Text("About")),
P(Textf("Built with gomponents and rendered at %v.", now.Format(time.TimeOnly))),
P(
If(now.Second()%2 == 0, Text("It's an even second!")),
If(now.Second()%2 != 0, Text("It's an odd second!")),
),
Img(Class("max-w-sm"), Src("https://www.gomponents.com/images/logo.png"), Alt("gomponents logo")),
)
}
|