package pages import ( "fmt" c "git.ekzyis.com/ekzyis/delphi.market/server/router/context" "git.ekzyis.com/ekzyis/delphi.market/server/router/pages/components" "git.ekzyis.com/ekzyis/delphi.market/types" "github.com/dustin/go-humanize" "time" ) templ Index(markets []types.Market) { @components.Head() @components.Nav()
@components.Figlet("random", "delphi")
A prediction market using the lightning network
if ctx.Value(c.ReqPathContextKey).(string) == "/" {
for _, m := range markets { { m.Question }
{ m.User.Name } / { humanize.Time(m.CreatedAt) } / { humanize.Time(m.EndDate) }
51%
0
}
} else {
optional
}
@components.Modal(nil) @components.Footer() } func minDate() string { return time.Now().Add(24 * time.Hour).Format("2006-01-02") } func tabStyle(path string, tab string) string { class := "!no-underline" if path == tab { class += " font-bold border-b-none" } return class }