2024-09-19 23:13:04 +00:00
|
|
|
package partials
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/maddalax/htmgo/framework/h"
|
2024-09-24 17:39:16 +00:00
|
|
|
"time"
|
2024-09-19 23:13:04 +00:00
|
|
|
)
|
|
|
|
|
|
2024-09-24 17:39:16 +00:00
|
|
|
func CurrentTimePartial(ctx *h.RequestContext) *h.Partial {
|
|
|
|
|
now := time.Now()
|
|
|
|
|
return h.NewPartial(
|
|
|
|
|
h.Div(
|
|
|
|
|
h.Pf("The current time is %s", now.Format(time.RFC3339)),
|
|
|
|
|
),
|
|
|
|
|
)
|
2024-09-19 23:13:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewPartial(ctx *h.RequestContext) *h.Partial {
|
|
|
|
|
return h.NewPartial(h.Div(h.P(h.Text("This sadsl."))))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewPartial2(ctx *h.RequestContext) *h.Partial {
|
|
|
|
|
return h.NewPartial(h.Div(h.P(h.Text("This sasdsadasdwl."))))
|
|
|
|
|
}
|