Also conditionally render for showpaste template #1

Closed
arch wants to merge 2 commits from conditional-profile-pic into main
Showing only changes of commit b0675e9f56 - Show all commits

View file

@ -4,10 +4,10 @@
{{if .UserInfo}}
{{if ne .PasterUserID .UserID}}
<div class="right">{{.PasterDisplayName}} <img style="width:32px;height:32px" src="{{.PasterProfilePicURL}}" /></div>
<div class="right">{{.PasterDisplayName}} {{if .PasterProfilePicURL}}<img style="width:32px;height:32px" src="{{.PasterProfilePicURL}}" />{{end}}</div>
{{end}}
{{else}}
<div class="right">{{.PasterDisplayName}} <img style="width:32px;height:32px" src="{{.PasterProfilePicURL}}" /></div>
<div class="right">{{.PasterDisplayName}} {{if .PasterProfilePicURL}}<img style="width:32px;height:32px" src="{{.PasterProfilePicURL}}" />{{end}}</div>
{{end}}
<p>Created at {{.CreatedAt}}</p>