diff options
author | r <r@freesoftwareextremist.com> | 2019-12-21 05:48:48 +0000 |
---|---|---|
committer | r <r@freesoftwareextremist.com> | 2019-12-21 05:48:48 +0000 |
commit | 2648484a1de4443fdb748edb144c90c4a7a37472 (patch) | |
tree | 1bc612d580501ea57688b845f50c5e7bd908c70d /renderer | |
parent | 889f8da49637e908f203d6d9d195f7d585f8cd03 (diff) | |
download | bloat-2648484a1de4443fdb748edb144c90c4a7a37472.tar.gz bloat-2648484a1de4443fdb748edb144c90c4a7a37472.zip |
Add about page
Diffstat (limited to 'renderer')
-rw-r--r-- | renderer/model.go | 10 | ||||
-rw-r--r-- | renderer/renderer.go | 4 |
2 files changed, 14 insertions, 0 deletions
diff --git a/renderer/model.go b/renderer/model.go index 7e52850..053c2fd 100644 --- a/renderer/model.go +++ b/renderer/model.go @@ -86,3 +86,13 @@ func NewUserPageTemplateData(user *mastodon.Account, statuses []*mastodon.Status NavbarData: navbarData, } } + +type AboutPageTemplateData struct { + NavbarData *NavbarTemplateData +} + +func NewAboutPageTemplateData(navbarData *NavbarTemplateData) *AboutPageTemplateData { + return &AboutPageTemplateData{ + NavbarData: navbarData, + } +} diff --git a/renderer/renderer.go b/renderer/renderer.go index 9bbe06e..c9cae28 100644 --- a/renderer/renderer.go +++ b/renderer/renderer.go @@ -19,6 +19,7 @@ type Renderer interface { RenderThreadPage(ctx context.Context, writer io.Writer, data *ThreadPageTemplateData) (err error) RenderNotificationPage(ctx context.Context, writer io.Writer, data *NotificationPageTemplateData) (err error) RenderUserPage(ctx context.Context, writer io.Writer, data *UserPageTemplateData) (err error) + RenderAboutPage(ctx context.Context, writer io.Writer, data *AboutPageTemplateData) (err error) } type renderer struct { @@ -71,6 +72,9 @@ func (r *renderer) RenderUserPage(ctx context.Context, writer io.Writer, data *U return r.template.ExecuteTemplate(writer, "user.tmpl", data) } +func (r *renderer) RenderAboutPage(ctx context.Context, writer io.Writer, data *AboutPageTemplateData) (err error) { + return r.template.ExecuteTemplate(writer, "about.tmpl", data) +} func EmojiFilter(content string, emojis []mastodon.Emoji) string { var replacements []string |