aboutsummaryrefslogtreecommitdiff
path: root/renderer
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2020-01-30 15:32:37 +0000
committerr <r@freesoftwareextremist.com>2020-01-30 15:37:07 +0000
commit17e55d2a9bc7d0f5ed922370b8ac3ad4db9f583b (patch)
tree37f94e17e31d7485d16b6d9922023ffb182a5e6d /renderer
parent84cd3bc4368afdfe41320b1388fd9a14bf90fce9 (diff)
downloadbloat-17e55d2a9bc7d0f5ed922370b8ac3ad4db9f583b.tar.gz
bloat-17e55d2a9bc7d0f5ed922370b8ac3ad4db9f583b.zip
Add user search page
Diffstat (limited to 'renderer')
-rw-r--r--renderer/model.go8
-rw-r--r--renderer/renderer.go6
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))