Skip to content

Commit 6dde9f8

Browse files
author
ekzyis
committed
Fix link padding
1 parent fe8c558 commit 6dde9f8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

public/css/base.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
button[hx-get],
8080
button[hx-post],
8181
button[type="submit"] {
82-
padding: 0.25em 0.75em;
82+
padding: 0 0.25em;
8383
}
8484

8585
button:disabled {

server/router/pages/index.templ

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ templ Index(markets []types.Market) {
2626
hx-push-url="true"
2727
>
2828
<div class="border border-muted">
29-
<button hx-get="/" class={ tabStyle(ctx.Value(c.ReqPathContextKey).(string), "/") }>markets</button>
30-
<button hx-get="/create" class={ tabStyle(ctx.Value(c.ReqPathContextKey).(string), "/create") }>create</button>
29+
<button hx-get="/" class={ tabStyle(ctx.Value(c.ReqPathContextKey).(string), "/") + " !py-1 !px-3" }>markets</button>
30+
<button hx-get="/create" class={ tabStyle(ctx.Value(c.ReqPathContextKey).(string), "/create") + " !py-1 !px-3" }>create</button>
3131
</div>
3232
if ctx.Value(c.ReqPathContextKey).(string) == "/" {
3333
<div class="grid grid-cols-[auto_fit-content(10%)_fit-content(10%)]">
3434
for _, m := range markets {
3535
<span class="ps-3 border-b border-muted pb-3 mt-3">
36-
<a href={ templ.SafeURL(fmt.Sprintf("/market/%d", m.Id)) }>{ m.Question }</a>
36+
<a class="px-1" href={ templ.SafeURL(fmt.Sprintf("/market/%d", m.Id)) }>{ m.Question }</a>
3737
<div class="text-small text-muted">{ m.User.Name } / { humanize.Time(m.CreatedAt) } / { humanize.Time(m.EndDate) }</div>
3838
</span>
3939
<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>

0 commit comments

Comments
 (0)