diff options
Diffstat (limited to 'renderer')
-rw-r--r-- | renderer/model.go | 14 | ||||
-rw-r--r-- | renderer/renderer.go | 10 |
2 files changed, 24 insertions, 0 deletions
diff --git a/renderer/model.go b/renderer/model.go index 12fa90f..3d344b4 100644 --- a/renderer/model.go +++ b/renderer/model.go @@ -90,6 +90,20 @@ type RetweetedByData struct { NextLink string } +type FollowingData struct { + *CommonData + Users []*mastodon.Account + HasNext bool + NextLink string +} + +type FollowersData struct { + *CommonData + Users []*mastodon.Account + HasNext bool + NextLink string +} + type SearchData struct { *CommonData Q string diff --git a/renderer/renderer.go b/renderer/renderer.go index a46cfd2..efc412d 100644 --- a/renderer/renderer.go +++ b/renderer/renderer.go @@ -23,6 +23,8 @@ type Renderer interface { RenderEmojiPage(ctx context.Context, writer io.Writer, data *EmojiData) (err error) RenderLikedByPage(ctx context.Context, writer io.Writer, data *LikedByData) (err error) RenderRetweetedByPage(ctx context.Context, writer io.Writer, data *RetweetedByData) (err error) + RenderFollowingPage(ctx context.Context, writer io.Writer, data *FollowingData) (err error) + RenderFollowersPage(ctx context.Context, writer io.Writer, data *FollowersData) (err error) RenderSearchPage(ctx context.Context, writer io.Writer, data *SearchData) (err error) RenderSettingsPage(ctx context.Context, writer io.Writer, data *SettingsData) (err error) } @@ -93,6 +95,14 @@ func (r *renderer) RenderRetweetedByPage(ctx context.Context, writer io.Writer, return r.template.ExecuteTemplate(writer, "retweetedby.tmpl", data) } +func (r *renderer) RenderFollowingPage(ctx context.Context, writer io.Writer, data *FollowingData) (err error) { + return r.template.ExecuteTemplate(writer, "following.tmpl", data) +} + +func (r *renderer) RenderFollowersPage(ctx context.Context, writer io.Writer, data *FollowersData) (err error) { + return r.template.ExecuteTemplate(writer, "followers.tmpl", data) +} + func (r *renderer) RenderSearchPage(ctx context.Context, writer io.Writer, data *SearchData) (err error) { return r.template.ExecuteTemplate(writer, "search.tmpl", data) } |