aboutsummaryrefslogtreecommitdiff
path: root/templates/user.tmpl
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2020-01-14 16:57:16 +0000
committerr <r@freesoftwareextremist.com>2020-01-14 16:57:16 +0000
commit55987a4c1bd7364eba7438e7326a76a9a550b668 (patch)
tree366dd5280f307ece3fc2343be3f24036f577f93b /templates/user.tmpl
parent3c6653a77b8951672ea169d175db154495a981fe (diff)
downloadbloat-55987a4c1bd7364eba7438e7326a76a9a550b668.tar.gz
bloat-55987a4c1bd7364eba7438e7326a76a9a550b668.zip
Refactor renderer and templates
Diffstat (limited to 'templates/user.tmpl')
-rw-r--r--templates/user.tmpl11
1 files changed, 6 insertions, 5 deletions
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}}