rimgo/views/search.hbs
video-prize-ranch fc88bfbca5 Cleanup previous/next page buttons (#134)
Use noteq to simplify code, add current page to previous/next page bar

Reviewed-on: https://codeberg.org/rimgo/rimgo/pulls/134
Reviewed-by: orangix <orangix@noreply.codeberg.org>
Co-authored-by: video-prize-ranch <cb.8a3w5@simplelogin.co>
Co-committed-by: video-prize-ranch <cb.8a3w5@simplelogin.co>
2023-08-30 17:24:54 +00:00

36 lines
739 B
Handlebars

<!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>
<div class="flex justify-between mt-4 font-bold">
{{#noteq page "0"}}
<a href="/search?q={{query}}&page={{prevPage}}">Previous page</a>
{{/noteq}}
<p>Page {{nextPage}}</p>
<a href="/search?q={{query}}&page={{nextPage}}">Next page</a>
</div>
</main>
{{> partials/footer }}
</body>
</html>