diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/about.tmpl | 6 | ||||
-rw-r--r-- | templates/emoji.tmpl | 8 | ||||
-rw-r--r-- | templates/error.tmpl | 11 | ||||
-rw-r--r-- | templates/followers.tmpl | 8 | ||||
-rw-r--r-- | templates/following.tmpl | 8 | ||||
-rw-r--r-- | templates/header.tmpl | 6 | ||||
-rw-r--r-- | templates/homepage.tmpl | 4 | ||||
-rw-r--r-- | templates/likedby.tmpl | 8 | ||||
-rw-r--r-- | templates/navigation.tmpl | 2 | ||||
-rw-r--r-- | templates/notification.tmpl | 19 | ||||
-rw-r--r-- | templates/postform.tmpl | 4 | ||||
-rw-r--r-- | templates/retweetedby.tmpl | 8 | ||||
-rw-r--r-- | templates/search.tmpl | 11 | ||||
-rw-r--r-- | templates/settings.tmpl | 6 | ||||
-rw-r--r-- | templates/signin.tmpl | 4 | ||||
-rw-r--r-- | templates/status.tmpl | 42 | ||||
-rw-r--r-- | templates/thread.tmpl | 12 | ||||
-rw-r--r-- | templates/timeline.tmpl | 12 | ||||
-rw-r--r-- | templates/user.tmpl | 11 | ||||
-rw-r--r-- | templates/userlist.tmpl | 2 |
20 files changed, 114 insertions, 78 deletions
diff --git a/templates/about.tmpl b/templates/about.tmpl index 60bb5f6..b3c9a49 100644 --- a/templates/about.tmpl +++ b/templates/about.tmpl @@ -1,5 +1,6 @@ -{{template "header.tmpl" .HeaderData}} -{{template "navigation.tmpl" .NavbarData}} +{{with .Data}} +{{template "header.tmpl" (WithContext .HeaderData $.Ctx)}} +{{template "navigation.tmpl" (WithContext .NavbarData $.Ctx)}} <div class="page-title"> About </div> <div> @@ -15,4 +16,5 @@ </div> {{template "footer.tmpl"}} +{{end}} diff --git a/templates/emoji.tmpl b/templates/emoji.tmpl index aba4726..2066afa 100644 --- a/templates/emoji.tmpl +++ b/templates/emoji.tmpl @@ -1,5 +1,6 @@ -{{template "header.tmpl" .HeaderData}} -{{template "navigation.tmpl" .NavbarData}} +{{with .Data}} +{{template "header.tmpl" (WithContext .HeaderData $.Ctx)}} +{{template "navigation.tmpl" (WithContext .NavbarData $.Ctx)}} <div class="page-title"> Emojis </div> <div class="emoji-list-container"> @@ -12,5 +13,4 @@ </div> {{template "footer.tmpl"}} - - +{{end}} diff --git a/templates/error.tmpl b/templates/error.tmpl index 2049665..0d6115a 100644 --- a/templates/error.tmpl +++ b/templates/error.tmpl @@ -1,9 +1,12 @@ -{{template "header.tmpl" .HeaderData}} +{{with .Data}} +{{template "header.tmpl" (WithContext .HeaderData $.Ctx)}} <div class="page-title"> Error </div> + <div class="error-text"> {{.Error}} </div> <div> -<a href="/timeline/home">Home</a> -<a href="/signin">Sign In</a> + <a href="/timeline/home">Home</a> + <a href="/signin">Sign In</a> </div> -{{template "footer.tmpl"}} +{{template "footer.tmpl"}} +{{end}} diff --git a/templates/followers.tmpl b/templates/followers.tmpl index 1c4e9eb..8102b26 100644 --- a/templates/followers.tmpl +++ b/templates/followers.tmpl @@ -1,8 +1,9 @@ -{{template "header.tmpl" .HeaderData}} -{{template "navigation.tmpl" .NavbarData}} +{{with .Data}} +{{template "header.tmpl" (WithContext .HeaderData $.Ctx)}} +{{template "navigation.tmpl" (WithContext .NavbarData $.Ctx)}} <div class="page-title"> Followers </div> -{{template "userlist.tmpl" .Users}} +{{template "userlist.tmpl" (WithContext .Users $.Ctx)}} <div class="pagination"> {{if .HasNext}} <a href="{{.NextLink}}">next</a> @@ -10,3 +11,4 @@ </div> {{template "footer.tmpl"}} +{{end}} diff --git a/templates/following.tmpl b/templates/following.tmpl index b1d8499..43a60dc 100644 --- a/templates/following.tmpl +++ b/templates/following.tmpl @@ -1,8 +1,9 @@ -{{template "header.tmpl" .HeaderData}} -{{template "navigation.tmpl" .NavbarData}} +{{with .Data}} +{{template "header.tmpl" (WithContext .HeaderData $.Ctx)}} +{{template "navigation.tmpl" (WithContext .NavbarData $.Ctx)}} <div class="page-title"> Following </div> -{{template "userlist.tmpl" .Users}} +{{template "userlist.tmpl" (WithContext .Users $.Ctx)}} <div class="pagination"> {{if .HasNext}} <a href="{{.NextLink}}">next</a> @@ -10,3 +11,4 @@ </div> {{template "footer.tmpl"}} +{{end}} diff --git a/templates/header.tmpl b/templates/header.tmpl index 10afe8a..571008a 100644 --- a/templates/header.tmpl +++ b/templates/header.tmpl @@ -1,3 +1,4 @@ +{{with .Data}} <!DOCTYPE html> <html lang="en"> <head> @@ -8,8 +9,9 @@ {{if .CustomCSS}} <link rel="stylesheet" href="{{.CustomCSS}}"> {{end}} - {{if .FluorideMode}} + {{if $.Ctx.FluorideMode}} <script src="/static/fluoride.js"></script> {{end}} </head> -<body {{if .DarkMode}}class="dark"{{end}}> +<body {{if $.Ctx.DarkMode}}class="dark"{{end}}> +{{end}} diff --git a/templates/homepage.tmpl b/templates/homepage.tmpl deleted file mode 100644 index 5e8e8a0..0000000 --- a/templates/homepage.tmpl +++ /dev/null @@ -1,4 +0,0 @@ -{{template "header.tmpl" .HeaderData}} -<div class="page-title"> Home </div> -<a href="/signin"> Signin </a> -{{template "footer.tmpl"}} diff --git a/templates/likedby.tmpl b/templates/likedby.tmpl index 72855e0..00857c1 100644 --- a/templates/likedby.tmpl +++ b/templates/likedby.tmpl @@ -1,7 +1,9 @@ -{{template "header.tmpl" .HeaderData}} -{{template "navigation.tmpl" .NavbarData}} +{{with .Data}} +{{template "header.tmpl" (WithContext .HeaderData $.Ctx)}} +{{template "navigation.tmpl" (WithContext .NavbarData $.Ctx)}} <div class="page-title"> Liked By </div> -{{template "userlist.tmpl" .Users}} +{{template "userlist.tmpl" (WithContext .Users $.Ctx)}} {{template "footer.tmpl"}} +{{end}} diff --git a/templates/navigation.tmpl b/templates/navigation.tmpl index fe83476..e2547ea 100644 --- a/templates/navigation.tmpl +++ b/templates/navigation.tmpl @@ -1,3 +1,4 @@ +{{with .Data}} <div class="user-info"> <div class="user-info-img-container"> <a class="img-link" href="/timeline/home" title="home"> @@ -25,3 +26,4 @@ </div> </div> </div> +{{end}} diff --git a/templates/notification.tmpl b/templates/notification.tmpl index 79d6d90..86134ac 100644 --- a/templates/notification.tmpl +++ b/templates/notification.tmpl @@ -1,5 +1,6 @@ -{{template "header.tmpl" .HeaderData}} -{{template "navigation.tmpl" .NavbarData}} +{{with .Data}} +{{template "header.tmpl" (WithContext .HeaderData $.Ctx)}} +{{template "navigation.tmpl" (WithContext .NavbarData $.Ctx)}} <div class="page-title"> Notifications </div> {{range .Notifications}} @@ -14,7 +15,7 @@ <div> <div class="notification-info-text"> <span class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </span> - <img class="icon" src="{{GetIcon "user-plus" .DarkMode}}" alt="followed" /> + <img class="icon" src="{{GetIcon "user-plus" $.Ctx.DarkMode}}" alt="followed" /> <span> followed you </span> </div> <div class="notification-follow-uname"> @@ -24,7 +25,7 @@ </div> {{else if eq .Type "mention"}} - {{template "status" .Status}} + {{template "status" (WithContext .Status $.Ctx)}} {{else if eq .Type "reblog"}} <div class="notification-retweet-container"> @@ -36,10 +37,10 @@ <div> <div class="notification-info-text"> <span class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </span> - <img class="icon" src="{{GetIcon "retweeted" .DarkMode}}" alt="retweeted" /> + <img class="icon" src="{{GetIcon "retweeted" $.Ctx.DarkMode}}" alt="retweeted" /> <span> retweeted your post </span> </div> - {{template "status" .Status}} + {{template "status" (WithContext .Status $.Ctx)}} </div> </div> @@ -53,10 +54,10 @@ <div> <div class="notification-info-text"> <span class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </span> - <img class="icon" src="{{GetIcon "liked" .DarkMode}}" alt="liked" /> + <img class="icon" src="{{GetIcon "liked" $.Ctx.DarkMode}}" alt="liked" /> <span> liked your post </span> </div> - {{template "status" .Status}} + {{template "status" (WithContext .Status $.Ctx)}} </div> </div> {{end}} @@ -68,4 +69,6 @@ <a href="{{.NextLink}}">next</a> {{end}} </div> + {{template "footer.tmpl"}} +{{end}} diff --git a/templates/postform.tmpl b/templates/postform.tmpl index ff70eaf..0b83d2c 100644 --- a/templates/postform.tmpl +++ b/templates/postform.tmpl @@ -1,3 +1,4 @@ +{{with .Data}} <form class="post-form" action="/post" method="POST" enctype="multipart/form-data"> {{if .ReplyContext}} <input type="hidden" name="reply_to_id" value="{{.ReplyContext.InReplyToID}}" /> @@ -6,7 +7,7 @@ <label for="post-content" class="post-form-title"> New post </label> {{end}} <a class="post-form-emoji-link" href="/emojis" target="_blank" title="emoji reference"> - <img class="icon post-emoji" src="{{GetIcon "smile-o" .DarkMode}}" alt="emojis" /> + <img class="icon post-emoji" src="{{GetIcon "smile-o" $.Ctx.DarkMode}}" alt="emojis" /> </a> <div class="post-form-content-container"> <textarea id="post-content" name="content" class="post-content" cols="50" rows="5">{{if .ReplyContext}}{{.ReplyContext.ReplyContent}}{{end}}</textarea> @@ -42,4 +43,5 @@ </div> <button type="submit"> Post </button> </form> +{{end}} diff --git a/templates/retweetedby.tmpl b/templates/retweetedby.tmpl index 2d9c539..ce0d337 100644 --- a/templates/retweetedby.tmpl +++ b/templates/retweetedby.tmpl @@ -1,7 +1,9 @@ -{{template "header.tmpl" .HeaderData}} -{{template "navigation.tmpl" .NavbarData}} +{{with .Data}} +{{template "header.tmpl" (WithContext .HeaderData $.Ctx)}} +{{template "navigation.tmpl" (WithContext .NavbarData $.Ctx)}} <div class="page-title"> Retweeted By </div> -{{template "userlist.tmpl" .Users}} +{{template "userlist.tmpl" (WithContext .Users $.Ctx)}} {{template "footer.tmpl"}} +{{end}} diff --git a/templates/search.tmpl b/templates/search.tmpl index de80fac..b4cd744 100644 --- a/templates/search.tmpl +++ b/templates/search.tmpl @@ -1,5 +1,6 @@ -{{template "header.tmpl" .HeaderData}} -{{template "navigation.tmpl" .NavbarData}} +{{with .Data}} +{{template "header.tmpl" (WithContext .HeaderData $.Ctx)}} +{{template "navigation.tmpl" (WithContext .NavbarData $.Ctx)}} <div class="page-title"> Search </div> <div> @@ -21,12 +22,12 @@ {{if eq .Type "statuses"}} {{range .Statuses}} -{{template "status.tmpl" .}} +{{template "status.tmpl" (WithContext . $.Ctx)}} {{end}} {{end}} {{if eq .Type "accounts"}} -{{template "userlist.tmpl" .Users}} +{{template "userlist.tmpl" (WithContext .Users $.Ctx)}} {{end}} <div class="pagination"> @@ -34,4 +35,6 @@ <a href="{{.NextLink}}">next</a> {{end}} </div> + {{template "footer.tmpl"}} +{{end}} diff --git a/templates/settings.tmpl b/templates/settings.tmpl index 06e2a9a..a32a1b0 100644 --- a/templates/settings.tmpl +++ b/templates/settings.tmpl @@ -1,5 +1,6 @@ -{{template "header.tmpl" .HeaderData}} -{{template "navigation.tmpl" .NavbarData}} +{{with .Data}} +{{template "header.tmpl" (WithContext .HeaderData $.Ctx)}} +{{template "navigation.tmpl" (WithContext .NavbarData $.Ctx)}} <div class="page-title"> Settings </div> <form id="settings-form" action="/settings" method="POST"> @@ -36,3 +37,4 @@ </form> {{template "footer.tmpl"}} +{{end}} diff --git a/templates/signin.tmpl b/templates/signin.tmpl index 5dd03f6..a199948 100644 --- a/templates/signin.tmpl +++ b/templates/signin.tmpl @@ -1,4 +1,5 @@ -{{template "header.tmpl" .HeaderData}} +{{with .Data}} +{{template "header.tmpl" (WithContext .HeaderData $.Ctx)}} <div class="page-title"> Signin </div> <form class="signin-form" action="/signin" method="post"> @@ -8,3 +9,4 @@ </form> {{template "footer.tmpl"}} +{{end}} 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}} <div id="status-{{.ID}}" class="status-container-container"> {{if .Reblog}} <div class="retweet-info"> @@ -5,12 +6,13 @@ <img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="avatar" /> </a> <span class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </span> - <img class="icon" src="{{GetIcon "retweeted" .DarkMode}}" alt="retweeted" /> + <img class="icon" src="{{GetIcon "retweeted" $.Ctx.DarkMode}}" alt="retweeted" /> retweeted </div> - {{template "status" .Reblog}} + {{template "status" (WithContext .Reblog $.Ctx)}} {{else}} - {{block "status" .}} + {{block "status" (WithContext . $.Ctx)}} + {{with $s := .Data}} <div class="status-container status-{{.ID}}" data-id="{{.ID}}"> {{if not .HideAccountInfo}} <div class="status-profile-img-container"> @@ -28,17 +30,17 @@ </a> <a class="status-visibility"> {{if eq .Visibility "public"}} - <img class="icon" src="{{GetIcon "globe" .DarkMode}}" alt="Public" title="Public" /> + <img class="icon" src="{{GetIcon "globe" $.Ctx.DarkMode}}" alt="Public" title="Public" /> {{else if eq .Visibility "unlisted"}} - <img class="icon" src="{{GetIcon "unlock-alt" .DarkMode}}" alt="Unlisted" title="Unlisted" /> + <img class="icon" src="{{GetIcon "unlock-alt" $.Ctx.DarkMode}}" alt="Unlisted" title="Unlisted" /> {{else if eq .Visibility "private"}} - <img class="icon" src="{{GetIcon "lock" .DarkMode}}" alt="Private" title="Private" /> + <img class="icon" src="{{GetIcon "lock" $.Ctx.DarkMode}}" alt="Private" title="Private" /> {{else if eq .Visibility "direct"}} - <img class="icon" src="{{GetIcon "envelope" .DarkMode}}" alt="Direct" title="Direct" /> + <img class="icon" src="{{GetIcon "envelope" $.Ctx.DarkMode}}" alt="Direct" title="Direct" /> {{end}} </a> <a class="remote-link" href="{{.URL}}" target="_blank" title="source"> - <img class="icon" src="{{GetIcon "link" .DarkMode}}" alt="source" /> + <img class="icon" src="{{GetIcon "link" $.Ctx.DarkMode}}" alt="source" /> </a> </div> {{end}} @@ -46,7 +48,7 @@ {{if .InReplyToID}} <div class="status-reply-to"> <a class="status-reply-to-link" href="{{if not .ShowReplies}}/thread/{{.InReplyToID}}{{end}}#status-{{.InReplyToID}}"> - <img class="icon" src="{{GetIcon "mail-forward" .DarkMode}}" alt="reply to" /> reply to {{.Pleroma.InReplyToAccountAcct}} + <img class="icon" src="{{GetIcon "mail-forward" $.Ctx.DarkMode}}" alt="reply to" /> reply to {{.Pleroma.InReplyToAccountAcct}} </a> </div> {{if index .ReplyMap .ID}} <span class="status-reply-info-divider"> - </span> {{end}} @@ -66,7 +68,7 @@ {{if eq .Type "image"}} <a class="img-link" href="{{.URL}}" target="_blank"> <img class="status-image" src="{{.URL}}" alt="status-image" /> - {{if (and $.MaskNSFW $.Sensitive)}} + {{if (and $.Ctx.MaskNSFW $s.Sensitive)}} <div class="status-nsfw-overlay"></div> {{end}} </a> @@ -81,7 +83,7 @@ <source src="{{.URL}}"> <p> Your browser doesn't support HTML5 video </p> </video> - {{if (and $.MaskNSFW $.Sensitive)}} + {{if (and $.Ctx.MaskNSFW $s.Sensitive)}} <div class="status-nsfw-overlay"></div> {{end}} </div> @@ -93,27 +95,27 @@ <div class="status-action-container"> <div class="status-action"> <a class="status-you" href="/thread/{{.ID}}?reply=true#status-{{.ID}}" title="reply"> - <img class="icon" src="{{GetIcon "reply" .DarkMode}}" alt="reply" /> + <img class="icon" src="{{GetIcon "reply" $.Ctx.DarkMode}}" alt="reply" /> </a> - <a class="status-reply-count" href="/thread/{{.ID}}#status-{{.ID}}" {{if .ThreadInNewTab}}target="_blank"{{end}}> + <a class="status-reply-count" href="/thread/{{.ID}}#status-{{.ID}}" {{if $.Ctx.ThreadInNewTab}}target="_blank"{{end}}> {{DisplayInteractionCount .RepliesCount}} </a> </div> <div class="status-action"> {{if or (eq .Visibility "private") (eq .Visibility "direct")}} <a class="status-retweet" title="this status cannot be retweeted"> - <img class="icon" src="{{GetIcon "retweet" .DarkMode}}" alt="retweet" /> + <img class="icon" src="{{GetIcon "retweet" $.Ctx.DarkMode}}" alt="retweet" /> </a> {{else}} {{if .Reblogged}} <form class="status-retweet" data-action="unretweet" action="/unretweet/{{.ID}}" method="post"> <input type="hidden" name="retweeted_by_id" value="{{.RetweetedByID}}" /> - <input type="image" src="{{GetIcon "retweeted" .DarkMode}}" alt="undo retweet" class="icon" title="undo retweet"> + <input type="image" src="{{GetIcon "retweeted" $.Ctx.DarkMode}}" alt="undo retweet" class="icon" title="undo retweet"> </form> {{else}} <form class="status-retweet" data-action="retweet" action="/retweet/{{.ID}}" method="post"> <input type="hidden" name="retweeted_by_id" value="{{.RetweetedByID}}" /> - <input type="image" src="{{GetIcon "retweet" .DarkMode}}" alt="retweet" class="icon" title="retweet"> + <input type="image" src="{{GetIcon "retweet" $.Ctx.DarkMode}}" alt="retweet" class="icon" title="retweet"> </form> {{end}} {{end}} @@ -125,12 +127,12 @@ {{if .Favourited}} <form class="status-like" data-action="unlike" action="/unlike/{{.ID}}" method="post"> <input type="hidden" name="retweeted_by_id" value="{{.RetweetedByID}}" /> - <input type="image" src="{{GetIcon "liked" .DarkMode}}" alt="unlike" class="icon" title="unlike"> + <input type="image" src="{{GetIcon "liked" $.Ctx.DarkMode}}" alt="unlike" class="icon" title="unlike"> </form> {{else}} <form class="status-like" data-action="like" action="/like/{{.ID}}" method="post"> <input type="hidden" name="retweeted_by_id" value="{{.RetweetedByID}}" /> - <input type="image" src="{{GetIcon "star-o" .DarkMode}}" alt="like" class="icon" title="like"> + <input type="image" src="{{GetIcon "star-o" $.Ctx.DarkMode}}" alt="like" class="icon" title="like"> </form> {{end}} <a class="status-like-count" href="/likedby/{{.ID}}" title="click to see the the list"> @@ -138,7 +140,7 @@ </a> </div> <div class="status-action"> - <a class="status-time" href="{{if not .ShowReplies}}/thread/{{.ID}}{{end}}#status-{{.ID}}" {{if .ThreadInNewTab}}target="_blank"{{end}}> + <a class="status-time" href="{{if not .ShowReplies}}/thread/{{.ID}}{{end}}#status-{{.ID}}" {{if $.Ctx.ThreadInNewTab}}target="_blank"{{end}}> <time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{FormatTimeRFC822 .CreatedAt}}"> {{TimeSince .CreatedAt}} </time> </a> </div> @@ -147,4 +149,6 @@ </div> {{end}} {{end}} + {{end}} </div> +{{end}} diff --git a/templates/thread.tmpl b/templates/thread.tmpl index 7ec0e94..2927ee4 100644 --- a/templates/thread.tmpl +++ b/templates/thread.tmpl @@ -1,14 +1,16 @@ -{{template "header.tmpl" .HeaderData}} -{{template "navigation.tmpl" .NavbarData}} +{{with $s := .Data}} +{{template "header.tmpl" (WithContext .HeaderData $.Ctx)}} +{{template "navigation.tmpl" (WithContext .NavbarData $.Ctx)}} <div class="page-title"> Thread </div> {{range .Statuses}} -{{template "status.tmpl" .}} -{{if $.PostContext.ReplyContext}}{{if eq .ID $.PostContext.ReplyContext.InReplyToID}} -{{template "postform.tmpl" $.PostContext}} +{{template "status.tmpl" (WithContext . $.Ctx)}} +{{if $s.PostContext.ReplyContext}}{{if eq .ID $s.PostContext.ReplyContext.InReplyToID}} +{{template "postform.tmpl" (WithContext $s.PostContext $.Ctx)}} {{end}}{{end}} {{end}} {{template "footer.tmpl"}} +{{end}} diff --git a/templates/timeline.tmpl b/templates/timeline.tmpl index b688501..aa951fc 100644 --- a/templates/timeline.tmpl +++ b/templates/timeline.tmpl @@ -1,12 +1,12 @@ -{{template "header.tmpl" .HeaderData}} -{{template "navigation.tmpl" .NavbarData}} +{{with .Data}} +{{template "header.tmpl" (WithContext .HeaderData $.Ctx)}} +{{template "navigation.tmpl" (WithContext .NavbarData $.Ctx)}} <div class="page-title"> {{.Title}} </div> - -{{template "postform.tmpl" .PostContext}} +{{template "postform.tmpl" (WithContext .PostContext $.Ctx)}} {{range .Statuses}} -{{template "status.tmpl" .}} +{{template "status.tmpl" (WithContext . $.Ctx)}} {{end}} <div class="pagination"> @@ -17,4 +17,6 @@ <a href="{{.NextLink}}">next</a> {{end}} </div> + {{template "footer.tmpl"}} +{{end}} diff --git a/templates/user.tmpl b/templates/user.tmpl index 60536bb..bbbce32 100644 --- a/templates/user.tmpl +++ b/templates/user.tmpl @@ -1,5 +1,6 @@ -{{template "header.tmpl" .HeaderData}} -{{template "navigation.tmpl" .NavbarData}} +{{with .Data}} +{{template "header.tmpl" (WithContext .HeaderData $.Ctx)}} +{{template "navigation.tmpl" (WithContext .NavbarData $.Ctx)}} <div class="page-title"> User </div> <div class="user-info-container"> @@ -14,7 +15,7 @@ <span class="status-dname"> {{EmojiFilter .User.DisplayName .User.Emojis}} </span> <span class="status-uname"> {{.User.Acct}} </span> <a class="remote-link" href="{{.User.URL}}" target="_blank" title="remote profile"> - <img class="icon" src="{{GetIcon "link" .DarkMode}}" alt="link" /> + <img class="icon" src="{{GetIcon "link" $.Ctx.DarkMode}}" alt="link" /> </a> </div> <div> @@ -48,7 +49,7 @@ </div> {{range .Statuses}} -{{template "status.tmpl" .}} +{{template "status.tmpl" (WithContext . $.Ctx)}} {{end}} <div class="pagination"> @@ -58,4 +59,4 @@ </div> {{template "footer.tmpl"}} - +{{end}} diff --git a/templates/userlist.tmpl b/templates/userlist.tmpl index d52e67d..83fa1df 100644 --- a/templates/userlist.tmpl +++ b/templates/userlist.tmpl @@ -1,3 +1,4 @@ +{{with .Data}} <div class="user-list-container"> {{range .}} <div class="user-list-item"> @@ -15,3 +16,4 @@ </div> {{end}} </div> +{{end}} |