rimgo/views/partials/post.hbs

32 lines
840 B
Handlebars

<a href="{{Link}}">
<div class="post">
{{#equal Cover.Type "video"}}
<video fullscreen 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>
<span class="material-icons-outlined">
arrow_upward
</span>
{{Points}}
</p>
<p>
<span class="material-icons-outlined">
comment
</span>
{{Comments}}
<p>
<span class="material-icons-outlined">
visibility
</span>
{{Views}}
</p>
</div>
</div>
</a>