diff --git a/internal/http/web_handlers.go b/internal/http/web_handlers.go index 1ad7cdd..e190ac2 100644 --- a/internal/http/web_handlers.go +++ b/internal/http/web_handlers.go @@ -140,7 +140,7 @@ func (h *Handlers) Guestbook(w http.ResponseWriter, r *http.Request) { dwc := dwcaptcha.NewDwellingCaptcha(h.captchaExpire) _, id := inmemdb.New(r.RemoteAddr, dwc) - web.Guestbook(string(id), h.owner, entries, pageCount, r).Render(context.Background(), w) + web.Guestbook(string(id), h.owner, entries, pageCount, page, r).Render(context.Background(), w) } func (h *Handlers) GuestbookAdmin(w http.ResponseWriter, r *http.Request) { diff --git a/web/assets/css/guestbook.css b/web/assets/css/guestbook.css index 6503a67..fe00309 100755 --- a/web/assets/css/guestbook.css +++ b/web/assets/css/guestbook.css @@ -81,7 +81,7 @@ article div.reply > * { margin-left: .5rem; } article p.quote { font-style: italic; } -#pagination a:not(:first-child) { margin-left: .5rem; } +#pagination :not(:first-child) { margin-left: .5rem; } @media screen and (max-width: 641px) { form { diff --git a/web/guestbook.templ b/web/guestbook.templ index c9f346b..48f40c7 100644 --- a/web/guestbook.templ +++ b/web/guestbook.templ @@ -10,7 +10,7 @@ import "git.arav.su/Arav/justguestbook" import "git.arav.su/Arav/dwelling-home/pkg/util" -templ Guestbook(captchaID, owner string, entries []*justguestbook.Entry, pageCount int64, r *http.Request) { +templ Guestbook(captchaID, owner string, entries []*justguestbook.Entry, pageCount, pageCur int64, r *http.Request) { @base("Guestbook", "This is my guestbook. Welcome.", "guestbook, personal", "/guestbook", guestbookHead()) {
@@ -71,6 +71,10 @@ templ Guestbook(captchaID, owner string, entries []*justguestbook.Entry, pageCou
for n := int64(1); n <= pageCount; n++ { {{ strN := strconv.FormatInt(n, 10) }} + if n == pageCur { +  { strN } + {{ continue }} + }