Add following and followers page

This commit is contained in:
r 2019-12-29 03:43:57 +00:00
parent b9d7eb05be
commit 72dbe50341
9 changed files with 195 additions and 2 deletions

12
templates/followers.tmpl Normal file
View file

@ -0,0 +1,12 @@
{{template "header.tmpl" .HeaderData}}
{{template "navigation.tmpl" .NavbarData}}
<div class="page-title"> Followers </div>
{{template "userlist.tmpl" .Users}}
<div class="pagination">
{{if .HasNext}}
<a href="{{.NextLink}}">next</a>
{{end}}
</div>
{{template "footer.tmpl"}}

12
templates/following.tmpl Normal file
View file

@ -0,0 +1,12 @@
{{template "header.tmpl" .HeaderData}}
{{template "navigation.tmpl" .NavbarData}}
<div class="page-title"> Following </div>
{{template "userlist.tmpl" .Users}}
<div class="pagination">
{{if .HasNext}}
<a href="{{.NextLink}}">next</a>
{{end}}
</div>
{{template "footer.tmpl"}}

View file

@ -36,7 +36,9 @@
{{end}}
</div>
<div>
{{.User.StatusesCount}} statuses - {{.User.FollowingCount}} following - {{.User.FollowersCount}} followers
{{.User.StatusesCount}} statuses -
<a href="/following/{{.User.ID}}"> {{.User.FollowingCount}} following </a> -
<a href="/followers/{{.User.ID}}"> {{.User.FollowersCount}} followers </a>
</div>
</div>
<div class="user-profile-decription">