diff options
author | r <r@freesoftwareextremist.com> | 2020-01-31 03:38:49 +0000 |
---|---|---|
committer | r <r@freesoftwareextremist.com> | 2020-01-31 03:38:49 +0000 |
commit | a981085260af2623bd4988e4b9c0052e2e3035eb (patch) | |
tree | 8b1f2f35274a2e5fee77f2498f0b7569dca18b7e /templates | |
parent | 6a6cc744b7d9ed1b57dc2e88cd22e73275d5dcbe (diff) | |
download | bloat-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')
-rw-r--r-- | templates/followers.tmpl | 14 | ||||
-rw-r--r-- | templates/following.tmpl | 14 | ||||
-rw-r--r-- | templates/user.tmpl | 24 |
3 files changed, 21 insertions, 31 deletions
diff --git a/templates/followers.tmpl b/templates/followers.tmpl deleted file mode 100644 index 44a303b..0000000 --- a/templates/followers.tmpl +++ /dev/null @@ -1,14 +0,0 @@ -{{with .Data}} -{{template "header.tmpl" (WithContext .HeaderData $.Ctx)}} -{{template "navigation.tmpl" (WithContext .NavbarData $.Ctx)}} -<div class="page-title"> Followers </div> - -{{template "userlist.tmpl" (WithContext .Users $.Ctx)}} -<div class="pagination"> - {{if .NextLink}} - <a href="{{.NextLink}}">next</a> - {{end}} -</div> - -{{template "footer.tmpl"}} -{{end}} diff --git a/templates/following.tmpl b/templates/following.tmpl deleted file mode 100644 index 50413d5..0000000 --- a/templates/following.tmpl +++ /dev/null @@ -1,14 +0,0 @@ -{{with .Data}} -{{template "header.tmpl" (WithContext .HeaderData $.Ctx)}} -{{template "navigation.tmpl" (WithContext .NavbarData $.Ctx)}} -<div class="page-title"> Following </div> - -{{template "userlist.tmpl" (WithContext .Users $.Ctx)}} -<div class="pagination"> - {{if .NextLink}} - <a href="{{.NextLink}}">next</a> - {{end}} -</div> - -{{template "footer.tmpl"}} -{{end}} 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> |