diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/about.tmpl | 6 | ||||
-rw-r--r-- | templates/emoji.tmpl | 2 | ||||
-rw-r--r-- | templates/header.tmpl | 4 | ||||
-rw-r--r-- | templates/list.tmpl | 63 | ||||
-rw-r--r-- | templates/lists.tmpl | 35 | ||||
-rw-r--r-- | templates/nav.tmpl | 11 | ||||
-rw-r--r-- | templates/notification.tmpl | 8 | ||||
-rw-r--r-- | templates/postform.tmpl | 2 | ||||
-rw-r--r-- | templates/requestlist.tmpl | 2 | ||||
-rw-r--r-- | templates/search.tmpl | 2 | ||||
-rw-r--r-- | templates/settings.tmpl | 5 | ||||
-rw-r--r-- | templates/status.tmpl | 25 | ||||
-rw-r--r-- | templates/thread.tmpl | 4 | ||||
-rw-r--r-- | templates/timeline.tmpl | 5 | ||||
-rw-r--r-- | templates/user.tmpl | 21 | ||||
-rw-r--r-- | templates/userlist.tmpl | 14 | ||||
-rw-r--r-- | templates/userlistitem.tmpl | 15 | ||||
-rw-r--r-- | templates/usersearch.tmpl | 6 |
18 files changed, 177 insertions, 53 deletions
diff --git a/templates/about.tmpl b/templates/about.tmpl index c0b8418..0e4d001 100644 --- a/templates/about.tmpl +++ b/templates/about.tmpl @@ -46,11 +46,11 @@ <td> <kbd>6</kbd> </td> </tr> <tr> - <td> Settings </td> + <td> Lists </td> <td> <kbd>7</kbd> </td> </tr> <tr> - <td> Signout </td> + <td> Settings </td> <td> <kbd>8</kbd> </td> </tr> <tr> @@ -94,7 +94,7 @@ <td> <kbd>C</kbd> </td> </tr> <tr> - <td> Refresh thread page </td> + <td> Refresh timeline/thread page </td> <td> <kbd>T</kbd> </td> </tr> </table> diff --git a/templates/emoji.tmpl b/templates/emoji.tmpl index ee84522..4b07e81 100644 --- a/templates/emoji.tmpl +++ b/templates/emoji.tmpl @@ -6,7 +6,7 @@ {{range .Emojis}} <div class="emoji-item-container"> <div class="emoji-item"> - <img class="emoji" src="{{.URL}}" alt="{{.ShortCode}}" height="32" /> + <img class="emoji" src="{{.URL}}" alt="{{.ShortCode}}" height="32" loading="lazy" /> <span title=":{{.ShortCode}}:" class="emoji-shortcode">:{{.ShortCode}}:</span> </div> </div> diff --git a/templates/header.tmpl b/templates/header.tmpl index 8eb53f6..8a1b0ca 100644 --- a/templates/header.tmpl +++ b/templates/header.tmpl @@ -17,7 +17,7 @@ {{if .RefreshInterval}} <meta http-equiv="refresh" content="{{.RefreshInterval}}"> {{end}} - <title> {{if gt .Count 0}}({{.Count}}){{end}} {{.Title | html}} </title> + <title> {{if gt .Count 0}}({{.Count}}){{end}} {{.Title}} </title> <link rel="stylesheet" href="/static/style.css"> {{if .CustomCSS}} <link rel="stylesheet" href="{{.CustomCSS}}"> @@ -26,7 +26,7 @@ <script src="/static/fluoride.js"></script> {{end}} {{if $.Ctx.UserCSS}} - <style>{{$.Ctx.UserCSS}}</style> + <style>{{RawCSS $.Ctx.UserCSS}}</style> {{end}} </head> <body {{if $.Ctx.DarkMode}}class="dark"{{end}}> diff --git a/templates/list.tmpl b/templates/list.tmpl new file mode 100644 index 0000000..dcc6ee8 --- /dev/null +++ b/templates/list.tmpl @@ -0,0 +1,63 @@ +{{with .Data}} +{{template "header.tmpl" (WithContext .CommonData $.Ctx)}} +<div class="page-title"> List {{.List.Title}} </div> + +<form action="/list/{{.List.ID}}/rename" method="POST"> + <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}"> + <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}"> + <input id="title" name="title" value="{{.List.Title}}"> + <button type="submit"> Rename </button> +</form> + +<div class="page-title"> Users </div> +{{if .Accounts}} +<table> +{{range .Accounts}} + <tr> + <td class="p-0"> {{template "userlistitem.tmpl" (WithContext . $.Ctx)}} </td> + <td class="p-0"> + <form class="user-list-action" action="/list/{{$.Data.List.ID}}/removeuser?uid={{.ID}}" method="POST"> + <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}"> + <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}"> + <button type="submit"> Remove </button> + </form> + </td> + </tr> +{{end}} +</table> +{{else}} +<div class="no-data-found">No data found</div> +{{end}} + +<div class="page-title"> Add user </div> +<form class="search-form" action="/list/{{.List.ID}}" method="GET"> + <span class="post-form-field"> + <label for="query"> Query </label> + <input id="query" name="q" value="{{.Q}}"> + </span> + <button type="submit"> Search </button> +</form> + +{{if .Q}} +{{if .SearchAccounts}} +<table> +{{range .SearchAccounts}} + <tr> + <td> {{template "userlistitem.tmpl" (WithContext . $.Ctx)}} </td> + <td> + <form class="user-list-action" action="/list/{{$.Data.List.ID}}/adduser?uid={{.ID}}" method="POST"> + <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}"> + <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}"> + <button type="submit"> Add </button> + </form> + </td> + </tr> +{{end}} +</table> +{{else}} +<div class="no-data-found">No data found</div> +{{end}} +{{end}} + +{{template "footer.tmpl"}} +{{end}} diff --git a/templates/lists.tmpl b/templates/lists.tmpl new file mode 100644 index 0000000..27979cb --- /dev/null +++ b/templates/lists.tmpl @@ -0,0 +1,35 @@ +{{with .Data}} +{{template "header.tmpl" (WithContext .CommonData $.Ctx)}} +<div class="page-title"> Lists </div> + +{{range .Lists}} +<div> + <a href="/timeline/list?list={{.ID}}"> {{.Title}} timeline </a> + - + <form class="d-inline" action="/list/{{.ID}}" method="GET"> + <button type="submit" class="btn-link"> edit </button> + </form> + - + <form class="d-inline" action="/list/{{.ID}}/remove" method="POST"> + <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}"> + <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}"> + <button type="submit" class="btn-link"> delete </button> + </form> +</div> +{{else}} +<div class="no-data-found">No data found</div> +{{end}} + +<div class="page-title"> Add list </div> +<form action="/list" method="POST"> + <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}"> + <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}"> + <span class="settings-form-field"> + <label for="title"> Title </label> + <input id="title" name="title" required> + </span> + <button type="submit"> Add </button> +</form> + +{{template "footer.tmpl"}} +{{end}} diff --git a/templates/nav.tmpl b/templates/nav.tmpl index cbf65c9..db88aa0 100644 --- a/templates/nav.tmpl +++ b/templates/nav.tmpl @@ -8,7 +8,7 @@ </div> <div class="user-info-details-container"> <div class="user-info-details-name"> - <bdi class="status-dname"> {{EmojiFilter .User.DisplayName .User.Emojis}} </bdi> + <bdi class="status-dname"> {{EmojiFilter (HTML .User.DisplayName) .User.Emojis | Raw}} </bdi> <a class="nav-link" href="/user/{{.User.ID}}" accesskey="0" title="User profile (0)"> <span class="status-uname"> @{{.User.Acct}} </span> </a> @@ -17,16 +17,17 @@ <a class="nav-link" href="/timeline/home" accesskey="1" title="Home timeline (1)">home</a> <a class="nav-link" href="/timeline/direct" accesskey="2" title="Direct timeline (2)">direct</a> <a class="nav-link" href="/timeline/local" accesskey="3" title="Local timeline (3)">local</a> - <a class="nav-link" href="/timeline/twkn" accesskey="5" title="The Whole Known Netwwork (4)">twkn</a> - <a class="nav-link" href="/timeline/remote" accesskey="4" title="Remote timeline (5)">remote</a> + <a class="nav-link" href="/timeline/twkn" accesskey="4" title="The Whole Known Netwwork (4)">twkn</a> + <a class="nav-link" href="/timeline/remote" accesskey="5" title="Remote timeline (5)">remote</a> <a class="nav-link" href="/search" accesskey="6" title="Search (6)">search</a> </div> <div> - <a class="nav-link" href="/settings" target="_top" accesskey="7" title="Settings (7)">settings</a> + <a class="nav-link" href="/lists" accesskey="7" title="Lists (7)">lists</a> + <a class="nav-link" href="/settings" target="_top" accesskey="8" title="Settings (8)">settings</a> <form class="signout" action="/signout" method="post" target="_top"> <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}"> <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}"> - <input type="submit" value="signout" class="btn-link nav-link" accesskey="8" title="Signout (8)"> + <input type="submit" value="signout" class="btn-link nav-link" title="Signout"> </form> <a class="nav-link" href="/about" accesskey="9" title="About (9)">about</a> </div> diff --git a/templates/notification.tmpl b/templates/notification.tmpl index 2778ef0..f62726b 100644 --- a/templates/notification.tmpl +++ b/templates/notification.tmpl @@ -1,13 +1,13 @@ {{with .Data}} {{template "header.tmpl" (WithContext .CommonData $.Ctx)}} -<div class="notification-title-container"> +<div class="page-title-container"> <span class="page-title"> Notifications {{if and (not $.Ctx.AntiDopamineMode) (gt .UnreadCount 0)}} ({{.UnreadCount }}) {{end}} </span> - <a class="notification-refresh" href="/notifications" target="_self" accesskey="R" title="Refresh (R)">refresh</a> + <a class="page-refresh" href="/notifications" target="_self" accesskey="R" title="Refresh (R)">refresh</a> {{if .ReadID}} <form class="notification-read" action="/notifications/read?max_id={{.ReadID}}" method="post" target="_self"> <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}"> @@ -28,7 +28,7 @@ </div> <div class="notification-follow"> <div class="notification-info-text"> - <bdi class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </bdi> + <bdi class="status-dname"> {{EmojiFilter (HTML .Account.DisplayName) .Account.Emojis | Raw}} </bdi> <span class="notification-text"> followed you - <time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{FormatTimeRFC822 .CreatedAt}}">{{TimeSince .CreatedAt}}</time> </span> @@ -48,7 +48,7 @@ </div> <div class="notification-follow"> <div class="notification-info-text"> - <bdi class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </bdi> + <bdi class="status-dname"> {{EmojiFilter (HTML .Account.DisplayName) .Account.Emojis | Raw}} </bdi> <span class="notification-text"> wants to follow you - <time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{FormatTimeRFC822 .CreatedAt}}">{{TimeSince .CreatedAt}}</time> </span> diff --git a/templates/postform.tmpl b/templates/postform.tmpl index 35171a4..0af50fb 100644 --- a/templates/postform.tmpl +++ b/templates/postform.tmpl @@ -5,7 +5,7 @@ {{if .ReplyContext}} <input type="hidden" name="reply_to_id" value="{{.ReplyContext.InReplyToID}}" /> <input type="hidden" name="quickreply" value="{{.ReplyContext.QuickReply}}" /> - <label for="post-content" class="post-form-title"> Reply to {{.ReplyContext.InReplyToName}} </label> + <label for="post-content" class="post-form-title"> Reply to @{{.ReplyContext.InReplyToName}} </label> {{else}} <label for="post-content" class="post-form-title"> New post </label> {{end}} diff --git a/templates/requestlist.tmpl b/templates/requestlist.tmpl index 8142620..1a51e31 100644 --- a/templates/requestlist.tmpl +++ b/templates/requestlist.tmpl @@ -9,7 +9,7 @@ </div> <div class="user-list-name"> <div> - <div class="status-dname"> {{EmojiFilter .DisplayName .Emojis}} </div> + <div class="status-dname"> {{EmojiFilter (HTML .DisplayName) .Emojis | Raw}} </div> <a class="img-link" href="/user/{{.ID}}"> <div class="status-uname"> @{{.Acct}} </div> </a> diff --git a/templates/search.tmpl b/templates/search.tmpl index 7338cad..0473d4a 100644 --- a/templates/search.tmpl +++ b/templates/search.tmpl @@ -5,7 +5,7 @@ <form class="search-form" action="/search" method="GET"> <span class="post-form-field"> <label for="query"> Query </label> - <input id="query" name="q" value="{{.Q | html}}"> + <input id="query" name="q" value="{{.Q}}"> </span> <span class="post-form-field"> <label for="type"> Type </label> diff --git a/templates/settings.tmpl b/templates/settings.tmpl index 6bae9c7..ebb0458 100644 --- a/templates/settings.tmpl +++ b/templates/settings.tmpl @@ -62,6 +62,11 @@ <label for="anti-dopamine-mode"> Enable <abbr title="Remove like/retweet/unread notification count and disable like/retweet/follow notifications">anti-dopamine mode</abbr> </label> </div> <div class="settings-form-field"> + <input id="hide-unsupported-notifs" name="hide_unsupported_notifs" type="checkbox" + value="true" {{if .Settings.HideUnsupportedNotifs}}checked{{end}}> + <label for="hide-unsupported-notifs"> Hide unsupported notifications </label> + </div> + <div class="settings-form-field"> <input id="dark-mode" name="dark_mode" type="checkbox" value="true" {{if .Settings.DarkMode}}checked{{end}}> <label for="dark-mode"> Use dark theme </label> </div> diff --git a/templates/status.tmpl b/templates/status.tmpl index a7cc10d..5ada84e 100644 --- a/templates/status.tmpl +++ b/templates/status.tmpl @@ -5,7 +5,7 @@ <a class="img-link" href="/user/{{.Account.ID}}"> <img class="status-profile-img" src="{{.Account.Avatar}}" title="@{{.Account.Acct}}" alt="avatar" height="24" /> </a> - <bdi class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </bdi> + <bdi class="status-dname"> {{EmojiFilter (HTML .Account.DisplayName) .Account.Emojis | Raw}} </bdi> <a href="/user/{{.Account.ID}}"> <span class="status-uname"> @{{.Account.Acct}} </span> </a> @@ -23,7 +23,7 @@ </div> <div class="status"> <div class="status-name"> - <bdi class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </bdi> + <bdi class="status-dname"> {{EmojiFilter (HTML .Account.DisplayName) .Account.Emojis | Raw}} </bdi> <a href="/user/{{.Account.ID}}"> <span class="status-uname"> @{{.Account.Acct}} </span> </a> @@ -91,7 +91,10 @@ {{end}} </div> {{if (or .Content .SpoilerText)}} - <div class="status-content"> {{StatusContentFilter (html .SpoilerText) .Content .Emojis .Mentions}} </div> + <div class="status-content"> + {{if .SpoilerText}}{{EmojiFilter (HTML .SpoilerText) .Emojis | Raw}}<br/>{{end}} + {{StatusContentFilter .Content .Emojis .Mentions | Raw}} + </div> {{end}} {{if .MediaAttachments}} <div class="status-media-container"> @@ -100,7 +103,7 @@ {{if eq .Type "image"}} {{if $.Ctx.HideAttachments}} <a href="{{.URL}}" target="_blank"> - {{if .Description}}[{{.Description}}]{{else}}[image]{{end}} + [image{{if $s.Sensitive}}/nsfw{{end}}{{if .Description}}: {{.Description}}{{end}}] </a> {{else}} <a class="img-link" href="{{.URL}}" target="_blank" title="{{.Description}}"> @@ -114,7 +117,7 @@ {{else if eq .Type "audio"}} {{if $.Ctx.HideAttachments}} <a href="{{.URL}}" target="_blank"> - {{if .Description}}[{{.Description}}]{{else}}[audio]{{end}} + [audio{{if $s.Sensitive}}/nsfw{{end}}{{if .Description}}: {{.Description}}{{end}}] </a> {{else}} <audio class="status-audio" controls title="{{.Description}}"> @@ -126,7 +129,7 @@ {{else if eq .Type "video"}} {{if $.Ctx.HideAttachments}} <a href="{{.URL}}" target="_blank"> - {{if .Description}}[{{.Description}}]{{else}}[video]{{end}} + [video{{if $s.Sensitive}}/nsfw{{end}}{{if .Description}}: {{.Description}}{{end}}] </a> {{else}} <div class="status-video-container" title="{{.Description}}"> @@ -142,7 +145,7 @@ {{else}} <a href="{{.URL}}" target="_blank"> - {{if .Description}}[{{.Description}}]{{else}}[attachment]{{end}} + [attachment{{if $s.Sensitive}}/nsfw{{end}}{{if .Description}}: {{.Description}}{{end}}] </a> {{end}} {{end}} @@ -156,12 +159,12 @@ {{range $i, $o := .Poll.Options}} <div class="poll-option"> {{if (or $s.Poll.Expired $s.Poll.Voted)}} - <div> {{EmojiFilter (html $o.Title) $s.Emojis}} - {{$o.VotesCount}} votes </div> + <div> {{EmojiFilter (HTML $o.Title) $s.Emojis | Raw}} - {{$o.VotesCount}} votes </div> {{else}} <input type="{{if $s.Poll.Multiple}}checkbox{{else}}radio{{end}}" name="choices" id="poll-{{$s.ID}}-{{$i}}" value="{{$i}}"> <label for="poll-{{$s.ID}}-{{$i}}"> - {{EmojiFilter (html $o.Title) $s.Emojis}} + {{EmojiFilter (HTML $o.Title) $s.Emojis | Raw}} </label> {{end}} </div> @@ -227,8 +230,8 @@ <div class="status-action status-action-last"> <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 datetime="{{FormatTimeRFC3339 .CreatedAt.Time}}" title="{{FormatTimeRFC822 .CreatedAt.Time}}"> + {{TimeSince .CreatedAt.Time}} </time> </a> </div> diff --git a/templates/thread.tmpl b/templates/thread.tmpl index bb9f14f..d6a1c7d 100644 --- a/templates/thread.tmpl +++ b/templates/thread.tmpl @@ -1,8 +1,8 @@ {{with $s := .Data}} {{template "header.tmpl" (WithContext .CommonData $.Ctx)}} -<div class="notification-title-container"> +<div class="page-title-container"> <span class="page-title"> Thread </span> - <a class="notification-refresh" href="{{$.Ctx.Referrer}}" accesskey="T" title="Refresh (T)">refresh</a> + <a class="page-refresh" href="{{$.Ctx.Referrer}}" accesskey="T" title="Refresh (T)">refresh</a> </div> {{range .Statuses}} diff --git a/templates/timeline.tmpl b/templates/timeline.tmpl index bde050a..38659dc 100644 --- a/templates/timeline.tmpl +++ b/templates/timeline.tmpl @@ -1,6 +1,9 @@ {{with .Data}} {{template "header.tmpl" (WithContext .CommonData $.Ctx)}} -<div class="page-title"> {{.Title}} </div> +<div class="page-title-container"> + <span class="page-title"> {{.Title}} </span> + <a class="page-refresh" href="{{$.Ctx.Referrer}}" accesskey="T" title="Refresh (T)">refresh</a> +</div> {{if eq .Type "remote"}} <form class="search-form" action="/timeline/remote" method="GET"> diff --git a/templates/user.tmpl b/templates/user.tmpl index c7b3164..5342efe 100644 --- a/templates/user.tmpl +++ b/templates/user.tmpl @@ -11,7 +11,7 @@ </div> <div class="user-profile-details-container"> <div> - <bdi class="status-dname"> {{EmojiFilter .User.DisplayName .User.Emojis}} </bdi> + <bdi class="status-dname"> {{EmojiFilter (HTML .User.DisplayName) .User.Emojis | Raw}} </bdi> <span class="status-uname"> @{{.User.Acct}} </span> <a class="remote-link" href="{{.User.URL}}" target="_blank" title="remote profile"> source @@ -20,6 +20,7 @@ {{if not .IsCurrent}} <div> <span> {{if .User.Pleroma.Relationship.FollowedBy}} follows you - {{end}} </span> + {{if .User.Pleroma.Relationship.BlockedBy}} blocks you - {{end}} {{if .User.Pleroma.Relationship.Following}} <form class="d-inline" action="/unfollow/{{.User.ID}}" method="post"> <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}"> @@ -83,6 +84,12 @@ <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}"> <input type="submit" value="mute" class="btn-link"> </form> + - + <form class="d-inline" action="/mute/{{.User.ID}}?notifications=false" method="post"> + <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}"> + <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}"> + <input type="submit" value="mute (keep notifications)" class="btn-link"> + </form> {{end}} {{if .User.Pleroma.Relationship.Following}} - @@ -123,11 +130,15 @@ </div> </div> <div class="user-profile-decription"> - {{EmojiFilter .User.Note .User.Emojis}} + {{EmojiFilter .User.Note .User.Emojis | Raw}} </div> - {{if .User.Fields}}{{range .User.Fields}} - <div>{{.Name}} - {{.Value}}</div> - {{end}}{{end}} + {{if .User.Fields}} + <div class="user-fields"> + {{range .User.Fields}} + <div>{{.Name}} - {{.Value | Raw}}</div> + {{end}} + </div> + {{end}} </div> </div> diff --git a/templates/userlist.tmpl b/templates/userlist.tmpl index 3f75085..f206397 100644 --- a/templates/userlist.tmpl +++ b/templates/userlist.tmpl @@ -1,19 +1,7 @@ {{with .Data}} <div> {{range .}} - <div class="user-list-item"> - <div class="user-list-profile-img"> - <a class="img-link" href="/user/{{.ID}}"> - <img class="status-profile-img" src="{{.Avatar}}" title="@{{.Acct}}" alt="avatar" height="48" /> - </a> - </div> - <div class="user-list-name"> - <div class="status-dname"> {{EmojiFilter .DisplayName .Emojis}} </div> - <a class="img-link" href="/user/{{.ID}}"> - <div class="status-uname"> @{{.Acct}} </div> - </a> - </div> - </div> + {{template "userlistitem.tmpl" (WithContext . $.Ctx)}} {{else}} <div class="no-data-found">No data found</div> {{end}} diff --git a/templates/userlistitem.tmpl b/templates/userlistitem.tmpl new file mode 100644 index 0000000..50b9d0c --- /dev/null +++ b/templates/userlistitem.tmpl @@ -0,0 +1,15 @@ +{{with .Data}} +<div class="user-list-item"> + <div class="user-list-profile-img"> + <a class="img-link" href="/user/{{.ID}}"> + <img class="status-profile-img" src="{{.Avatar}}" title="@{{.Acct}}" alt="avatar" height="48" /> + </a> + </div> + <div class="user-list-name"> + <div class="status-dname"> {{EmojiFilter (HTML .DisplayName) .Emojis | Raw}} </div> + <a class="img-link" href="/user/{{.ID}}"> + <div class="status-uname"> @{{.Acct}} </div> + </a> + </div> +</div> +{{end}} diff --git a/templates/usersearch.tmpl b/templates/usersearch.tmpl index ee84143..78fa7b8 100644 --- a/templates/usersearch.tmpl +++ b/templates/usersearch.tmpl @@ -1,11 +1,11 @@ {{with .Data}} {{template "header.tmpl" (WithContext .CommonData $.Ctx)}} -<div class="page-title"> Search {{EmojiFilter .User.DisplayName .User.Emojis}}'s statuses </div> +<div class="page-title"> Search {{EmojiFilter (HTML .User.DisplayName) .User.Emojis | Raw}}'s statuses </div> <form class="search-form" action="/usersearch/{{.User.ID}}" method="GET"> - <span class="post-form-field> + <span class="post-form-field"> <label for="query"> Query </label> - <input id="query" name="q" value="{{.Q | html}}"> + <input id="query" name="q" value="{{.Q}}"> </span> <button type="submit"> Search </button> </form> |