From 6418307c64da236a0268f4496f793d982e128ad0 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Wed, 13 Jul 2022 09:57:47 +0200 Subject: [feature] Add back/next buttons to profiles for paging through statuses (#708) * add GetAccountWebStatuses to db * add WebStatusesGet func to processor * don't add limit to next/prev links if 0 * take query params for next/prev statuses * add separate next + prev links for convenience * show 'nothing here' message if no statuses exist * add back / next links to profiles * allow paging down only * go fmt ./... * 'recent public toots' -> 'latest public toots' --- web/template/profile.tmpl | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'web/template') diff --git a/web/template/profile.tmpl b/web/template/profile.tmpl index d65b45d51..458f68f52 100644 --- a/web/template/profile.tmpl +++ b/web/template/profile.tmpl @@ -27,13 +27,25 @@
Posted {{.account.StatusesCount}}
-

Recent public toots

-
- {{range .statuses}} -
- {{ template "status.tmpl" .}} -
- {{end}} -
+

Latest public toots

+ {{ if not .statuses }} +
Nothing here!
+ {{ else }} +
+ {{ range .statuses }} +
+ {{ template "status.tmpl" .}} +
+ {{ end }} +
+ {{ end }} + {{ template "footer.tmpl" .}} -- cgit v1.3