package pages
import (
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"
"fmt"
"github.com/dustin/go-humanize"
)
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 {
}
@components.Modal(nil)
@components.Footer()
}
func tabStyle(path string, tab string) string {
class := "!no-underline"
if path == tab {
class += " font-bold border-b-none"
}
return class
}