rimgo/views/partials/post.hbs

27 lines
828 B
Handlebars

<a href="{{Link}}">
<div class="post">
{{#equal Cover.Type "video"}}
<video controls loop poster="/{{Cover.Id}}.webp" preload="none" width="100%" height="100%">
<source src="{{Cover.Url}}" type="video/mp4" />
</video>
{{/equal}}
{{#equal Cover.Type "image"}}
<img src="{{Cover.Url}}" loading="lazy" width="100%" height="100%">
{{/equal}}
<p class="post__title">{{Title}}</p>
<div class="flex gap-2 p-2">
<div>
<img class="icon" src="/static/icons/chevron-up.svg" alt="Points">
{{Points}}
</div>
<div>
<img class="icon" src="/static/icons/message-square.svg" alt="Comments">
{{Comments}}
</div>
<div>
<img class="icon" src="/static/icons/eye.svg" alt="Views">
{{Views}}
</div>
</div>
</div>
</a>