#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

View File

@@ -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>

View File

@@ -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
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>

View File

@@ -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>

View File

@@ -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
View 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>

View File

@@ -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>

View File

@@ -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">