xgoprev/tests/html.xgo

27 lines
364 B
Text
Raw Normal View History

2024-06-07 19:26:51 +03:00
fmt := import("fmt")
html := import("html").new_render()
2024-06-09 19:42:20 +03:00
added := html.ul()
for i in [1, 2, 3, 4, 5] {
added.add(html.li().body(i))
}
2024-06-07 19:26:51 +03:00
fmt.println(
html.html({
lang: "en"
}).body(
2024-06-09 19:42:20 +03:00
html.head().body(
html.link({
rel: "stylesheet",
href: "/web/main.css"
}).final()
),
2024-06-07 19:26:51 +03:00
html.body().body(
html.p().body(
">>>shit"
)
2024-06-09 19:42:20 +03:00
),
added
2024-06-07 19:26:51 +03:00
)
)