2024-10-25 15:33:48 +00:00
|
|
|
package pages
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"fmt"
|
|
|
|
|
"github.com/maddalax/htmgo/framework/h"
|
2024-10-30 18:27:42 +00:00
|
|
|
"htmgo-site/pages/base"
|
2024-10-25 15:33:48 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func TestFormatPage(ctx *h.RequestContext) *h.Page {
|
2024-10-30 18:27:42 +00:00
|
|
|
return base.RootPage(
|
2024-10-28 15:32:50 +00:00
|
|
|
ctx,
|
|
|
|
|
h.Div(
|
|
|
|
|
h.P(
|
|
|
|
|
h.Class("hello"),
|
|
|
|
|
h.Details(
|
|
|
|
|
h.Summary(
|
|
|
|
|
h.Text("Summary"),
|
2024-10-25 15:33:48 +00:00
|
|
|
),
|
2024-10-28 15:32:50 +00:00
|
|
|
h.Text("Details"),
|
2024-10-25 15:33:48 +00:00
|
|
|
),
|
2024-10-28 15:32:50 +00:00
|
|
|
h.Id("hi"),
|
2024-10-25 15:33:48 +00:00
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func notPage() int {
|
|
|
|
|
test := 1
|
|
|
|
|
fmt.Printf("test: %d\n", test)
|
|
|
|
|
return test
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestOtherPage(ctx *h.RequestContext) *h.Page {
|
2024-10-30 18:27:42 +00:00
|
|
|
return base.RootPage(
|
2024-10-28 15:32:50 +00:00
|
|
|
ctx,
|
|
|
|
|
h.Div(
|
|
|
|
|
h.Id("test"),
|
|
|
|
|
h.Details(
|
|
|
|
|
h.Summary(
|
|
|
|
|
h.Text("Summary"),
|
2024-10-25 15:33:48 +00:00
|
|
|
),
|
2024-10-28 15:32:50 +00:00
|
|
|
h.Text("Details"),
|
|
|
|
|
),
|
|
|
|
|
h.Class("flex flex-col gap-2 bg-white h-full"),
|
|
|
|
|
h.Id("test"),
|
|
|
|
|
h.Details(
|
|
|
|
|
h.Summary(
|
|
|
|
|
h.Text("Summary"),
|
2024-10-25 15:33:48 +00:00
|
|
|
),
|
2024-10-28 15:32:50 +00:00
|
|
|
h.Text("Details"),
|
2024-10-25 15:33:48 +00:00
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
}
|