#113

Reviewed-on: https://codeberg.org/rimgo/rimgo/pulls/122
Co-authored-by: video-prize-ranch <cb.8a3w5@simplelogin.co>
Co-committed-by: video-prize-ranch <cb.8a3w5@simplelogin.co>
This commit is contained in:
video-prize-ranch
2023-08-10 15:02:51 +00:00
committed by video-prize-ranch
parent 73170689af
commit 85035243e9
21 changed files with 261 additions and 775 deletions

26
views/partials/result.hbs Normal file
View File

@@ -0,0 +1,26 @@
<div class="bg-slate-600 rounded-lg">
<a href="{{Url}}">
<img src="{{ImageUrl}}?no_webp=1" loading="lazy" width="100%" height="100%">
</a>
<p class="m-2 text-ellipsis whitespace-nowrap overflow-hidden">
<a href="{{Url}}">{{Title}}</a><br />
{{#if User}}
by <a href="/user/{{User}}">{{User}}</a>
{{else}}
<br />
{{/if}}
</p>
<div class="flex gap-2 p-2">
<div class="flex gap-1">
{{RelTime}}
</div>
<div class="flex gap-1">
<img class="invert icon" src="/static/icons/PhArrowFatUp.svg" alt="Points" width="18px" height="18px">
{{Points}}
</div>
<div class="flex gap-1">
<img class="invert icon" src="/static/icons/PhEye.svg" alt="Views" width="18px" height="18px">
{{Views}}
</div>
</div>
</div>

View File

@@ -0,0 +1,6 @@
<form method="GET" action="/search" class="flex gap-2 w-full lg:w-1/2">
<input class="p-2 rounded-lg bg-slate-600 w-full" name="q" type="text" placeholder="Search or paste a link" {{#if query}}value="{{query}}"{{/if}}/>
<button type="submit" class="p-2 rounded-lg bg-slate-600">
<img class="invert icon" src="/static/icons/PhMagnifyingGlass.svg" alt="Search" width="24px" height="24px">
</button>
</form>