diff options
author | r <r@freesoftwareextremist.com> | 2020-01-14 16:57:16 +0000 |
---|---|---|
committer | r <r@freesoftwareextremist.com> | 2020-01-14 16:57:16 +0000 |
commit | 55987a4c1bd7364eba7438e7326a76a9a550b668 (patch) | |
tree | 366dd5280f307ece3fc2343be3f24036f577f93b /templates/notification.tmpl | |
parent | 3c6653a77b8951672ea169d175db154495a981fe (diff) | |
download | bloat-55987a4c1bd7364eba7438e7326a76a9a550b668.tar.gz bloat-55987a4c1bd7364eba7438e7326a76a9a550b668.zip |
Refactor renderer and templates
Diffstat (limited to 'templates/notification.tmpl')
-rw-r--r-- | templates/notification.tmpl | 19 |
1 files changed, 11 insertions, 8 deletions
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}} |