Merge pull request #17 from gmemstr/conditional-profile-pic

Conditionally render profile picture img
This commit is contained in:
Xe Iaso 2023-09-19 11:35:58 -04:00 committed by GitHub
commit 2f7ded9122
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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>