aboutsummaryrefslogtreecommitdiff
path: root/renderer
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2019-12-25 16:38:47 +0000
committerr <r@freesoftwareextremist.com>2019-12-25 16:38:47 +0000
commit656ff3931cf86c50a0b54da43cbf5f68344c58e0 (patch)
tree611800a2047eb75b62460f0c8a2ec18b0d9ce61a /renderer
parentbde2c03495c0e032415e8bec484fcbbcb9f4c644 (diff)
downloadbloat-656ff3931cf86c50a0b54da43cbf5f68344c58e0.tar.gz
bloat-656ff3931cf86c50a0b54da43cbf5f68344c58e0.zip
Update header template and add option for custom css
Diffstat (limited to 'renderer')
-rw-r--r--renderer/model.go23
1 files changed, 17 insertions, 6 deletions
diff --git a/renderer/model.go b/renderer/model.go
index dfa46b1..4dfac84 100644
--- a/renderer/model.go
+++ b/renderer/model.go
@@ -5,12 +5,24 @@ import (
"web/model"
)
+type HeaderData struct {
+ Title string
+ NotificationCount int
+ CustomCSS string
+}
+
type NavbarData struct {
User *mastodon.Account
NotificationCount int
}
+type CommonData struct {
+ HeaderData *HeaderData
+ NavbarData *NavbarData
+}
+
type TimelineData struct {
+ *CommonData
Title string
Statuses []*mastodon.Status
HasNext bool
@@ -18,36 +30,35 @@ type TimelineData struct {
HasPrev bool
PrevLink string
PostContext model.PostContext
- NavbarData *NavbarData
}
type ThreadData struct {
+ *CommonData
Statuses []*mastodon.Status
PostContext model.PostContext
ReplyMap map[string][]mastodon.ReplyInfo
- NavbarData *NavbarData
}
type NotificationData struct {
+ *CommonData
Notifications []*mastodon.Notification
HasNext bool
NextLink string
- NavbarData *NavbarData
}
type UserData struct {
+ *CommonData
User *mastodon.Account
Statuses []*mastodon.Status
HasNext bool
NextLink string
- NavbarData *NavbarData
}
type AboutData struct {
- NavbarData *NavbarData
+ *CommonData
}
type EmojiData struct {
Emojis []*mastodon.Emoji
- NavbarData *NavbarData
+ CommonData *CommonData
}