mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2026-04-16 21:35:38 -04:00
* 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
27 lines
1.1 KiB
Handlebars
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> |