aboutsummaryrefslogtreecommitdiff
path: root/renderer
diff options
context:
space:
mode:
Diffstat (limited to 'renderer')
-rw-r--r--renderer/model.go10
-rw-r--r--renderer/renderer.go4
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