aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/followers.tmpl14
-rw-r--r--templates/following.tmpl14
-rw-r--r--templates/user.tmpl24
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>