mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2025-12-14 04:05:14 +00:00
Search (#122)
#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:
committed by
video-prize-ranch
parent
73170689af
commit
85035243e9
@@ -10,6 +10,11 @@
|
||||
<body class="font-sans text-lg bg-slate-800 text-white">
|
||||
{{> partials/nav }}
|
||||
|
||||
<section class="my-4 w-full flex flex-col items-center">
|
||||
{{> partials/searchBar }}
|
||||
</section>
|
||||
|
||||
|
||||
<main class="my-8">
|
||||
<p>An alternative frontend for Imgur. Originally based on <a href="https://codeberg.org/3np/rimgu" rel="noreferrer">rimgu</a>.</p>
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
<header class="my-8 p-8 rounded-xl flex flex-col gap-4 items-center justify-center bg-gradient-to-r from-blue-400 to-emerald-400">
|
||||
<h2 class="font-bold text-white text-2xl">The fast, private image viewer for Imgur.</h2>
|
||||
<!--<input class="p-2 rounded-lg bg-slate-200 text-black w-full lg:w-1/2" type="text" placeholder="Search or paste a link">-->
|
||||
{{> partials/searchBar }}
|
||||
</header>
|
||||
|
||||
<main class="my-8">
|
||||
|
||||
26
views/partials/result.hbs
Normal file
26
views/partials/result.hbs
Normal 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>
|
||||
6
views/partials/searchBar.hbs
Normal file
6
views/partials/searchBar.hbs
Normal 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>
|
||||
@@ -15,6 +15,10 @@
|
||||
<body class="font-sans text-lg bg-slate-800 text-white">
|
||||
{{> partials/nav }}
|
||||
|
||||
<section class="my-4 w-full flex flex-col items-center">
|
||||
{{> partials/searchBar }}
|
||||
</section>
|
||||
|
||||
<header>
|
||||
<h1 class="text-3xl font-bold">{{post.Title}}</h1>
|
||||
<p>{{post.CreatedAt}}</p>
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
|
||||
<body class="font-sans text-lg bg-slate-800 text-white">
|
||||
{{> partials/nav }}
|
||||
|
||||
<section class="my-4 w-full flex flex-col items-center">
|
||||
{{> partials/searchBar }}
|
||||
</section>
|
||||
|
||||
<header>
|
||||
<h1 class="text-3xl font-bold">Instance Privacy</h1>
|
||||
|
||||
28
views/search.hbs
Normal file
28
views/search.hbs
Normal file
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>{{query}} - rimgo</title>
|
||||
|
||||
{{> partials/head }}
|
||||
</head>
|
||||
|
||||
<body class="font-sans text-lg bg-slate-800 text-white">
|
||||
{{> partials/nav }}
|
||||
|
||||
<section class="my-4 w-full flex flex-col items-center">
|
||||
{{> partials/searchBar }}
|
||||
</section>
|
||||
|
||||
<main>
|
||||
<div class="posts">
|
||||
{{#each results}}
|
||||
{{> partials/result }}
|
||||
{{/each}}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
{{> partials/footer }}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -10,6 +10,10 @@
|
||||
<body class="font-sans text-lg bg-slate-800 text-white">
|
||||
{{> partials/nav }}
|
||||
|
||||
<section class="my-4 w-full flex flex-col items-center">
|
||||
{{> partials/searchBar }}
|
||||
</section>
|
||||
|
||||
<header class="p-4 rounded-xl text-white mb-4" style="background-image: url('{{tag.Background}}');">
|
||||
<div class="flex flex-col items-center justify-center text-center">
|
||||
<h2 class="text-2xl font-bold">{{tag.Display}}</h2>
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
|
||||
<body class="font-sans text-lg bg-slate-800 text-white">
|
||||
{{> partials/nav }}
|
||||
|
||||
<section class="my-4 w-full flex flex-col items-center">
|
||||
{{> partials/searchBar }}
|
||||
</section>
|
||||
|
||||
<header class="p-4 rounded-xl text-white mb-4" style="background-image: url('{{user.Cover}}');">
|
||||
<div class="flex items-center gap-2">
|
||||
|
||||
Reference in New Issue
Block a user