rimgo/views/partials/post.hbs

26 lines
801 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="post__meta">
<p>
<img class="icon" src="/static/icons/chevron-up.svg" alt="Points">
{{Points}}
</p>
<p>
<img class="icon" src="/static/icons/message-square.svg" alt="Comments">
{{Comments}}
<p>
<img class="icon" src="/static/icons/eye.svg" alt="Views">
{{Views}}
</p>
</div>
</div>
</a>