aboutsummaryrefslogtreecommitdiff
path: root/templates/user.tmpl
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2020-01-31 03:38:49 +0000
committerr <r@freesoftwareextremist.com>2020-01-31 03:38:49 +0000
commita981085260af2623bd4988e4b9c0052e2e3035eb (patch)
tree8b1f2f35274a2e5fee77f2498f0b7569dca18b7e /templates/user.tmpl
parent6a6cc744b7d9ed1b57dc2e88cd22e73275d5dcbe (diff)
downloadbloat-a981085260af2623bd4988e4b9c0052e2e3035eb.tar.gz
bloat-a981085260af2623bd4988e4b9c0052e2e3035eb.zip
Update user page
- Use the same page to display status and user list - Add media only status list
Diffstat (limited to 'templates/user.tmpl')
-rw-r--r--templates/user.tmpl24
1 files changed, 21 insertions, 3 deletions
diff --git a/templates/user.tmpl b/templates/user.tmpl
index e3cb7e8..3042672 100644
--- a/templates/user.tmpl
+++ b/templates/user.tmpl
@@ -40,9 +40,10 @@
{{end}}
</div>
<div>
- {{.User.StatusesCount}} statuses -
- <a href="/following/{{.User.ID}}"> {{.User.FollowingCount}} following </a> -
- <a href="/followers/{{.User.ID}}"> {{.User.FollowersCount}} followers </a>
+ <a href="/user/{{.User.ID}}"> statuses ({{.User.StatusesCount}}) </a> -
+ <a href="/user/{{.User.ID}}/following"> following ({{.User.FollowingCount}}) </a> -
+ <a href="/user/{{.User.ID}}/followers"> followers ({{.User.FollowersCount}}) </a> -
+ <a href="/user/{{.User.ID}}/media"> media </a>
</div>
<div>
<a href="/usersearch/{{.User.ID}}"> search statuses </a>
@@ -54,10 +55,27 @@
</div>
</div>
+{{if eq .Type ""}}
+<div class="page-title"> Statuses </div>
{{range .Statuses}}
{{template "status.tmpl" (WithContext . $.Ctx)}}
{{end}}
+{{else if eq .Type "following"}}
+<div class="page-title"> Following </div>
+{{template "userlist.tmpl" (WithContext .Users $.Ctx)}}
+
+{{else if eq .Type "followers"}}
+<div class="page-title"> Followers </div>
+{{template "userlist.tmpl" (WithContext .Users $.Ctx)}}
+
+{{else if eq .Type "media"}}
+<div class="page-title"> Statuses with media </div>
+{{range .Statuses}}
+{{template "status.tmpl" (WithContext . $.Ctx)}}
+{{end}}
+{{end}}
+
<div class="pagination">
{{if .NextLink}}
<a href="{{.NextLink}}">next</a>