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/search.tmpl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'templates/search.tmpl') 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)}}
Search
@@ -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}} + {{template "footer.tmpl"}} +{{end}} -- cgit v1.2.3