delphi.market/server/router/pages/market.templ

36 lines
1.1 KiB
Plaintext

package pages
import (
"git.ekzyis.com/ekzyis/delphi.market/server/router/pages/components"
"git.ekzyis.com/ekzyis/delphi.market/types"
"github.com/dustin/go-humanize"
)
// TODO: Add countdown? Use or at least show somewhere precise timestamps?
templ Market(m types.Market) {
<html>
@components.Head()
<body class="container">
@components.Nav()
<div id="content" class="flex flex-col">
<small>
@components.Figlet("random", "market")
</small>
<div class="text-center font-bold my-1">{ m.Question }</div>
<div class="text-center text-muted my-1">{humanize.Time(m.EndDate)}</div>
<div class="text-center text-muted my-1"></div>
<blockquote cite="ekzyis" class="p-4 mb-4 border-s-4 border-muted">
{ m.Description }
<div class="text-muted text-right pt-4">― {m.User.Name}, { humanize.Time(m.CreatedAt) }</div>
</blockquote>
<div class="flex justify-center my-1">
<button class="neon success mx-1">BET YES</button>
<button class="neon error mx-1">BET NO</button>
</div>
</div>
@components.Modal(nil)
@components.Footer()
</body>
</html>
}