Added basic search functionality (no frontend for it yet)

This commit is contained in:
2025-09-30 23:15:33 +01:00
parent d27330a3db
commit 8ad8f01043
3 changed files with 78 additions and 1 deletions

20
views/partials/search.ejs Normal file
View File

@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<%- include('../partials/head'); %>
</head>
<body>
<div id='header'>
<%- include('../headers/site_wide'); %>
</div>
<div id='results'>
<% search_results.posts.forEach((result, index) => { %>
<a href="/post/<%- result.id %>"><%- result.title %></a>
<% }); %>
<% search_results.users.forEach((result, index) => { %>
<a href="/user/<%- result.username %>"><%- result.prettyname %></a>
<% }); %>
</div>
</body>
</html>