diff options
Diffstat (limited to 'renderer')
-rw-r--r-- | renderer/model.go | 8 | ||||
-rw-r--r-- | renderer/renderer.go | 6 |
2 files changed, 14 insertions, 0 deletions
diff --git a/renderer/model.go b/renderer/model.go index 8df64ab..77e6704 100644 --- a/renderer/model.go +++ b/renderer/model.go @@ -74,6 +74,14 @@ type UserData struct { DarkMode bool } +type UserSearchData struct { + *CommonData + User *mastodon.Account + Q string + Statuses []*mastodon.Status + NextLink string +} + type AboutData struct { *CommonData } diff --git a/renderer/renderer.go b/renderer/renderer.go index 2ad5ddf..cbb6c73 100644 --- a/renderer/renderer.go +++ b/renderer/renderer.go @@ -23,6 +23,7 @@ type Renderer interface { RenderThreadPage(ctx *Context, writer io.Writer, data *ThreadData) (err error) RenderNotificationPage(ctx *Context, writer io.Writer, data *NotificationData) (err error) RenderUserPage(ctx *Context, writer io.Writer, data *UserData) (err error) + RenderUserSearchPage(ctx *Context, writer io.Writer, data *UserSearchData) (err error) RenderAboutPage(ctx *Context, writer io.Writer, data *AboutData) (err error) RenderEmojiPage(ctx *Context, writer io.Writer, data *EmojiData) (err error) RenderLikedByPage(ctx *Context, writer io.Writer, data *LikedByData) (err error) @@ -87,6 +88,11 @@ func (r *renderer) RenderUserPage(ctx *Context, writer io.Writer, return r.template.ExecuteTemplate(writer, "user.tmpl", WithContext(data, ctx)) } +func (r *renderer) RenderUserSearchPage(ctx *Context, writer io.Writer, + data *UserSearchData) (err error) { + return r.template.ExecuteTemplate(writer, "usersearch.tmpl", WithContext(data, ctx)) +} + func (r *renderer) RenderAboutPage(ctx *Context, writer io.Writer, data *AboutData) (err error) { return r.template.ExecuteTemplate(writer, "about.tmpl", WithContext(data, ctx)) |