Fix link padding
This commit is contained in:
parent
fe8c55815d
commit
6dde9f859c
|
@ -79,7 +79,7 @@
|
|||
button[hx-get],
|
||||
button[hx-post],
|
||||
button[type="submit"] {
|
||||
padding: 0.25em 0.75em;
|
||||
padding: 0 0.25em;
|
||||
}
|
||||
|
||||
button:disabled {
|
||||
|
|
|
@ -26,14 +26,14 @@ templ Index(markets []types.Market) {
|
|||
hx-push-url="true"
|
||||
>
|
||||
<div class="border border-muted">
|
||||
<button hx-get="/" class={ tabStyle(ctx.Value(c.ReqPathContextKey).(string), "/") }>markets</button>
|
||||
<button hx-get="/create" class={ tabStyle(ctx.Value(c.ReqPathContextKey).(string), "/create") }>create</button>
|
||||
<button hx-get="/" class={ tabStyle(ctx.Value(c.ReqPathContextKey).(string), "/") + " !py-1 !px-3" }>markets</button>
|
||||
<button hx-get="/create" class={ tabStyle(ctx.Value(c.ReqPathContextKey).(string), "/create") + " !py-1 !px-3" }>create</button>
|
||||
</div>
|
||||
if ctx.Value(c.ReqPathContextKey).(string) == "/" {
|
||||
<div class="grid grid-cols-[auto_fit-content(10%)_fit-content(10%)]">
|
||||
for _, m := range markets {
|
||||
<span class="ps-3 border-b border-muted pb-3 mt-3">
|
||||
<a href={ templ.SafeURL(fmt.Sprintf("/market/%d", m.Id)) }>{ m.Question }</a>
|
||||
<a class="px-1" href={ templ.SafeURL(fmt.Sprintf("/market/%d", m.Id)) }>{ m.Question }</a>
|
||||
<div class="text-small text-muted">{ m.User.Name } / { humanize.Time(m.CreatedAt) } / { humanize.Time(m.EndDate) }</div>
|
||||
</span>
|
||||
<span class={ fmt.Sprintf("%s %s", "px-3 border-b border-muted pb-3 mt-3 flex", colorize(m.Pyes)) }><div class="self-center">{ fmt.Sprintf("%.2f%%", m.Pyes * 100) }</div></span>
|
||||
|
|
Loading…
Reference in New Issue