rimgo/views/partials/comment.hbs

32 lines
1.2 KiB
Handlebars
Raw Normal View History

2023-06-10 16:04:29 +00:00
<div class="flex flex-col gap-2">
<div class="flex gap-2 items-center">
2022-10-13 21:29:05 +00:00
{{#noteq this.User.Username "[deleted]"}}
2023-06-10 16:04:29 +00:00
<img src="{{this.User.Avatar}}" class="rounded-full" width="24" height="24" loading="lazy">
2022-01-28 01:41:10 +00:00
<a href="/user/{{this.User.Username}}">
2023-06-10 16:04:29 +00:00
<p class="whitespace-nowrap text-ellipsis overflow-hidden"><b>{{this.User.Username}}</b></p>
2022-01-28 01:41:10 +00:00
</a>
2022-10-13 21:29:05 +00:00
{{/noteq}}
{{#equal this.User.Username "[deleted]"}}
2023-06-10 16:04:29 +00:00
<p class="whitespace-nowrap text-ellipsis overflow-hidden"><b>[deleted]</b></p>
2022-10-13 21:29:05 +00:00
{{/equal}}
2022-01-18 23:05:06 +00:00
</div>
<div>
2022-12-21 00:35:48 +00:00
<p>{{{this.Comment}}}</p>
2023-06-10 16:04:29 +00:00
<div class="flex gap-2">
2022-01-28 01:41:10 +00:00
<span title="{{this.CreatedAt}}">{{this.RelTime}}</span>
2022-01-18 23:05:06 +00:00
{{#if this.DeletedAt}}
2023-06-10 16:04:29 +00:00
<span class="text-md">(deleted {{this.DeletedAt}})</span>
2022-01-18 23:05:06 +00:00
{{/if}}
2022-12-21 00:35:48 +00:00
|
2023-06-10 16:04:29 +00:00
<img class="invert icon" src="/static/icons/PhArrowFatUp.svg" alt="Likes" width="24px" height="24px"> {{this.Upvotes}}
<img class="invert icon" src="/static/icons/PhArrowFatDown.svg" alt="Dislikes" width="24px" height="24px"> {{this.Downvotes}}
2022-12-21 00:35:48 +00:00
</div>
2022-01-18 23:05:06 +00:00
</div>
2023-06-10 16:04:29 +00:00
{{#if this.Comments}}
<div class="ml-4 p-2 border-solid border-l-2 border-slate-400">
2022-01-18 23:05:06 +00:00
{{#each this.Comments}}
{{> partials/comment }}
{{/each}}
</div>
2023-06-10 16:04:29 +00:00
{{/if}}
2022-01-18 23:05:06 +00:00
</div>