Add start up checks
This commit is contained in:
37
views/pages/search.ejs
Normal file
37
views/pages/search.ejs
Normal file
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang='<%- config.locale %>'>
|
||||
<head>
|
||||
<%- include('../partials/head'); %>
|
||||
</head>
|
||||
<body>
|
||||
<div id='site-header'>
|
||||
<%- include('../headers/site_wide'); %>
|
||||
</div>
|
||||
|
||||
<div id='advanced-search'>
|
||||
<form method="GET" action="/search">
|
||||
<label>Search Term:</label>
|
||||
<input type='text' placeholder='🔍' name='q' value='<%- search_term %>'><br/>
|
||||
|
||||
<label>Search for:</label><br/>
|
||||
<label>Post:</label>
|
||||
<input type="checkbox" name="type" value="post" <% if (search_type.includes('post')) {%>checked<% } %>><br/>
|
||||
<label>User:</label>
|
||||
<input type="checkbox" name="type" value="user" <% if (search_type.includes('user')) {%>checked<% } %>><br/>
|
||||
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<%- config.seperator %>
|
||||
|
||||
<div id='results'>
|
||||
<% search_results.posts.forEach((result, index) => { %>
|
||||
<a href="/post/<%- result.id %>"><%- result.title %></a><br/>
|
||||
<% }); %>
|
||||
<% search_results.users.forEach((result, index) => { %>
|
||||
<a href="/user/<%- result.username %>"><%- result.prettyname %></a><br/>
|
||||
<% }); %>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user