Files
rimgo/views/partials/post.hbs
orangix 14192e2943 change Album and Tag to use encoding/json
* move sanitization code to views

* split Tag into Tag and the subset TagMeta to match Imgur API

* make the code to parse an array generic

* change some of the views to match
2026-01-26 03:08:54 +01:00

27 lines
1.1 KiB
Handlebars

<a href="{{Link}}">
<div class="bg-slate-600 rounded-lg">
{{#equal Cover.Type "video"}}
<video controls loop poster="/{{Cover.Id}}.webp" preload="none" width="100%" height="100%">
<source src="{{rewriteUrl(Cover.Url)}}" type="video/mp4" />
</video>
{{/equal}}
{{#equal Cover.Type "image"}}
<img src="{{rewriteUrl(Cover.Url)}}" loading="lazy" width="100%" height="100%">
{{/equal}}
<p class="m-2 text-ellipsis whitespace-nowrap overflow-hidden">{{Title}}</p>
<div class="flex gap-2 p-2">
<div class="flex gap-1">
<img class="invert icon" src="/static/icons/PhArrowFatUp.svg" alt="Points" width="18px" height="18px">
{{PointCount}}
</div>
<div class="flex gap-1">
<img class="invert icon" src="/static/icons/PhChat.svg" alt="Comments" width="18px" height="18px">
{{CommentCount}}
</div>
<div class="flex gap-1">
<img class="invert icon" src="/static/icons/PhEye.svg" alt="Views" width="18px" height="18px">
{{ViewCount}}
</div>
</div>
</div>
</a>