cmd/web/tmpl: Also conditionally render for showpaste template

This commit is contained in:
Gabriel Simmer 2023-08-18 08:54:56 +01:00 committed by Xe Iaso
parent 0624533bed
commit 6fde9533d6

View file

@ -4,10 +4,10 @@
{{if .UserInfo}}
{{if ne .PasterUserID .UserID}}
<div class="float-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="float-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>