aboutsummaryrefslogtreecommitdiff
path: root/renderer
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2020-01-30 13:56:29 +0000
committerr <r@freesoftwareextremist.com>2020-01-30 13:56:29 +0000
commit84cd3bc4368afdfe41320b1388fd9a14bf90fce9 (patch)
tree1da5f94708d1cb6e33f276459c2da78dd9ec1f77 /renderer
parentf93fe3276607039a5d09fa83b17c8f353b19ce86 (diff)
downloadbloat-84cd3bc4368afdfe41320b1388fd9a14bf90fce9.tar.gz
bloat-84cd3bc4368afdfe41320b1388fd9a14bf90fce9.zip
Remove icons
Diffstat (limited to 'renderer')
-rw-r--r--renderer/renderer.go42
1 files changed, 0 insertions, 42 deletions
diff --git a/renderer/renderer.go b/renderer/renderer.go
index 2d227c4..2ad5ddf 100644
--- a/renderer/renderer.go
+++ b/renderer/renderer.go
@@ -11,39 +11,6 @@ import (
"mastodon"
)
-var (
- icons = map[string]string{
- "envelope": "/static/icons/envelope.png",
- "dark-envelope": "/static/icons/dark-envelope.png",
- "globe": "/static/icons/globe.png",
- "dark-globe": "/static/icons/dark-globe.png",
- "liked": "/static/icons/liked.png",
- "dark-liked": "/static/icons/liked.png",
- "link": "/static/icons/link.png",
- "dark-link": "/static/icons/dark-link.png",
- "lock": "/static/icons/lock.png",
- "dark-lock": "/static/icons/dark-lock.png",
- "mail-forward": "/static/icons/mail-forward.png",
- "dark-mail-forward": "/static/icons/dark-mail-forward.png",
- "reply": "/static/icons/reply.png",
- "dark-reply": "/static/icons/dark-reply.png",
- "retweet": "/static/icons/retweet.png",
- "dark-retweet": "/static/icons/dark-retweet.png",
- "retweeted": "/static/icons/retweeted.png",
- "dark-retweeted": "/static/icons/retweeted.png",
- "smile-o": "/static/icons/smile-o.png",
- "dark-smile-o": "/static/icons/dark-smile-o.png",
- "star-o": "/static/icons/star-o.png",
- "dark-star-o": "/static/icons/dark-star-o.png",
- "star": "/static/icons/star.png",
- "dark-star": "/static/icons/dark-star.png",
- "unlock-alt": "/static/icons/unlock-alt.png",
- "dark-unlock-alt": "/static/icons/dark-unlock-alt.png",
- "user-plus": "/static/icons/user-plus.png",
- "dark-user-plus": "/static/icons/dark-user-plus.png",
- }
-)
-
type TemplateData struct {
Data interface{}
Ctx *Context
@@ -79,7 +46,6 @@ func NewRenderer(templateGlobPattern string) (r *renderer, err error) {
"TimeSince": TimeSince,
"FormatTimeRFC3339": FormatTimeRFC3339,
"FormatTimeRFC822": FormatTimeRFC822,
- "GetIcon": GetIcon,
"WithContext": WithContext,
}).ParseGlob(templateGlobPattern)
if err != nil {
@@ -232,14 +198,6 @@ func FormatTimeRFC822(t time.Time) string {
return t.Format(time.RFC822)
}
-func GetIcon(name string, darkMode bool) (icon string) {
- if darkMode {
- name = "dark-" + name
- }
- icon, _ = icons[name]
- return
-}
-
func WithContext(data interface{}, ctx *Context) TemplateData {
return TemplateData{data, ctx}
}