From 55987a4c1bd7364eba7438e7326a76a9a550b668 Mon Sep 17 00:00:00 2001 From: r Date: Tue, 14 Jan 2020 16:57:16 +0000 Subject: Refactor renderer and templates --- templates/status.tmpl | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) (limited to 'templates/status.tmpl') diff --git a/templates/status.tmpl b/templates/status.tmpl index 91d666d..09c1354 100644 --- a/templates/status.tmpl +++ b/templates/status.tmpl @@ -1,3 +1,4 @@ +{{with .Data}}
{{if .Reblog}}
@@ -5,12 +6,13 @@ avatar {{EmojiFilter .Account.DisplayName .Account.Emojis}} - retweeted + retweeted retweeted
- {{template "status" .Reblog}} + {{template "status" (WithContext .Reblog $.Ctx)}} {{else}} - {{block "status" .}} + {{block "status" (WithContext . $.Ctx)}} + {{with $s := .Data}}
{{if not .HideAccountInfo}} {{end}} @@ -46,7 +48,7 @@ {{if .InReplyToID}} {{if index .ReplyMap .ID}} - {{end}} @@ -66,7 +68,7 @@ {{if eq .Type "image"}} status-image - {{if (and $.MaskNSFW $.Sensitive)}} + {{if (and $.Ctx.MaskNSFW $s.Sensitive)}}
{{end}}
@@ -81,7 +83,7 @@

Your browser doesn't support HTML5 video

- {{if (and $.MaskNSFW $.Sensitive)}} + {{if (and $.Ctx.MaskNSFW $s.Sensitive)}}
{{end}}
@@ -93,27 +95,27 @@
{{if or (eq .Visibility "private") (eq .Visibility "direct")}} - retweet + retweet {{else}} {{if .Reblogged}}
- +
{{else}}
- +
{{end}} {{end}} @@ -125,12 +127,12 @@ {{if .Favourited}}
- +
{{else}}
- +
{{end}} @@ -138,7 +140,7 @@
@@ -147,4 +149,6 @@
{{end}} {{end}} + {{end}}
+{{end}} -- cgit v1.2.3